MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / getScriptInfo

Function getScriptInfo

e2e/user-config-yaml.spec.ts:53–67  ·  view source on GitHub ↗
(page: Page, name: string)

Source from the content-addressed store, hash-verified

51`;
52
53async function getScriptInfo(page: Page, name: string): Promise<{ uuid: string; config: any } | null> {
54 return page.evaluate((n: string) => {
55 return new Promise((resolve) => {
56 chrome.storage.local.get(null, (all) => {
57 for (const k of Object.keys(all)) {
58 if (k.startsWith("script:") && all[k]?.name === n) {
59 resolve({ uuid: all[k].uuid, config: all[k].config });
60 return;
61 }
62 }
63 resolve(null);
64 });
65 });
66 }, name);
67}
68
69test.describe("UserConfig YAML prototype pollution (#1494)", () => {
70 test("合法 @userConfig 正常安装、解析结构正确、配置面板可打开", async ({ context, extensionId }) => {

Callers 1

Calls 2

keysMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected