@mostra/runtime 0.1.0 → 0.3.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 (65) hide show
  1. package/dist/bin.js +7 -7
  2. package/dist/bin.js.map +1 -1
  3. package/dist/builder/child/main.js +18 -17
  4. package/dist/builder/child/main.js.map +1 -1
  5. package/dist/{child-xrHmytks.js → child-BQc3arf7.js} +5 -2
  6. package/dist/{child-xrHmytks.js.map → child-BQc3arf7.js.map} +1 -1
  7. package/dist/deps/child/install.js +9 -6
  8. package/dist/deps/child/install.js.map +1 -1
  9. package/dist/files-KxzOxckl.js +674 -0
  10. package/dist/files-KxzOxckl.js.map +1 -0
  11. package/dist/index.d.ts +2 -0
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +2 -2
  14. package/dist/{instance-D7_UVdoN.js → instance-DiKSe7s6.js} +1331 -752
  15. package/dist/instance-DiKSe7s6.js.map +1 -0
  16. package/package.json +5 -5
  17. package/src/bin.ts +4 -10
  18. package/src/builder/child/dev.ts +4 -3
  19. package/src/builder/child/plugins.ts +12 -7
  20. package/src/builder/child/spa.ts +15 -9
  21. package/src/builder/index.ts +3 -6
  22. package/src/deps/child/install.ts +3 -2
  23. package/src/deps/index.ts +21 -16
  24. package/src/deps/warm.ts +3 -16
  25. package/src/faults.ts +9 -2
  26. package/src/gateway/actions.ts +1 -1
  27. package/src/gateway/browser.ts +1 -1
  28. package/src/gateway/capabilities.ts +28 -7
  29. package/src/gateway/identity.ts +101 -0
  30. package/src/gateway/index.ts +96 -6
  31. package/src/home/acquire.ts +27 -11
  32. package/src/home/paths.ts +45 -135
  33. package/src/home/platform.ts +17 -9
  34. package/src/home/record.ts +3 -3
  35. package/src/home/settings.ts +5 -16
  36. package/src/instance/index.ts +73 -12
  37. package/src/interaction/index.ts +4 -0
  38. package/src/interaction/viewers.ts +16 -2
  39. package/src/ledger/index.ts +5 -27
  40. package/src/ledger/migrations.ts +13 -0
  41. package/src/platform/control.ts +409 -0
  42. package/src/platform/directories.ts +212 -0
  43. package/src/platform/environment.ts +64 -0
  44. package/src/platform/files.ts +368 -0
  45. package/src/platform/helper.ts +152 -0
  46. package/src/{processes → platform}/identity.ts +40 -8
  47. package/src/platform/index.ts +46 -0
  48. package/src/platform/launch.ts +373 -0
  49. package/src/processes/child.ts +4 -1
  50. package/src/processes/environment.ts +22 -3
  51. package/src/processes/index.ts +2 -1
  52. package/src/processes/manager.ts +76 -179
  53. package/src/protocol-server/client.ts +19 -18
  54. package/src/protocol-server/server.ts +84 -54
  55. package/src/publish/publisher.ts +16 -9
  56. package/src/publish/source.ts +7 -4
  57. package/src/registry/store.ts +7 -65
  58. package/src/secrets/index.ts +3 -3
  59. package/src/service/unit.ts +3 -2
  60. package/src/verify/index.ts +5 -3
  61. package/src/verify/typecheck.ts +3 -2
  62. package/src/workers/launcher.ts +3 -1
  63. package/dist/instance-D7_UVdoN.js.map +0 -1
  64. package/dist/types-NjNy7gXX.js +0 -57
  65. package/dist/types-NjNy7gXX.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { t as connectToSupervisor } from "../../child-xrHmytks.js";
1
+ import { t as connectToSupervisor } from "../../child-BQc3arf7.js";
2
2
  import { spawn } from "node:child_process";
3
3
  //#region src/deps/child/install.ts
4
4
  /**
@@ -15,11 +15,14 @@ if (entry === void 0) {
15
15
  console.error("The install child needs the installer's entry as its first argument.");
16
16
  process.exit(2);
17
17
  }
18
- const installer = spawn(process.execPath, [entry, ...args], { stdio: [
19
- "ignore",
20
- "inherit",
21
- "inherit"
22
- ] });
18
+ const installer = spawn(process.execPath, [entry, ...args], {
19
+ stdio: [
20
+ "ignore",
21
+ "inherit",
22
+ "inherit"
23
+ ],
24
+ windowsHide: true
25
+ });
23
26
  installer.on("error", (error) => {
24
27
  console.error(`The installer couldn't start: ${error.message}`);
25
28
  process.exit(1);
@@ -1 +1 @@
1
- {"version":3,"file":"install.js","names":[],"sources":["../../../src/deps/child/install.ts"],"sourcesContent":["/**\n * The install child's entry (`dist/deps/child/install.js`, D95, DP-05): the process the process\n * manager starts for every installer run, in the artifact's source directory with the artifact\n * environment. It connects to its supervisor over IPC, so that when the supervisor exits or is\n * killed, its whole process group ends with it (FAILURE_MODEL §2): pnpm, and every lifecycle\n * script pnpm starts, run in that group. Its arguments are pnpm's entry and pnpm's arguments; pnpm\n * runs as its child with the same output, and its exit code is the install child's.\n */\nimport { spawn } from \"node:child_process\";\nimport { connectToSupervisor } from \"../../processes/index.ts\";\n\nconnectToSupervisor();\n\nconst [entry, ...args] = process.argv.slice(2);\nif (entry === undefined) {\n console.error(\"The install child needs the installer's entry as its first argument.\");\n process.exit(2);\n}\n// Not detached: pnpm stays in this child's process group, which the supervisor and the disconnect\n// rule both end as a whole.\nconst installer = spawn(process.execPath, [entry, ...args], {\n stdio: [\"ignore\", \"inherit\", \"inherit\"],\n});\ninstaller.on(\"error\", (error) => {\n console.error(`The installer couldn't start: ${error.message}`);\n process.exit(1);\n});\ninstaller.on(\"exit\", (code, signal) => {\n process.exit(code ?? (signal ? 1 : 0));\n});\n"],"mappings":";;;;;;;;;;;AAWA,oBAAoB;AAEpB,MAAM,CAAC,OAAO,GAAG,QAAQ,QAAQ,KAAK,MAAM,CAAC;AAC7C,IAAI,UAAU,KAAA,GAAW;CACvB,QAAQ,MAAM,sEAAsE;CACpF,QAAQ,KAAK,CAAC;AAChB;AAGA,MAAM,YAAY,MAAM,QAAQ,UAAU,CAAC,OAAO,GAAG,IAAI,GAAG,EAC1D,OAAO;CAAC;CAAU;CAAW;AAAS,EACxC,CAAC;AACD,UAAU,GAAG,UAAU,UAAU;CAC/B,QAAQ,MAAM,iCAAiC,MAAM,SAAS;CAC9D,QAAQ,KAAK,CAAC;AAChB,CAAC;AACD,UAAU,GAAG,SAAS,MAAM,WAAW;CACrC,QAAQ,KAAK,SAAS,SAAS,IAAI,EAAE;AACvC,CAAC"}
1
+ {"version":3,"file":"install.js","names":[],"sources":["../../../src/deps/child/install.ts"],"sourcesContent":["/**\n * The install child's entry (`dist/deps/child/install.js`, D95, DP-05): the process the process\n * manager starts for every installer run, in the artifact's source directory with the artifact\n * environment. It connects to its supervisor over IPC, so that when the supervisor exits or is\n * killed, its whole process group ends with it (FAILURE_MODEL §2): pnpm, and every lifecycle\n * script pnpm starts, run in that group. Its arguments are pnpm's entry and pnpm's arguments; pnpm\n * runs as its child with the same output, and its exit code is the install child's.\n */\nimport { spawn } from \"node:child_process\";\nimport { connectToSupervisor } from \"../../processes/index.ts\";\n\nconnectToSupervisor();\n\nconst [entry, ...args] = process.argv.slice(2);\nif (entry === undefined) {\n console.error(\"The install child needs the installer's entry as its first argument.\");\n process.exit(2);\n}\n// Not detached: pnpm stays in this child's process group (on Windows its Job Object), which the\n// supervisor and the disconnect rule both end as a whole. No console window opens on Windows.\nconst installer = spawn(process.execPath, [entry, ...args], {\n stdio: [\"ignore\", \"inherit\", \"inherit\"],\n windowsHide: true,\n});\ninstaller.on(\"error\", (error) => {\n console.error(`The installer couldn't start: ${error.message}`);\n process.exit(1);\n});\ninstaller.on(\"exit\", (code, signal) => {\n process.exit(code ?? (signal ? 1 : 0));\n});\n"],"mappings":";;;;;;;;;;;AAWA,oBAAoB;AAEpB,MAAM,CAAC,OAAO,GAAG,QAAQ,QAAQ,KAAK,MAAM,CAAC;AAC7C,IAAI,UAAU,KAAA,GAAW;CACvB,QAAQ,MAAM,sEAAsE;CACpF,QAAQ,KAAK,CAAC;AAChB;AAGA,MAAM,YAAY,MAAM,QAAQ,UAAU,CAAC,OAAO,GAAG,IAAI,GAAG;CAC1D,OAAO;EAAC;EAAU;EAAW;CAAS;CACtC,aAAa;AACf,CAAC;AACD,UAAU,GAAG,UAAU,UAAU;CAC/B,QAAQ,MAAM,iCAAiC,MAAM,SAAS;CAC9D,QAAQ,KAAK,CAAC;AAChB,CAAC;AACD,UAAU,GAAG,SAAS,MAAM,WAAW;CACrC,QAAQ,KAAK,SAAS,SAAS,IAAI,EAAE;AACvC,CAAC"}