check in dist for testing

This commit is contained in:
Your Name
2025-04-18 19:51:20 -04:00
parent 4975dea12a
commit 94a822b782
11 changed files with 556 additions and 1 deletions
+2
View File
@@ -0,0 +1,2 @@
"use strict";(()=>{var i={writeFile:(n,t)=>"OK",writeFileAsync:async(n,t)=>"async OK"};chrome.runtime.onMessage.addListener((n,t,r)=>{let e=i[n.endpoint].apply(void 0,n.args);if(e instanceof Promise)return e.then(s=>{r(s)}),!0;if(e!==void 0)return r(e),!0});})();
//# sourceMappingURL=main.js.map
+7
View File
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../../src/worker/Endpoints.ts", "../../src/worker/main.ts"],
"sourcesContent": ["export const ExposedEndpoints = {\n writeFile: (filename: string, fileContent: string) => {\n return \"OK\"\n },\n\n writeFileAsync: async (path: string, fileContent: string) => {\n return \"async OK\"\n }\n} as const;", "import { ExposedEndpoints } from \"./Endpoints\";\n\nchrome.runtime.onMessage.addListener((param: { endpoint: keyof typeof ExposedEndpoints, args: any }, sender, sendReponse) => {\n const returnValue = (ExposedEndpoints[param.endpoint] as Function).apply(undefined, param.args)\n if(returnValue instanceof Promise){\n returnValue.then(value => {\n sendReponse(value)\n })\n return true;\n }\n if(returnValue !== undefined){\n sendReponse(returnValue)\n return true;\n }\n});"],
"mappings": "mBAAO,IAAMA,EAAmB,CAC5B,UAAW,CAACC,EAAkBC,IACnB,KAGX,eAAgB,MAAOC,EAAcD,IAC1B,UAEf,ECNA,OAAO,QAAQ,UAAU,YAAY,CAACE,EAA+DC,EAAQC,IAAgB,CACzH,IAAMC,EAAeC,EAAiBJ,EAAM,QAAQ,EAAe,MAAM,OAAWA,EAAM,IAAI,EAC9F,GAAGG,aAAuB,QACtB,OAAAA,EAAY,KAAKE,GAAS,CACtBH,EAAYG,CAAK,CACrB,CAAC,EACM,GAEX,GAAGF,IAAgB,OACf,OAAAD,EAAYC,CAAW,EAChB,EAEf,CAAC",
"names": ["ExposedEndpoints", "filename", "fileContent", "path", "param", "sender", "sendReponse", "returnValue", "ExposedEndpoints", "value"]
}