我想反向或解包bundle.js.目前我正在浏览器中加载bundle.js(Chrome)Chrome检测到源图,并根据捆绑包向我展示了完整应用程序的一个很好的结构.该应用程序使用webpack进行捆绑,是一种助焊剂反应应用程序.
有没有办法从捆绑包中生成所有这些文件,以便我可以根据应用程序结构轻松浏览捆绑包?
这是一个逆向工程项目,用于从现有捆绑包中获取应用程序源.
所以在chrome中我可以使用devtools源很好地浏览整个应用程序.并查看所有单个文件.但我想在我的本地驱动器上创建完全相同的结构.
我试图像一个工具debundle但我不能找到一种方法,将sourcemap添加到这种转换?
因此,如果符合以下条件,我可以轻松地解开现有的bundle.js:
我有一个功能来调用谷歌语音API.看起来一切都很好,但我找不到为什么它给我错误.我是节点和承诺的初学者所以不确定为什么会出现这个错误.
ReferenceError:index未在index.js中定义:57
问题出在这部分代码中:
return speech
.longRunningRecognize(responses)
.then(function(results) {
var operation = responses[0];
console.log("Operation: ", operation);
return operation.promise();
})
.then(function(responses) {
resolve(responses[0]);
console.log("Result: ", JSON.stringify(responses[0]));
})
Run Code Online (Sandbox Code Playgroud)
承诺的地方
operation.promise()(第57行)
无法解决.它想要解决这个承诺,但看起来它找不到解析函数.
谷歌api的工作方式如下:
我感觉它的全部工作,呼叫已经完成,响应又回来了.代码等待,然后它想要解决,但它不能......
我的代码是这样的(它的云功能)
exports.transcribeAudio = functions.storage.object().onChange(event => {
const object = event.data;
const filePath = object.name;
const fileName = filePath.split("/").pop();
const fileBucket = object.bucket;
const bucket = gcs.bucket(fileBucket);
const tempFilePath = path.join(os.tmpdir(), fileName);
// Exit if this is triggered on a file that is not an image.
// Get …Run Code Online (Sandbox Code Playgroud)