@qp-mongosh/async-rewriter2
Advanced tools
Comparing version 0.0.0-dev.25 to 0.0.0-dev.26
@@ -31,2 +31,3 @@ "use strict"; | ||
const runtime_support_nocov_1 = __importDefault(require("./runtime-support.nocov")); | ||
const disable_async_function_1 = __importDefault(require("./stages/disable-async-function")); | ||
const wrap_as_iife_1 = __importDefault(require("./stages/wrap-as-iife")); | ||
@@ -55,3 +56,3 @@ const uncatchable_exceptions_1 = __importDefault(require("./stages/uncatchable-exceptions")); | ||
process(code) { | ||
var _a, _b, _c, _d; | ||
var _a, _b, _c, _d, _e; | ||
try { | ||
@@ -61,12 +62,16 @@ let ast = (_a = this.step(undefined, code, [ | ||
require('@babel/plugin-transform-parameters').default, | ||
require('@babel/plugin-transform-destructuring').default | ||
require('@babel/plugin-transform-destructuring').default, | ||
])) === null || _a === void 0 ? void 0 : _a.ast; | ||
ast = (_b = this.step(ast, code, [wrap_as_iife_1.default])) === null || _b === void 0 ? void 0 : _b.ast; | ||
ast = (_c = this.step(ast, code, [uncatchable_exceptions_1.default])) === null || _c === void 0 ? void 0 : _c.ast; | ||
return (_d = this.step(ast, code, [ | ||
ast = (_b = this.step(ast, code, [disable_async_function_1.default])) === null || _b === void 0 ? void 0 : _b.ast; | ||
ast = (_c = this.step(ast, code, [wrap_as_iife_1.default])) === null || _c === void 0 ? void 0 : _c.ast; | ||
ast = (_d = this.step(ast, code, [uncatchable_exceptions_1.default])) === null || _d === void 0 ? void 0 : _d.ast; | ||
code = (_e = this.step(ast, code, [ | ||
[ | ||
transform_maybe_await_1.default, | ||
{ customErrorBuilder: babel.types.identifier('MongoshAsyncWriterError') } | ||
] | ||
], { code: true, ast: false })) === null || _d === void 0 ? void 0 : _d.code; | ||
{ | ||
customErrorBuilder: babel.types.identifier('MongoshAsyncWriterError'), | ||
}, | ||
], | ||
], { code: true, ast: false })) === null || _e === void 0 ? void 0 : _e.code; | ||
return code; | ||
} | ||
@@ -73,0 +78,0 @@ catch (e) { |
import * as babel from '@babel/core'; | ||
import * as BabelTypes from '@babel/types'; | ||
declare type WrapState = { | ||
type WrapState = { | ||
movedStatements: babel.types.Statement[]; | ||
@@ -5,0 +5,0 @@ functionDeclarations: babel.types.FunctionDeclaration[]; |
{ | ||
"name": "@qp-mongosh/async-rewriter2", | ||
"version": "0.0.0-dev.25", | ||
"version": "0.0.0-dev.26", | ||
"description": "MongoDB Shell Async Rewriter Package", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
Sorry, the diff of this file is not supported yet
98763
33
1055