Skip to content
1 min read · 280 words

Function: derivedRulesFromSrt()

ts
function derivedRulesFromSrt(input: {
  filesystemDisabled?: boolean;
  mandatoryDeny?: {
    allowGitConfig: boolean;
    dotGitWasDirectory?: boolean;
    entries: readonly string[];
    form: "glob" | "expanded-paths";
    searchDepth: number;
  };
  network?: {
    allowedDomains?: readonly string[];
    deniedDomains?: readonly string[];
    disabled?: boolean;
  };
  platform: "darwin" | "linux";
  read: {
    allowWithinDeny?: readonly string[];
    denyOnly: readonly string[];
  };
  write: {
    allowOnly: readonly string[];
    denyWithinAllow: readonly string[];
  };
}): DerivedRules;

Defined in: src/batteries/sandbox/node/fs_node.ts:248

Construct a derived snapshot from the shapes returned by SRT.

Parameters

ParameterTypeDescription
input{ filesystemDisabled?: boolean; mandatoryDeny?: { allowGitConfig: boolean; dotGitWasDirectory?: boolean; entries: readonly string[]; form: "glob" | "expanded-paths"; searchDepth: number; }; network?: { allowedDomains?: readonly string[]; deniedDomains?: readonly string[]; disabled?: boolean; }; platform: "darwin" | "linux"; read: { allowWithinDeny?: readonly string[]; denyOnly: readonly string[]; }; write: { allowOnly: readonly string[]; denyWithinAllow: readonly string[]; }; }-
input.filesystemDisabled?boolean-
input.mandatoryDeny?{ allowGitConfig: boolean; dotGitWasDirectory?: boolean; entries: readonly string[]; form: "glob" | "expanded-paths"; searchDepth: number; }-
input.mandatoryDeny.allowGitConfigboolean-
input.mandatoryDeny.dotGitWasDirectory?boolean-
input.mandatoryDeny.entriesreadonly string[]-
input.mandatoryDeny.form"glob" | "expanded-paths"-
input.mandatoryDeny.searchDepthnumber-
input.network?{ allowedDomains?: readonly string[]; deniedDomains?: readonly string[]; disabled?: boolean; }-
input.network.allowedDomains?readonly string[]-
input.network.deniedDomains?readonly string[]-
input.network.disabled?booleanOURS, not upstream's: true only when WE constructed the session in disabled mode.
input.platform"darwin" | "linux"-
input.read{ allowWithinDeny?: readonly string[]; denyOnly: readonly string[]; }-
input.read.allowWithinDeny?readonly string[]-
input.read.denyOnlyreadonly string[]-
input.write{ allowOnly: readonly string[]; denyWithinAllow: readonly string[]; }-
input.write.allowOnlyreadonly string[]-
input.write.denyWithinAllowreadonly string[]-

Returns

DerivedRules