@giteeteam/apps-runtime-vm
Advanced tools
Comparing version 0.8.1 to 0.8.2
@@ -77,3 +77,3 @@ "use strict"; | ||
globalThis.setTimeout = (fn, timeout) => $1(new $0.Reference(fn), timeout); | ||
`, [isolated_vm_1.default, (fn, timeout) => void setTimeout(() => fn.applySync(), timeout)]); | ||
`, [isolated_vm_1.default, (fn, timeout) => setTimeout(() => fn.applySync(), timeout)]); | ||
await Promise.all(Object.keys(runtimeApis).map(apiKey => { | ||
@@ -80,0 +80,0 @@ if (apiKey === 'axios') { |
@@ -84,5 +84,2 @@ "use strict"; | ||
} | ||
catch (e) { | ||
throw e; | ||
} | ||
finally { | ||
@@ -113,8 +110,3 @@ this.isolate.dispose(); | ||
try { | ||
const result = JSON.parse(resultStr); | ||
// if (result?.stack) { | ||
// const sourceFilename = `${filename}.map`; | ||
// result.stack = await transformStack(sourceFilename, result.stack); | ||
// } | ||
return result; | ||
return JSON.parse(resultStr); | ||
} | ||
@@ -151,3 +143,3 @@ catch (e) { | ||
} | ||
return await this.isolate.compileModule(''); | ||
return this.isolate.compileModule(''); | ||
// 使用throw会导致错误无法捕捉 | ||
@@ -154,0 +146,0 @@ // throw new Error(`Cannot import module '${specifier}'`); |
@@ -1,3 +0,3 @@ | ||
import type { SourceMapItem } from "../../types"; | ||
import type { SourceMapItem } from '../../types'; | ||
declare const parse: (sourceFileString: string) => Promise<SourceMapItem | undefined>; | ||
export default parse; |
@@ -28,5 +28,5 @@ "use strict"; | ||
// mappings中通过分号(;)区分打包后代码的行数 | ||
const lines = mappings.split(";"); | ||
for (let l = 0; l < lines.length; ++l) { | ||
const items = lines[l].split(","); | ||
const lines = mappings.split(';'); | ||
for (const line of lines) { | ||
const items = line.split(','); | ||
if (!items.length || !items[0]) { | ||
@@ -33,0 +33,0 @@ arr.push([]); |
{ | ||
"name": "@giteeteam/apps-runtime-vm", | ||
"version": "0.8.1", | ||
"version": "0.8.2", | ||
"description": "Giteeteam Apps Runtime VM", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
17765
461