@jigging/jig 0.1.0-alpha.13 → 0.1.0-alpha.14

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.
@@ -246,8 +246,12 @@ async function enterMain(arguments_) {
246
246
  writeSync(3, `${process.pid}
247
247
  `);
248
248
  closeSync(3);
249
- const output = bubblewrapArguments_.includes("--sync-fd");
250
- const inputDescriptors = bubblewrapArguments_.flatMap((arg, index) => arg === "--ro-bind-data" ? [Number(bubblewrapArguments_[index + 1])] : []);
249
+ const separator = bubblewrapArguments_.indexOf("--");
250
+ if (separator < 0)
251
+ throw new Error("missing rootless command boundary");
252
+ const envelopeArguments = bubblewrapArguments_.slice(0, separator);
253
+ const output = envelopeArguments.includes("--sync-fd");
254
+ const inputDescriptors = envelopeArguments.flatMap((arg, index) => arg === "--file" ? [Number(envelopeArguments[index + 1])] : []);
251
255
  if (inputDescriptors.some((fd, index) => fd !== 6 + index))
252
256
  throw new Error("invalid captured input descriptor order");
253
257
  const child = spawn(bubblewrap, bubblewrapArguments_, {
@@ -337,11 +341,11 @@ function bubblewrapArguments(configuration) {
337
341
  for (const mount of configuration.readOnlyMounts)
338
342
  result.push("--ro-bind", mount.source, mount.destination);
339
343
  if (configuration.inputDirectories.length > 0)
340
- result.push("--size", "1048576", "--tmpfs", "/jig-input");
344
+ result.push("--size", String(16 * 1024 * 1024), "--tmpfs", "/jig-input");
341
345
  for (const path of configuration.inputDirectories)
342
346
  result.push("--dir", path);
343
347
  for (const file of configuration.capturedInputs)
344
- result.push("--ro-bind-data", String(file.fd), file.destination);
348
+ result.push("--perms", "0444", "--file", String(file.fd), file.destination);
345
349
  if (configuration.inputDirectories.length > 0)
346
350
  result.push("--remount-ro", "/jig-input");
347
351
  if (configuration.output)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jigging/jig",
3
- "version": "0.1.0-alpha.13",
3
+ "version": "0.1.0-alpha.14",
4
4
  "description": "A local, secure host for admitted FLOW packages",
5
5
  "license": "MPL-2.0",
6
6
  "repository": {
@@ -42,6 +42,7 @@
42
42
  "dist/index.js",
43
43
  "dist/index.d.ts",
44
44
  "dist/project/author.d.ts",
45
+ "dist/project/commands.d.ts",
45
46
  "dist/json.d.ts",
46
47
  "libexec/installed-cli.js",
47
48
  "libexec/linux-rootless-supervisor.js",