MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / cfList

Function cfList

apps/host-cloudflare/scripts/preview.ts:83–91  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

81
82/** Paginated GET that concatenates every page of `result`. */
83const cfList = async (path: string): Promise<any[]> => {
84 const all: any[] = [];
85 const separator = path.includes("?") ? "&" : "?";
86 for (let page = 1; ; page++) {
87 const items = await cfOk("GET", `${path}${separator}page=${page}&per_page=100`);
88 all.push(...items);
89 if (items.length < 100) return all;
90 }
91};
92
93const run = (command: string, args: string[], options?: { input?: string; cwd?: string }): void => {
94 const result = spawnSync(command, args, {

Callers 4

findD1Function · 0.85
findAccessAppFunction · 0.85
listFunction · 0.85
sweepE2eFunction · 0.85

Calls 2

cfOkFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected