| Server IP : 74.208.250.37 / Your IP : 216.73.216.233 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ubuntu 6.8.0-124-generic #124-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 13:00:45 UTC 2026 x86_64 User : miferval ( 1000) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/share/node_modules/@babel/eslint-parser/lib/worker/ |
Upload File : |
const babel = require("./babel-core.cjs");
const maybeParse = require("./maybeParse.cjs");
const {
getVisitorKeys,
getTokLabels
} = require("./ast-info.cjs");
const {
normalizeBabelParseConfig,
normalizeBabelParseConfigSync
} = require("./configuration.cjs");
module.exports = function handleMessage(action, payload) {
switch (action) {
case "GET_VERSION":
return babel.version;
case "GET_TYPES_INFO":
return {
FLOW_FLIPPED_ALIAS_KEYS: babel.types.FLIPPED_ALIAS_KEYS.Flow,
VISITOR_KEYS: babel.types.VISITOR_KEYS
};
case "GET_TOKEN_LABELS":
return getTokLabels();
case "GET_VISITOR_KEYS":
return getVisitorKeys();
case "MAYBE_PARSE":
return normalizeBabelParseConfig(payload.options).then(options => maybeParse(payload.code, options));
case "MAYBE_PARSE_SYNC":
{
return maybeParse(payload.code, normalizeBabelParseConfigSync(payload.options));
}
}
throw new Error(`Unknown internal parser worker action: ${action}`);
};
//# sourceMappingURL=handle-message.cjs.map