proscenium 0.25.0-aarch64-linux → 0.25.1-aarch64-linux
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.
- checksums.yaml +4 -4
- data/lib/proscenium/ext/proscenium +0 -0
- data/lib/proscenium/runtime/bootstrap.js +13 -4
- data/lib/proscenium/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d23908bfb07f9a96c2e0db6bb611fd675a22472d3c2d28167c5cddd9279a5c2d
|
|
4
|
+
data.tar.gz: 3e284c4b24cec6804bb5c3729b8610ced1a44415cdb912bc245692341f1f4f8f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f32120576c31bd621a6cf6408545ccaee2855371e9dafa6559957f5103c764d8d1e1d0087976529e0fd3b1a56dd58afbcb25338d48931c1d8e8b6920551afc4a
|
|
7
|
+
data.tar.gz: f40aa21301ec9da6d37e80bcad44c7c2aa7f47f25d2a6570ebdc1012f0af8b1b39b6797471996ccf0bbca6515d26e05e62cb5cb7aad4fad7fa86754c4f29fdd6
|
|
Binary file
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// protocol, the spawn, and the failure handling all live here and travel with the gem rather than
|
|
5
5
|
// being copy-pasted into every app and drifting.
|
|
6
6
|
|
|
7
|
-
import { mkdtempSync, rmSync } from "node:fs";
|
|
7
|
+
import { mkdirSync, mkdtempSync, rmSync } from "node:fs";
|
|
8
8
|
import { join } from "node:path";
|
|
9
9
|
|
|
10
10
|
const DEFAULT_TIMEOUT_MS = 30_000;
|
|
@@ -101,8 +101,16 @@ class Daemon {
|
|
|
101
101
|
* named error with Rails' own stderr already on the terminal.
|
|
102
102
|
*/
|
|
103
103
|
async function spawnDaemon({ env, timeoutMs }) {
|
|
104
|
-
//
|
|
105
|
-
//
|
|
104
|
+
// A path relative to this process' cwd, not an absolute one. A unix socket path is capped at 104
|
|
105
|
+
// bytes on macOS and 108 on Linux - `sun_path` is a fixed-size array inside `sockaddr_un`, sized
|
|
106
|
+
// to fit a 4.2BSD mbuf and frozen ever since by ABI - and the kernel only ever sees the bytes
|
|
107
|
+
// handed to `bind`/`connect`. So `tmp/proscenium/d-XXXXXX/d.sock` spends 30 of them wherever the
|
|
108
|
+
// app lives, where the absolute equivalent spends 30 plus the app's own path and a CI checkout or
|
|
109
|
+
// a nested monorepo package clears the cap on its own.
|
|
110
|
+
//
|
|
111
|
+
// `Bun.spawn` below is given no `cwd`, so the daemon inherits this one and both ends resolve the
|
|
112
|
+
// same relative path by construction. A `chdir` between here and `connect` would break that, and
|
|
113
|
+
// surfaces as the startup timeout further down.
|
|
106
114
|
//
|
|
107
115
|
// The directory is created exclusively and 0700, and the socket lives inside it, because the
|
|
108
116
|
// name alone is no protection: the full path is passed as `rails runner` argv below, so `ps`
|
|
@@ -110,7 +118,8 @@ async function spawnDaemon({ env, timeoutMs }) {
|
|
|
110
118
|
// seconds Rails takes to boot, with no way to tell its own child from a squatter. Whoever binds
|
|
111
119
|
// first answers every `build`, and a `build` reply is JavaScript this process executes. Same
|
|
112
120
|
// reasoning, and the same fix, as the gem-dir file in the preload template.
|
|
113
|
-
|
|
121
|
+
mkdirSync("tmp/proscenium", { recursive: true });
|
|
122
|
+
const socketDir = mkdtempSync(join("tmp", "proscenium", "d-"));
|
|
114
123
|
// Must match Server::SOCKET_NAME. The daemon is handed the directory, not the path.
|
|
115
124
|
const socketPath = join(socketDir, "d.sock");
|
|
116
125
|
|
data/lib/proscenium/version.rb
CHANGED