Skip to content

@stephansama packages / @stephansama/auto-readme / data / loadActionData

Function: loadActionData()

ts
function loadActionData(
   actions, 
   file, 
   root): Promise<(
  | {
  action: "ACTION";
  actionYaml: ActionYaml;
  body?: undefined;
  isPnpm?: undefined;
  parameters: string[];
  pkgJson?: undefined;
  root?: undefined;
  workspaces?: undefined;
}
  | {
  action: "PKG";
  actionYaml?: undefined;
  body?: undefined;
  isPnpm?: undefined;
  parameters: string[];
  pkgJson: PackageJson;
  root?: undefined;
  workspaces?: undefined;
}
  | {
  action: "USAGE";
  actionYaml?: undefined;
  body?: undefined;
  isPnpm?: undefined;
  parameters: string[];
  pkgJson?: undefined;
  root?: undefined;
  workspaces?: undefined;
}
  | {
  action: "WORKSPACE";
  actionYaml?: undefined;
  body?: undefined;
  isPnpm: boolean;
  parameters: string[];
  pkgJson?: undefined;
  root: string;
  workspaces: Packages;
}
  | {
  action: "ZOD";
  actionYaml?: undefined;
  body: string;
  isPnpm?: undefined;
  parameters: string[];
  pkgJson?: undefined;
  root?: undefined;
  workspaces?: undefined;
})[]>;

Defined in: core/auto-readme/src/data.ts:35

Parameters

actions

object[]

file

string

root

string

Returns

Promise<( | { action: "ACTION"; actionYaml: ActionYaml; body?: undefined; isPnpm?: undefined; parameters: string[]; pkgJson?: undefined; root?: undefined; workspaces?: undefined; } | { action: "PKG"; actionYaml?: undefined; body?: undefined; isPnpm?: undefined; parameters: string[]; pkgJson: PackageJson; root?: undefined; workspaces?: undefined; } | { action: "USAGE"; actionYaml?: undefined; body?: undefined; isPnpm?: undefined; parameters: string[]; pkgJson?: undefined; root?: undefined; workspaces?: undefined; } | { action: "WORKSPACE"; actionYaml?: undefined; body?: undefined; isPnpm: boolean; parameters: string[]; pkgJson?: undefined; root: string; workspaces: Packages; } | { action: "ZOD"; actionYaml?: undefined; body: string; isPnpm?: undefined; parameters: string[]; pkgJson?: undefined; root?: undefined; workspaces?: undefined; })[]>

Released under MIT license