mirror of
https://github.com/swc-project/swc.git
synced 2024-11-23 00:32:15 +03:00
fix(es/compat): Revert generator reimplementation (#5624)
This commit is contained in:
parent
7c473405b9
commit
927ae7e8d3
@ -1,29 +0,0 @@
|
||||
|
||||
|
||||
function* foo() {
|
||||
const obj = {
|
||||
a: 1,
|
||||
b: yield true,
|
||||
c: 2,
|
||||
};
|
||||
|
||||
expect(obj.b).toEqual(1);
|
||||
|
||||
yield 2;
|
||||
|
||||
return obj.c;
|
||||
}
|
||||
|
||||
const g = foo();
|
||||
expect(g.next(0)).toEqual({
|
||||
value: true,
|
||||
done: false,
|
||||
})
|
||||
expect(g.next(1)).toEqual({
|
||||
value: 2,
|
||||
done: false,
|
||||
})
|
||||
expect(g.next()).toEqual({
|
||||
done: true,
|
||||
value: 2
|
||||
})
|
@ -1,29 +0,0 @@
|
||||
|
||||
|
||||
function* foo() {
|
||||
const arr = [
|
||||
1,
|
||||
yield true,
|
||||
2,
|
||||
];
|
||||
|
||||
expect(arr[1]).toEqual(1);
|
||||
|
||||
yield 2;
|
||||
|
||||
return arr[2];
|
||||
}
|
||||
|
||||
const g = foo();
|
||||
expect(g.next(0)).toEqual({
|
||||
value: true,
|
||||
done: false,
|
||||
})
|
||||
expect(g.next(1)).toEqual({
|
||||
value: 2,
|
||||
done: false,
|
||||
})
|
||||
expect(g.next()).toEqual({
|
||||
done: true,
|
||||
value: 2
|
||||
})
|
@ -1,31 +0,0 @@
|
||||
|
||||
|
||||
function* foo() {
|
||||
const obj = {
|
||||
a: 1,
|
||||
get foo() { },
|
||||
b: yield true,
|
||||
set foo(v) { },
|
||||
c: 2,
|
||||
};
|
||||
|
||||
expect(obj.b).toEqual(1);
|
||||
|
||||
yield 2;
|
||||
|
||||
return obj.c;
|
||||
}
|
||||
|
||||
const g = foo();
|
||||
expect(g.next(0)).toEqual({
|
||||
value: true,
|
||||
done: false,
|
||||
})
|
||||
expect(g.next(1)).toEqual({
|
||||
value: 2,
|
||||
done: false,
|
||||
})
|
||||
expect(g.next()).toEqual({
|
||||
done: true,
|
||||
value: 2
|
||||
})
|
@ -1,29 +1,20 @@
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "custom";
|
||||
var _marked = /*#__PURE__*/ regeneratorRuntime.mark(gen);
|
||||
function gen() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
return regeneratorRuntime.wrap(function gen$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
return [
|
||||
4,
|
||||
1
|
||||
];
|
||||
case 1:
|
||||
_state.sent();
|
||||
return [
|
||||
4,
|
||||
2
|
||||
];
|
||||
_ctx.next = 2;
|
||||
return 1;
|
||||
case 2:
|
||||
_state.sent();
|
||||
return [
|
||||
4,
|
||||
3
|
||||
];
|
||||
case 3:
|
||||
_state.sent();
|
||||
return [
|
||||
2
|
||||
];
|
||||
_ctx.next = 4;
|
||||
return 2;
|
||||
case 4:
|
||||
_ctx.next = 6;
|
||||
return 3;
|
||||
case 6:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
});
|
||||
}, _marked);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var source = Math.random() < 2 ? "matilda" : "fred";
|
||||
var details = {
|
||||
_id: "1"
|
||||
@ -8,45 +8,44 @@ function request(path) {
|
||||
return _request.apply(this, arguments);
|
||||
}
|
||||
function _request() {
|
||||
_request = _async_to_generator(function(path) {
|
||||
return _ts_generator(this, function(_state) {
|
||||
return [
|
||||
2,
|
||||
"success:".concat(path)
|
||||
];
|
||||
});
|
||||
});
|
||||
_request = _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee(path) {
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
return _ctx.abrupt("return", "success:".concat(path));
|
||||
case 1:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
return _request.apply(this, arguments);
|
||||
}
|
||||
_async_to_generator(function() {
|
||||
var obj, _tmp, _tmp1;
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
_async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
var obj;
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
if (!(source === "matilda")) return [
|
||||
3,
|
||||
1
|
||||
];
|
||||
_tmp = details;
|
||||
return [
|
||||
3,
|
||||
3
|
||||
];
|
||||
case 1:
|
||||
return [
|
||||
4,
|
||||
request("/".concat(details._id, "?source=").concat(source))
|
||||
];
|
||||
case 2:
|
||||
_tmp = _state.sent();
|
||||
_state.label = 3;
|
||||
case 3:
|
||||
obj = _tmp;
|
||||
_tmp1 = {};
|
||||
console.log((_tmp1.obj = obj, _tmp1));
|
||||
return [
|
||||
2
|
||||
];
|
||||
if (!(source === "matilda")) {
|
||||
_ctx.next = 4;
|
||||
break;
|
||||
}
|
||||
_ctx.t0 = details;
|
||||
_ctx.next = 7;
|
||||
break;
|
||||
case 4:
|
||||
_ctx.next = 6;
|
||||
return request("/".concat(details._id, "?source=").concat(source));
|
||||
case 6:
|
||||
_ctx.t0 = _ctx.sent;
|
||||
case 7:
|
||||
obj = _ctx.t0;
|
||||
console.log({
|
||||
obj: obj
|
||||
});
|
||||
})();
|
||||
case 9:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}))();
|
||||
|
@ -1,5 +1,5 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var source = Math.random() < 2 ? "matilda" : "fred";
|
||||
var details = {
|
||||
_id: "1"
|
||||
@ -8,45 +8,44 @@ function request(path) {
|
||||
return _request.apply(this, arguments);
|
||||
}
|
||||
function _request() {
|
||||
_request = _async_to_generator(function(path) {
|
||||
return _ts_generator(this, function(_state) {
|
||||
return [
|
||||
2,
|
||||
"success:".concat(path)
|
||||
];
|
||||
});
|
||||
});
|
||||
_request = _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee(path) {
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
return _ctx.abrupt("return", "success:".concat(path));
|
||||
case 1:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
return _request.apply(this, arguments);
|
||||
}
|
||||
_async_to_generator(function() {
|
||||
var obj, _tmp, _tmp1;
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
_async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
var obj;
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
if (!(source === "matilda")) return [
|
||||
3,
|
||||
1
|
||||
];
|
||||
_tmp = details;
|
||||
return [
|
||||
3,
|
||||
3
|
||||
];
|
||||
case 1:
|
||||
return [
|
||||
4,
|
||||
request("/".concat(details._id, "?source=").concat(source))
|
||||
];
|
||||
case 2:
|
||||
_tmp = _state.sent();
|
||||
_state.label = 3;
|
||||
case 3:
|
||||
obj = _tmp;
|
||||
_tmp1 = {};
|
||||
console.log((_tmp1.obj = obj, _tmp1));
|
||||
return [
|
||||
2
|
||||
];
|
||||
if (!(source === "matilda")) {
|
||||
_ctx.next = 4;
|
||||
break;
|
||||
}
|
||||
_ctx.t0 = details;
|
||||
_ctx.next = 7;
|
||||
break;
|
||||
case 4:
|
||||
_ctx.next = 6;
|
||||
return request("/".concat(details._id, "?source=").concat(source));
|
||||
case 6:
|
||||
_ctx.t0 = _ctx.sent;
|
||||
case 7:
|
||||
obj = _ctx.t0;
|
||||
console.log({
|
||||
obj: obj
|
||||
});
|
||||
})();
|
||||
case 9:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}))();
|
||||
|
@ -1,35 +1,32 @@
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var _marked = /*#__PURE__*/ regeneratorRuntime.mark(foo);
|
||||
function foo() {
|
||||
var val, _tmp, _tmp1;
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
var val;
|
||||
return regeneratorRuntime.wrap(function foo$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
if (!true) return [
|
||||
3,
|
||||
1
|
||||
];
|
||||
_tmp = 1;
|
||||
return [
|
||||
3,
|
||||
3
|
||||
];
|
||||
case 1:
|
||||
return [
|
||||
4,
|
||||
0
|
||||
];
|
||||
case 2:
|
||||
_tmp = _state.sent();
|
||||
_state.label = 3;
|
||||
case 3:
|
||||
val = _tmp;
|
||||
_tmp1 = {};
|
||||
console.log((_tmp1.val = val, _tmp1));
|
||||
return [
|
||||
2
|
||||
];
|
||||
if (!true) {
|
||||
_ctx.next = 4;
|
||||
break;
|
||||
}
|
||||
_ctx.t0 = 1;
|
||||
_ctx.next = 7;
|
||||
break;
|
||||
case 4:
|
||||
_ctx.next = 6;
|
||||
return 0;
|
||||
case 6:
|
||||
_ctx.t0 = _ctx.sent;
|
||||
case 7:
|
||||
val = _ctx.t0;
|
||||
console.log({
|
||||
val: val
|
||||
});
|
||||
case 9:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _marked);
|
||||
}
|
||||
var v = foo();
|
||||
console.log(v.next());
|
||||
|
@ -1,19 +1,21 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _throw from "@swc/helpers/src/_throw.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
function foo() {
|
||||
return _foo.apply(this, arguments);
|
||||
}
|
||||
function _foo() {
|
||||
_foo = _async_to_generator(function() {
|
||||
var tmp, ref, ref, _tmp;
|
||||
return _ts_generator(this, function(_state) {
|
||||
_tmp = {};
|
||||
tmp = baz.bar, ref = tmp === void 0 ? _tmp : tmp, ref = ref !== null ? ref : _throw(new TypeError("Cannot destructure undefined"));
|
||||
return [
|
||||
2
|
||||
];
|
||||
});
|
||||
});
|
||||
_foo = _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
var tmp, ref, ref;
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
tmp = baz.bar, ref = tmp === void 0 ? {} : tmp, ref = ref !== null ? ref : _throw(new TypeError("Cannot destructure undefined"));
|
||||
case 1:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
return _foo.apply(this, arguments);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var obj = {
|
||||
find: function find(param) {
|
||||
var platform = param.platform;
|
||||
@ -8,27 +8,26 @@ var obj = {
|
||||
};
|
||||
},
|
||||
byPlatform: function() {
|
||||
var _ref = _async_to_generator(function(platform) {
|
||||
var result, _tmp;
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
var _ref = _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee(platform) {
|
||||
var result;
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
_tmp = {};
|
||||
return [
|
||||
4,
|
||||
this.find((_tmp.platform = {
|
||||
_ctx.next = 2;
|
||||
return this.find({
|
||||
platform: {
|
||||
$eq: platform
|
||||
}, _tmp))
|
||||
];
|
||||
case 1:
|
||||
result = _state.sent();
|
||||
return [
|
||||
2,
|
||||
result
|
||||
];
|
||||
}
|
||||
});
|
||||
});
|
||||
case 2:
|
||||
result = _ctx.sent;
|
||||
return _ctx.abrupt("return", result);
|
||||
case 4:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee, this);
|
||||
}));
|
||||
return function(platform) {
|
||||
return _ref.apply(this, arguments);
|
||||
};
|
||||
|
@ -1,18 +1,21 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _sliced_to_array from "@swc/helpers/src/_sliced_to_array.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
function f(a, b) {
|
||||
return _f.apply(this, arguments);
|
||||
}
|
||||
function _f() {
|
||||
_f = _async_to_generator(function(a, b) {
|
||||
_f = _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee(a, b) {
|
||||
var ref, ref1, tmp, a_;
|
||||
return _ts_generator(this, function(_state) {
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
ref = _sliced_to_array(JSON.parse(b), 1), ref1 = ref[0], tmp = ref1.a, a_ = tmp === void 0 ? 1 : tmp;
|
||||
return [
|
||||
2
|
||||
];
|
||||
});
|
||||
});
|
||||
case 1:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
return _f.apply(this, arguments);
|
||||
}
|
||||
|
@ -1,16 +1,19 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
Vue.component("test", {
|
||||
methods: {
|
||||
onSend: function onSend() {
|
||||
return _async_to_generator(function() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
return _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
if (this.msg === "") {}
|
||||
return [
|
||||
2
|
||||
];
|
||||
});
|
||||
}).apply(this);
|
||||
case 1:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee, this);
|
||||
})).apply(this);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -1,16 +1,19 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var obj = {
|
||||
foo: 5,
|
||||
method: function method() {
|
||||
return _async_to_generator(function() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
return [
|
||||
2,
|
||||
this.foo
|
||||
];
|
||||
});
|
||||
}).apply(this);
|
||||
return _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
return _ctx.abrupt("return", this.foo);
|
||||
case 1:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee, this);
|
||||
})).apply(this);
|
||||
}
|
||||
};
|
||||
obj.method().then(function(v) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _sliced_to_array from "@swc/helpers/src/_sliced_to_array.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import "core-js/modules/es.object.to-string.js";
|
||||
import "core-js/modules/es.promise.js";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
||||
import { useEffect, useState } from "react";
|
||||
import { render } from "react-dom";
|
||||
@ -11,24 +11,22 @@ import { Button, ConfigProvider } from "antd";
|
||||
function App() {
|
||||
var ref = _sliced_to_array(useState({}), 2), state = ref[0], setState = ref[1];
|
||||
useEffect(function() {
|
||||
_async_to_generator(function() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
_async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
return [
|
||||
4,
|
||||
fetch("/api/user")
|
||||
];
|
||||
case 1:
|
||||
setState.apply(void 0, [
|
||||
_state.sent()
|
||||
]);
|
||||
return [
|
||||
2
|
||||
];
|
||||
_ctx.t0 = setState;
|
||||
_ctx.next = 3;
|
||||
return fetch("/api/user");
|
||||
case 3:
|
||||
_ctx.t1 = _ctx.sent;
|
||||
(0, _ctx.t0)(_ctx.t1);
|
||||
case 5:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
});
|
||||
})();
|
||||
}, _callee);
|
||||
}))();
|
||||
}, []);
|
||||
return /*#__PURE__*/ _jsxs(ConfigProvider, {
|
||||
locale: zhCN,
|
||||
|
@ -1,101 +1,93 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
function scanUser(groups) {
|
||||
return _scanUser.apply(this, arguments);
|
||||
}
|
||||
function _scanUser() {
|
||||
_scanUser = _async_to_generator(function(groups) {
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
_scanUser = _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee(groups) {
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
return [
|
||||
4,
|
||||
Promise.all(groups.map(function() {
|
||||
var _ref = _async_to_generator(function(param) {
|
||||
var users, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, user, err;
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
_ctx.next = 2;
|
||||
return Promise.all(groups.map(function() {
|
||||
var _ref = _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee(param) {
|
||||
var users, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, user;
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
users = param.users;
|
||||
_iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
||||
_state.label = 1;
|
||||
case 1:
|
||||
_state.trys.push([
|
||||
1,
|
||||
6,
|
||||
7,
|
||||
8
|
||||
]);
|
||||
_ctx.prev = 2;
|
||||
_iterator = users[Symbol.iterator]();
|
||||
_state.label = 2;
|
||||
case 2:
|
||||
if (!!(_iteratorNormalCompletion = (_step = _iterator.next()).done)) return [
|
||||
3,
|
||||
5
|
||||
];
|
||||
case 4:
|
||||
if (_iteratorNormalCompletion = (_step = _iterator.next()).done) {
|
||||
_ctx.next = 12;
|
||||
break;
|
||||
}
|
||||
user = _step.value;
|
||||
console.log("user", user);
|
||||
return [
|
||||
4,
|
||||
new Promise(function(resolve) {
|
||||
_ctx.next = 9;
|
||||
return new Promise(function(resolve) {
|
||||
return setTimeout(resolve, 30);
|
||||
})
|
||||
];
|
||||
case 3:
|
||||
_state.sent();
|
||||
_state.label = 4;
|
||||
case 4:
|
||||
});
|
||||
case 9:
|
||||
_iteratorNormalCompletion = true;
|
||||
return [
|
||||
3,
|
||||
2
|
||||
];
|
||||
case 5:
|
||||
return [
|
||||
3,
|
||||
8
|
||||
];
|
||||
case 6:
|
||||
err = _state.sent();
|
||||
_ctx.next = 4;
|
||||
break;
|
||||
case 12:
|
||||
_ctx.next = 18;
|
||||
break;
|
||||
case 14:
|
||||
_ctx.prev = 14;
|
||||
_ctx.t0 = _ctx["catch"](2);
|
||||
_didIteratorError = true;
|
||||
_iteratorError = err;
|
||||
return [
|
||||
3,
|
||||
8
|
||||
];
|
||||
case 7:
|
||||
try {
|
||||
_iteratorError = _ctx.t0;
|
||||
case 18:
|
||||
_ctx.prev = 18;
|
||||
_ctx.prev = 19;
|
||||
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
||||
_iterator.return();
|
||||
}
|
||||
} finally{
|
||||
if (_didIteratorError) {
|
||||
case 21:
|
||||
_ctx.prev = 21;
|
||||
if (!_didIteratorError) {
|
||||
_ctx.next = 24;
|
||||
break;
|
||||
}
|
||||
throw _iteratorError;
|
||||
case 24:
|
||||
return _ctx.finish(21);
|
||||
case 25:
|
||||
return _ctx.finish(18);
|
||||
case 26:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}
|
||||
return [
|
||||
7
|
||||
];
|
||||
case 8:
|
||||
return [
|
||||
2
|
||||
];
|
||||
}
|
||||
});
|
||||
});
|
||||
}, _callee, null, [
|
||||
[
|
||||
2,
|
||||
14,
|
||||
18,
|
||||
26
|
||||
],
|
||||
[
|
||||
19,
|
||||
,
|
||||
21,
|
||||
25
|
||||
]
|
||||
]);
|
||||
}));
|
||||
return function(_) {
|
||||
return _ref.apply(this, arguments);
|
||||
};
|
||||
}()))
|
||||
];
|
||||
case 1:
|
||||
_state.sent();
|
||||
return [
|
||||
2
|
||||
];
|
||||
}()));
|
||||
case 2:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
});
|
||||
});
|
||||
}, _callee);
|
||||
}));
|
||||
return _scanUser.apply(this, arguments);
|
||||
}
|
||||
scanUser([
|
||||
|
@ -1,30 +1,23 @@
|
||||
import _wrap_async_generator from "@swc/helpers/src/_wrap_async_generator.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
function lol() {
|
||||
return _lol.apply(this, arguments);
|
||||
}
|
||||
function _lol() {
|
||||
_lol = _wrap_async_generator(function() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
_lol = _wrap_async_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
return [
|
||||
4,
|
||||
1
|
||||
];
|
||||
case 1:
|
||||
_state.sent();
|
||||
return [
|
||||
4,
|
||||
2
|
||||
];
|
||||
_ctx.next = 2;
|
||||
return 1;
|
||||
case 2:
|
||||
_state.sent();
|
||||
return [
|
||||
2
|
||||
];
|
||||
_ctx.next = 4;
|
||||
return 2;
|
||||
case 4:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
});
|
||||
});
|
||||
}, _callee);
|
||||
}));
|
||||
return _lol.apply(this, arguments);
|
||||
}
|
||||
|
@ -1,129 +1,104 @@
|
||||
import _async_iterator from "@swc/helpers/src/_async_iterator.mjs";
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _wrap_async_generator from "@swc/helpers/src/_wrap_async_generator.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
function lol() {
|
||||
return _lol.apply(this, arguments);
|
||||
}
|
||||
function _lol() {
|
||||
_lol = _wrap_async_generator(function() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
_lol = _wrap_async_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
return [
|
||||
4,
|
||||
1
|
||||
];
|
||||
case 1:
|
||||
_state.sent();
|
||||
return [
|
||||
4,
|
||||
2
|
||||
];
|
||||
_ctx.next = 2;
|
||||
return 1;
|
||||
case 2:
|
||||
_state.sent();
|
||||
return [
|
||||
2
|
||||
];
|
||||
_ctx.next = 4;
|
||||
return 2;
|
||||
case 4:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
});
|
||||
});
|
||||
}, _callee);
|
||||
}));
|
||||
return _lol.apply(this, arguments);
|
||||
}
|
||||
function main() {
|
||||
return _main.apply(this, arguments);
|
||||
}
|
||||
function _main() {
|
||||
_main = _async_to_generator(function() {
|
||||
var _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, x, err;
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
_main = _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
var _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, x;
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
_iteratorAbruptCompletion = false, _didIteratorError = false;
|
||||
_state.label = 1;
|
||||
case 1:
|
||||
_state.trys.push([
|
||||
1,
|
||||
6,
|
||||
7,
|
||||
12
|
||||
]);
|
||||
_ctx.prev = 1;
|
||||
_iterator = _async_iterator(lol());
|
||||
_state.label = 2;
|
||||
case 2:
|
||||
return [
|
||||
4,
|
||||
_iterator.next()
|
||||
];
|
||||
case 3:
|
||||
if (!(_iteratorAbruptCompletion = !(_step = _state.sent()).done)) return [
|
||||
3,
|
||||
5
|
||||
];
|
||||
_ctx.next = 5;
|
||||
return _iterator.next();
|
||||
case 5:
|
||||
if (!(_iteratorAbruptCompletion = !(_step = _ctx.sent).done)) {
|
||||
_ctx.next = 10;
|
||||
break;
|
||||
}
|
||||
{
|
||||
_value = _step.value;
|
||||
x = _value;
|
||||
console.log(x);
|
||||
_state.label = 4;
|
||||
case 4:
|
||||
_iteratorAbruptCompletion = false;
|
||||
return [
|
||||
3,
|
||||
2
|
||||
];
|
||||
case 5:
|
||||
return [
|
||||
3,
|
||||
12
|
||||
];
|
||||
case 6:
|
||||
err = _state.sent();
|
||||
_didIteratorError = true;
|
||||
_iteratorError = err;
|
||||
return [
|
||||
3,
|
||||
12
|
||||
];
|
||||
}
|
||||
case 7:
|
||||
_state.trys.push([
|
||||
7,
|
||||
,
|
||||
10,
|
||||
11
|
||||
]);
|
||||
if (!(_iteratorAbruptCompletion && _iterator.return != null)) return [
|
||||
3,
|
||||
9
|
||||
];
|
||||
return [
|
||||
4,
|
||||
_iterator.return()
|
||||
];
|
||||
case 8:
|
||||
_state.sent();
|
||||
_state.label = 9;
|
||||
case 9:
|
||||
return [
|
||||
3,
|
||||
11
|
||||
];
|
||||
_iteratorAbruptCompletion = false;
|
||||
_ctx.next = 3;
|
||||
break;
|
||||
case 10:
|
||||
if (_didIteratorError) {
|
||||
throw _iteratorError;
|
||||
}
|
||||
return [
|
||||
7
|
||||
];
|
||||
case 11:
|
||||
return [
|
||||
7
|
||||
];
|
||||
_ctx.next = 16;
|
||||
break;
|
||||
case 12:
|
||||
return [
|
||||
2
|
||||
];
|
||||
_ctx.prev = 12;
|
||||
_ctx.t0 = _ctx["catch"](1);
|
||||
_didIteratorError = true;
|
||||
_iteratorError = _ctx.t0;
|
||||
case 16:
|
||||
_ctx.prev = 16;
|
||||
_ctx.prev = 17;
|
||||
if (!(_iteratorAbruptCompletion && _iterator.return != null)) {
|
||||
_ctx.next = 21;
|
||||
break;
|
||||
}
|
||||
});
|
||||
});
|
||||
_ctx.next = 21;
|
||||
return _iterator.return();
|
||||
case 21:
|
||||
_ctx.prev = 21;
|
||||
if (!_didIteratorError) {
|
||||
_ctx.next = 24;
|
||||
break;
|
||||
}
|
||||
throw _iteratorError;
|
||||
case 24:
|
||||
return _ctx.finish(21);
|
||||
case 25:
|
||||
return _ctx.finish(16);
|
||||
case 26:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee, null, [
|
||||
[
|
||||
1,
|
||||
12,
|
||||
16,
|
||||
26
|
||||
],
|
||||
[
|
||||
17,
|
||||
,
|
||||
21,
|
||||
25
|
||||
]
|
||||
]);
|
||||
}));
|
||||
return _main.apply(this, arguments);
|
||||
}
|
||||
main();
|
||||
|
@ -1,14 +1,17 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
(function() {
|
||||
var _main = _async_to_generator(function() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
var _main = _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
console.log(1);
|
||||
return [
|
||||
2
|
||||
];
|
||||
});
|
||||
});
|
||||
case 1:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
function main() {
|
||||
return _main.apply(this, arguments);
|
||||
}
|
||||
|
@ -10,26 +10,22 @@ Object.defineProperty(exports, "default", {
|
||||
});
|
||||
var _asyncToGenerator = require("@swc/helpers/lib/_async_to_generator.js").default;
|
||||
var _interopRequireDefault = require("@swc/helpers/lib/_interop_require_default.js").default;
|
||||
var _tsGenerator = require("@swc/helpers/lib/_ts_generator.js").default;
|
||||
var _regeneratorRuntime = /*#__PURE__*/ _interopRequireDefault(require("regenerator-runtime"));
|
||||
var _react = /*#__PURE__*/ _interopRequireDefault(require("react"));
|
||||
function Foo() {
|
||||
return /*#__PURE__*/ _react.default.createElement("div", {
|
||||
onClick: /*#__PURE__*/ _asyncToGenerator(function(e) {
|
||||
return _tsGenerator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
onClick: /*#__PURE__*/ _asyncToGenerator(/*#__PURE__*/ _regeneratorRuntime.default.mark(function _callee(e) {
|
||||
return _regeneratorRuntime.default.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
return [
|
||||
4,
|
||||
doSomething()
|
||||
];
|
||||
case 1:
|
||||
_state.sent();
|
||||
return [
|
||||
2
|
||||
];
|
||||
_ctx.next = 2;
|
||||
return doSomething();
|
||||
case 2:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
});
|
||||
})
|
||||
}, _callee);
|
||||
}))
|
||||
});
|
||||
}
|
||||
Foo.displayName = "Foo";
|
||||
|
@ -10,24 +10,20 @@ Object.defineProperty(exports, "default", {
|
||||
});
|
||||
var _asyncToGenerator = require("@swc/helpers/lib/_async_to_generator.js").default;
|
||||
var _interopRequireDefault = require("@swc/helpers/lib/_interop_require_default.js").default;
|
||||
var _tsGenerator = require("@swc/helpers/lib/_ts_generator.js").default;
|
||||
var _regeneratorRuntime = /*#__PURE__*/ _interopRequireDefault(require("regenerator-runtime"));
|
||||
var _react = /*#__PURE__*/ _interopRequireDefault(require("react"));
|
||||
function Foo() {
|
||||
return call(/*#__PURE__*/ _asyncToGenerator(function(e) {
|
||||
return _tsGenerator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
return call(/*#__PURE__*/ _asyncToGenerator(/*#__PURE__*/ _regeneratorRuntime.default.mark(function _callee(e) {
|
||||
return _regeneratorRuntime.default.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
return [
|
||||
4,
|
||||
doSomething()
|
||||
];
|
||||
case 1:
|
||||
_state.sent();
|
||||
return [
|
||||
2
|
||||
];
|
||||
_ctx.next = 2;
|
||||
return doSomething();
|
||||
case 2:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
});
|
||||
}));
|
||||
}, _callee);
|
||||
})));
|
||||
}
|
||||
Foo.displayName = "Foo";
|
||||
|
@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _defineProperty = require("@swc/helpers/lib/_define_property.js").default;
|
||||
var _tsGenerator = require("@swc/helpers/lib/_ts_generator.js").default;
|
||||
var _interopRequireDefault = require("@swc/helpers/lib/_interop_require_default.js").default;
|
||||
var _regeneratorRuntime = /*#__PURE__*/ _interopRequireDefault(require("regenerator-runtime"));
|
||||
function _asyncIterator(iterable) {
|
||||
var method;
|
||||
if (typeof Symbol === "function") {
|
||||
@ -47,159 +48,137 @@ function _asyncToGenerator(fn) {
|
||||
});
|
||||
};
|
||||
}
|
||||
_asyncToGenerator(function() {
|
||||
var counter, resolve, promise, iterable, _tmp, res, _i, _iter, v, oldresolve, _tmp1, _tmp2;
|
||||
return _tsGenerator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
_asyncToGenerator(/*#__PURE__*/ _regeneratorRuntime.default.mark(function _callee() {
|
||||
var counter, resolve, promise, iterable, res, _i, _iter, v, oldresolve;
|
||||
return _regeneratorRuntime.default.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
counter = 0;
|
||||
;
|
||||
promise = new Promise(function(r) {
|
||||
return resolve = r;
|
||||
});
|
||||
_tmp = {};
|
||||
iterable = _defineProperty(_tmp, Symbol.asyncIterator, function() {
|
||||
iterable = _defineProperty({}, Symbol.asyncIterator, function() {
|
||||
return {
|
||||
next: function next() {
|
||||
return promise;
|
||||
}
|
||||
};
|
||||
});
|
||||
res = _asyncToGenerator(function() {
|
||||
var _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, value, err;
|
||||
return _tsGenerator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
res = _asyncToGenerator(/*#__PURE__*/ _regeneratorRuntime.default.mark(function _callee() {
|
||||
var _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, value;
|
||||
return _regeneratorRuntime.default.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
_iteratorAbruptCompletion = false, _didIteratorError = false;
|
||||
_state.label = 1;
|
||||
case 1:
|
||||
_state.trys.push([
|
||||
1,
|
||||
6,
|
||||
7,
|
||||
12
|
||||
]);
|
||||
_ctx.prev = 1;
|
||||
_iterator = _asyncIterator(iterable);
|
||||
_state.label = 2;
|
||||
case 2:
|
||||
return [
|
||||
4,
|
||||
_iterator.next()
|
||||
];
|
||||
case 3:
|
||||
if (!(_iteratorAbruptCompletion = !(_step = _state.sent()).done)) return [
|
||||
3,
|
||||
5
|
||||
];
|
||||
_ctx.next = 5;
|
||||
return _iterator.next();
|
||||
case 5:
|
||||
if (!(_iteratorAbruptCompletion = !(_step = _ctx.sent).done)) {
|
||||
_ctx.next = 10;
|
||||
break;
|
||||
}
|
||||
{
|
||||
_value = _step.value;
|
||||
value = _value;
|
||||
counter++;
|
||||
console.log(value);
|
||||
_state.label = 4;
|
||||
case 4:
|
||||
_iteratorAbruptCompletion = false;
|
||||
return [
|
||||
3,
|
||||
2
|
||||
];
|
||||
case 5:
|
||||
return [
|
||||
3,
|
||||
12
|
||||
];
|
||||
case 6:
|
||||
err = _state.sent();
|
||||
_didIteratorError = true;
|
||||
_iteratorError = err;
|
||||
return [
|
||||
3,
|
||||
12
|
||||
];
|
||||
}
|
||||
case 7:
|
||||
_state.trys.push([
|
||||
7,
|
||||
,
|
||||
10,
|
||||
11
|
||||
]);
|
||||
if (!(_iteratorAbruptCompletion && _iterator.return != null)) return [
|
||||
3,
|
||||
9
|
||||
];
|
||||
return [
|
||||
4,
|
||||
_iteratorError.return()
|
||||
];
|
||||
case 8:
|
||||
_state.sent();
|
||||
_state.label = 9;
|
||||
case 9:
|
||||
return [
|
||||
3,
|
||||
11
|
||||
];
|
||||
_iteratorAbruptCompletion = false;
|
||||
_ctx.next = 3;
|
||||
break;
|
||||
case 10:
|
||||
if (_didIteratorError) {
|
||||
throw _iteratorError;
|
||||
}
|
||||
return [
|
||||
7
|
||||
];
|
||||
case 11:
|
||||
return [
|
||||
7
|
||||
];
|
||||
_ctx.next = 16;
|
||||
break;
|
||||
case 12:
|
||||
if (counter !== 2) {
|
||||
_ctx.prev = 12;
|
||||
_ctx.t0 = _ctx["catch"](1);
|
||||
_didIteratorError = true;
|
||||
_iteratorError = _ctx.t0;
|
||||
case 16:
|
||||
_ctx.prev = 16;
|
||||
_ctx.prev = 17;
|
||||
if (!(_iteratorAbruptCompletion && _iterator.return != null)) {
|
||||
_ctx.next = 21;
|
||||
break;
|
||||
}
|
||||
_ctx.next = 21;
|
||||
return _iteratorError.return();
|
||||
case 21:
|
||||
_ctx.prev = 21;
|
||||
if (!_didIteratorError) {
|
||||
_ctx.next = 24;
|
||||
break;
|
||||
}
|
||||
throw _iteratorError;
|
||||
case 24:
|
||||
return _ctx.finish(21);
|
||||
case 25:
|
||||
return _ctx.finish(16);
|
||||
case 26:
|
||||
if (!(counter !== 2)) {
|
||||
_ctx.next = 28;
|
||||
break;
|
||||
}
|
||||
throw new Error("");
|
||||
case 28:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
return [
|
||||
2
|
||||
];
|
||||
}
|
||||
});
|
||||
})();
|
||||
}, _callee, null, [
|
||||
[
|
||||
1,
|
||||
12,
|
||||
16,
|
||||
26
|
||||
],
|
||||
[
|
||||
17,
|
||||
,
|
||||
21,
|
||||
25
|
||||
]
|
||||
]);
|
||||
}))();
|
||||
_i = 0, _iter = [
|
||||
0,
|
||||
1
|
||||
];
|
||||
_state.label = 1;
|
||||
case 1:
|
||||
if (!(_i < _iter.length)) return [
|
||||
3,
|
||||
4
|
||||
];
|
||||
case 6:
|
||||
if (!(_i < _iter.length)) {
|
||||
_ctx.next = 16;
|
||||
break;
|
||||
}
|
||||
v = _iter[_i];
|
||||
return [
|
||||
4,
|
||||
null
|
||||
];
|
||||
case 2:
|
||||
_state.sent();
|
||||
_ctx.next = 10;
|
||||
return null;
|
||||
case 10:
|
||||
oldresolve = resolve;
|
||||
promise = new Promise(function(r) {
|
||||
return resolve = r;
|
||||
});
|
||||
_tmp1 = {};
|
||||
oldresolve((_tmp1.value = v, _tmp1.done = false, _tmp1));
|
||||
_state.label = 3;
|
||||
case 3:
|
||||
_i++;
|
||||
return [
|
||||
3,
|
||||
1
|
||||
];
|
||||
case 4:
|
||||
_tmp2 = {};
|
||||
resolve((_tmp2.value = undefined, _tmp2.done = true, _tmp2));
|
||||
return [
|
||||
4,
|
||||
res
|
||||
];
|
||||
case 5:
|
||||
_state.sent();
|
||||
return [
|
||||
2
|
||||
];
|
||||
}
|
||||
oldresolve({
|
||||
value: v,
|
||||
done: false
|
||||
});
|
||||
})();
|
||||
case 13:
|
||||
_i++;
|
||||
_ctx.next = 6;
|
||||
break;
|
||||
case 16:
|
||||
resolve({
|
||||
value: undefined,
|
||||
done: true
|
||||
});
|
||||
_ctx.next = 19;
|
||||
return res;
|
||||
case 19:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}))();
|
||||
|
@ -5,160 +5,139 @@ Object.defineProperty(exports, "__esModule", {
|
||||
var _asyncIterator = require("@swc/helpers/lib/_async_iterator.js").default;
|
||||
var _asyncToGenerator = require("@swc/helpers/lib/_async_to_generator.js").default;
|
||||
var _defineProperty = require("@swc/helpers/lib/_define_property.js").default;
|
||||
var _tsGenerator = require("@swc/helpers/lib/_ts_generator.js").default;
|
||||
_asyncToGenerator(function() {
|
||||
var counter, resolve, promise, iterable, _tmp, res, _i, _iter, v, oldresolve, _tmp1, _tmp2;
|
||||
return _tsGenerator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
var _interopRequireDefault = require("@swc/helpers/lib/_interop_require_default.js").default;
|
||||
var _regeneratorRuntime = /*#__PURE__*/ _interopRequireDefault(require("regenerator-runtime"));
|
||||
_asyncToGenerator(/*#__PURE__*/ _regeneratorRuntime.default.mark(function _callee() {
|
||||
var counter, resolve, promise, iterable, res, _i, _iter, v, oldresolve;
|
||||
return _regeneratorRuntime.default.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
counter = 0;
|
||||
;
|
||||
promise = new Promise(function(r) {
|
||||
return resolve = r;
|
||||
});
|
||||
_tmp = {};
|
||||
iterable = _defineProperty(_tmp, Symbol.asyncIterator, function() {
|
||||
iterable = _defineProperty({}, Symbol.asyncIterator, function() {
|
||||
return {
|
||||
next: function next() {
|
||||
return promise;
|
||||
}
|
||||
};
|
||||
});
|
||||
res = _asyncToGenerator(function() {
|
||||
var _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, value, err;
|
||||
return _tsGenerator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
res = _asyncToGenerator(/*#__PURE__*/ _regeneratorRuntime.default.mark(function _callee() {
|
||||
var _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, value;
|
||||
return _regeneratorRuntime.default.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
_iteratorAbruptCompletion = false, _didIteratorError = false;
|
||||
_state.label = 1;
|
||||
case 1:
|
||||
_state.trys.push([
|
||||
1,
|
||||
6,
|
||||
7,
|
||||
12
|
||||
]);
|
||||
_ctx.prev = 1;
|
||||
_iterator = _asyncIterator(iterable);
|
||||
_state.label = 2;
|
||||
case 2:
|
||||
return [
|
||||
4,
|
||||
_iterator.next()
|
||||
];
|
||||
case 3:
|
||||
if (!(_iteratorAbruptCompletion = !(_step = _state.sent()).done)) return [
|
||||
3,
|
||||
5
|
||||
];
|
||||
_ctx.next = 5;
|
||||
return _iterator.next();
|
||||
case 5:
|
||||
if (!(_iteratorAbruptCompletion = !(_step = _ctx.sent).done)) {
|
||||
_ctx.next = 10;
|
||||
break;
|
||||
}
|
||||
{
|
||||
_value = _step.value;
|
||||
value = _value;
|
||||
counter++;
|
||||
console.log(value);
|
||||
_state.label = 4;
|
||||
case 4:
|
||||
_iteratorAbruptCompletion = false;
|
||||
return [
|
||||
3,
|
||||
2
|
||||
];
|
||||
case 5:
|
||||
return [
|
||||
3,
|
||||
12
|
||||
];
|
||||
case 6:
|
||||
err = _state.sent();
|
||||
_didIteratorError = true;
|
||||
_iteratorError = err;
|
||||
return [
|
||||
3,
|
||||
12
|
||||
];
|
||||
}
|
||||
case 7:
|
||||
_state.trys.push([
|
||||
7,
|
||||
,
|
||||
10,
|
||||
11
|
||||
]);
|
||||
if (!(_iteratorAbruptCompletion && _iterator.return != null)) return [
|
||||
3,
|
||||
9
|
||||
];
|
||||
return [
|
||||
4,
|
||||
_iterator.return()
|
||||
];
|
||||
case 8:
|
||||
_state.sent();
|
||||
_state.label = 9;
|
||||
case 9:
|
||||
return [
|
||||
3,
|
||||
11
|
||||
];
|
||||
_iteratorAbruptCompletion = false;
|
||||
_ctx.next = 3;
|
||||
break;
|
||||
case 10:
|
||||
if (_didIteratorError) {
|
||||
throw _iteratorError;
|
||||
}
|
||||
return [
|
||||
7
|
||||
];
|
||||
case 11:
|
||||
return [
|
||||
7
|
||||
];
|
||||
_ctx.next = 16;
|
||||
break;
|
||||
case 12:
|
||||
if (counter !== 2) {
|
||||
_ctx.prev = 12;
|
||||
_ctx.t0 = _ctx["catch"](1);
|
||||
_didIteratorError = true;
|
||||
_iteratorError = _ctx.t0;
|
||||
case 16:
|
||||
_ctx.prev = 16;
|
||||
_ctx.prev = 17;
|
||||
if (!(_iteratorAbruptCompletion && _iterator.return != null)) {
|
||||
_ctx.next = 21;
|
||||
break;
|
||||
}
|
||||
_ctx.next = 21;
|
||||
return _iterator.return();
|
||||
case 21:
|
||||
_ctx.prev = 21;
|
||||
if (!_didIteratorError) {
|
||||
_ctx.next = 24;
|
||||
break;
|
||||
}
|
||||
throw _iteratorError;
|
||||
case 24:
|
||||
return _ctx.finish(21);
|
||||
case 25:
|
||||
return _ctx.finish(16);
|
||||
case 26:
|
||||
if (!(counter !== 2)) {
|
||||
_ctx.next = 28;
|
||||
break;
|
||||
}
|
||||
throw new Error("");
|
||||
case 28:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
return [
|
||||
2
|
||||
];
|
||||
}
|
||||
});
|
||||
})();
|
||||
}, _callee, null, [
|
||||
[
|
||||
1,
|
||||
12,
|
||||
16,
|
||||
26
|
||||
],
|
||||
[
|
||||
17,
|
||||
,
|
||||
21,
|
||||
25
|
||||
]
|
||||
]);
|
||||
}))();
|
||||
_i = 0, _iter = [
|
||||
0,
|
||||
1
|
||||
];
|
||||
_state.label = 1;
|
||||
case 1:
|
||||
if (!(_i < _iter.length)) return [
|
||||
3,
|
||||
4
|
||||
];
|
||||
case 6:
|
||||
if (!(_i < _iter.length)) {
|
||||
_ctx.next = 16;
|
||||
break;
|
||||
}
|
||||
v = _iter[_i];
|
||||
return [
|
||||
4,
|
||||
null
|
||||
];
|
||||
case 2:
|
||||
_state.sent();
|
||||
_ctx.next = 10;
|
||||
return null;
|
||||
case 10:
|
||||
oldresolve = resolve;
|
||||
promise = new Promise(function(r) {
|
||||
return resolve = r;
|
||||
});
|
||||
_tmp1 = {};
|
||||
oldresolve((_tmp1.value = v, _tmp1.done = false, _tmp1));
|
||||
_state.label = 3;
|
||||
case 3:
|
||||
_i++;
|
||||
return [
|
||||
3,
|
||||
1
|
||||
];
|
||||
case 4:
|
||||
_tmp2 = {};
|
||||
resolve((_tmp2.value = undefined, _tmp2.done = true, _tmp2));
|
||||
return [
|
||||
4,
|
||||
res
|
||||
];
|
||||
case 5:
|
||||
_state.sent();
|
||||
return [
|
||||
2
|
||||
];
|
||||
}
|
||||
oldresolve({
|
||||
value: v,
|
||||
done: false
|
||||
});
|
||||
})();
|
||||
case 13:
|
||||
_i++;
|
||||
_ctx.next = 6;
|
||||
break;
|
||||
case 16:
|
||||
resolve({
|
||||
value: undefined,
|
||||
done: true
|
||||
});
|
||||
_ctx.next = 19;
|
||||
return res;
|
||||
case 19:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}))();
|
||||
|
@ -2,11 +2,15 @@
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _tsGenerator = require("@swc/helpers/lib/_ts_generator.js").default;
|
||||
var _interopRequireDefault = require("@swc/helpers/lib/_interop_require_default.js").default;
|
||||
var _regeneratorRuntime = /*#__PURE__*/ _interopRequireDefault(require("regenerator-runtime"));
|
||||
var _marked = /*#__PURE__*/ _regeneratorRuntime.default.mark(foo);
|
||||
function foo() {
|
||||
return _tsGenerator(this, function(_state) {
|
||||
return [
|
||||
2
|
||||
];
|
||||
});
|
||||
return _regeneratorRuntime.default.wrap(function foo$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _marked);
|
||||
}
|
||||
|
@ -3,11 +3,12 @@ Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _asyncToGenerator = require("@swc/helpers/lib/_async_to_generator.js").default;
|
||||
var _tsGenerator = require("@swc/helpers/lib/_ts_generator.js").default;
|
||||
_asyncToGenerator(function() {
|
||||
var _interopRequireDefault = require("@swc/helpers/lib/_interop_require_default.js").default;
|
||||
var _regeneratorRuntime = /*#__PURE__*/ _interopRequireDefault(require("regenerator-runtime"));
|
||||
_asyncToGenerator(/*#__PURE__*/ _regeneratorRuntime.default.mark(function _callee() {
|
||||
var sleep, result;
|
||||
return _tsGenerator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
return _regeneratorRuntime.default.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
sleep = function() {
|
||||
return new Promise(function(resolve) {
|
||||
@ -16,16 +17,21 @@ _asyncToGenerator(function() {
|
||||
}, 500);
|
||||
});
|
||||
};
|
||||
return [
|
||||
4,
|
||||
sleep()
|
||||
];
|
||||
case 1:
|
||||
result = _state.sent() || "fallback";
|
||||
console.log(result);
|
||||
return [
|
||||
2
|
||||
];
|
||||
_ctx.next = 3;
|
||||
return sleep();
|
||||
case 3:
|
||||
_ctx.t0 = _ctx.sent;
|
||||
if (_ctx.t0) {
|
||||
_ctx.next = 6;
|
||||
break;
|
||||
}
|
||||
});
|
||||
})();
|
||||
_ctx.t0 = "fallback";
|
||||
case 6:
|
||||
result = _ctx.t0;
|
||||
console.log(result);
|
||||
case 8:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}))();
|
||||
|
@ -1,9 +1,9 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
_async_to_generator(function() {
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
_async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
var sleep, result;
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
sleep = function() {
|
||||
return new Promise(function(resolve) {
|
||||
@ -12,16 +12,21 @@ _async_to_generator(function() {
|
||||
}, 500);
|
||||
});
|
||||
};
|
||||
return [
|
||||
4,
|
||||
sleep()
|
||||
];
|
||||
case 1:
|
||||
result = _state.sent() || "fallback";
|
||||
console.log(result);
|
||||
return [
|
||||
2
|
||||
];
|
||||
_ctx.next = 3;
|
||||
return sleep();
|
||||
case 3:
|
||||
_ctx.t0 = _ctx.sent;
|
||||
if (_ctx.t0) {
|
||||
_ctx.next = 6;
|
||||
break;
|
||||
}
|
||||
});
|
||||
})();
|
||||
_ctx.t0 = "fallback";
|
||||
case 6:
|
||||
result = _ctx.t0;
|
||||
console.log(result);
|
||||
case 8:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}))();
|
||||
|
@ -1,18 +1,20 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
function fn() {
|
||||
return _fn.apply(this, arguments);
|
||||
}
|
||||
function _fn() {
|
||||
_fn = _async_to_generator(function() {
|
||||
var key, _tmp;
|
||||
return _ts_generator(this, function(_state) {
|
||||
_tmp = {};
|
||||
for(var key in _tmp);
|
||||
return [
|
||||
2
|
||||
];
|
||||
});
|
||||
});
|
||||
_fn = _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
var key;
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
for(key in {});
|
||||
case 1:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
return _fn.apply(this, arguments);
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
|
||||
import _create_class from "@swc/helpers/src/_create_class.mjs";
|
||||
import _object_without_properties from "@swc/helpers/src/_object_without_properties.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var Foo = /*#__PURE__*/ function() {
|
||||
"use strict";
|
||||
function Foo() {
|
||||
@ -12,18 +12,21 @@ var Foo = /*#__PURE__*/ function() {
|
||||
{
|
||||
key: "sendSomeMessage",
|
||||
value: function sendSomeMessage(_parent, _param, _param1) {
|
||||
return _async_to_generator(function() {
|
||||
return _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
var _input, toNumber, messageBody, all, dataSources;
|
||||
return _ts_generator(this, function(_state) {
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
_input = _param.input, toNumber = _input.toNumber, messageBody = _input.messageBody, all = _object_without_properties(_param.input, [
|
||||
"toNumber",
|
||||
"messageBody"
|
||||
]), dataSources = _param1.dataSources;
|
||||
return [
|
||||
2
|
||||
];
|
||||
});
|
||||
})();
|
||||
case 1:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}))();
|
||||
}
|
||||
}
|
||||
]);
|
||||
|
@ -1,20 +1,23 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _object_without_properties from "@swc/helpers/src/_object_without_properties.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var resolver = {
|
||||
sendSomeMessage: function sendSomeMessage(_parent, _param, _param1) {
|
||||
return _async_to_generator(function() {
|
||||
return _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
var _input, toNumber, messageBody, all, dataSources;
|
||||
return _ts_generator(this, function(_state) {
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
_input = _param.input, toNumber = _input.toNumber, messageBody = _input.messageBody, all = _object_without_properties(_param.input, [
|
||||
"toNumber",
|
||||
"messageBody"
|
||||
]), dataSources = _param1.dataSources;
|
||||
return [
|
||||
2
|
||||
];
|
||||
});
|
||||
})();
|
||||
case 1:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}))();
|
||||
}
|
||||
};
|
||||
export default resolver;
|
||||
|
@ -1,18 +1,21 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
export var foo = function() {
|
||||
var _ref = _async_to_generator(function() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
var _ref = _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
try {
|
||||
console.log(1);
|
||||
} catch (err) {
|
||||
console.log(err.message);
|
||||
}
|
||||
return [
|
||||
2
|
||||
];
|
||||
});
|
||||
});
|
||||
case 1:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
return function foo() {
|
||||
return _ref.apply(this, arguments);
|
||||
};
|
||||
|
@ -1,43 +1,36 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
var handleSubmit = useMutation(/*#__PURE__*/ _async_to_generator(function() {
|
||||
var res, _tmp, param, errors;
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var handleSubmit = useMutation(/*#__PURE__*/ _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
var res, errors;
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
_state.trys.push([
|
||||
0,
|
||||
2,
|
||||
,
|
||||
3
|
||||
]);
|
||||
_tmp = {};
|
||||
return [
|
||||
4,
|
||||
gate.register((_tmp.username = phoneNumber, _tmp))
|
||||
];
|
||||
case 1:
|
||||
res = _state.sent();
|
||||
_ctx.prev = 0;
|
||||
_ctx.next = 3;
|
||||
return gate.register({
|
||||
username: phoneNumber
|
||||
});
|
||||
case 3:
|
||||
res = _ctx.sent;
|
||||
setstep(function(prev) {
|
||||
return prev + 1;
|
||||
});
|
||||
toast.success(res.message);
|
||||
return [
|
||||
3,
|
||||
3
|
||||
];
|
||||
case 2:
|
||||
param = _state.sent();
|
||||
errors = param.data.errors;
|
||||
_ctx.next = 12;
|
||||
break;
|
||||
case 8:
|
||||
_ctx.prev = 8;
|
||||
_ctx.t0 = _ctx["catch"](0);
|
||||
errors = _ctx.t0.data.errors;
|
||||
showErrorMessage(errors);
|
||||
return [
|
||||
3,
|
||||
3
|
||||
];
|
||||
case 3:
|
||||
return [
|
||||
2
|
||||
];
|
||||
case 12:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
});
|
||||
}));
|
||||
}, _callee, null, [
|
||||
[
|
||||
0,
|
||||
8
|
||||
]
|
||||
]);
|
||||
})));
|
||||
|
@ -1,41 +1,40 @@
|
||||
import e from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import { takeLatest as t, select as r } from "redux-saga/effects";
|
||||
import { CHANGE_THEME as o, CHANGE_THEME_CUSTOM_PALETTE as s, CHANGE_THEME_SWITCH_MODE as n } from "core/actions/changeTheme";
|
||||
import e from "regenerator-runtime";
|
||||
var t = e.mark(saveTheme);
|
||||
import { takeLatest as r, select as o } from "redux-saga/effects";
|
||||
import { CHANGE_THEME as s, CHANGE_THEME_CUSTOM_PALETTE as a, CHANGE_THEME_SWITCH_MODE as n } from "core/actions/changeTheme";
|
||||
export var selectThemeObject = function(e) {
|
||||
return e.theme;
|
||||
};
|
||||
export function saveTheme(t) {
|
||||
var o, s, c, m;
|
||||
return e(this, function(e) {
|
||||
switch(e.label){
|
||||
export function saveTheme(r) {
|
||||
var s, a, c;
|
||||
return e.wrap(function(e) {
|
||||
for(;;)switch(e.prev = e.next){
|
||||
case 0:
|
||||
return o = t.type, [
|
||||
4,
|
||||
r(selectThemeObject)
|
||||
];
|
||||
case 1:
|
||||
return s = e.sent(), c = {}, window.localStorage.setItem("theme", JSON.stringify((c.theme = s.theme, c.mode = s.mode, c.palette = s.palette, c))), o === n && (m = window.document.querySelector("body")) && (m.classList.add("light" === s.mode ? "light" : "dark"), m.classList.remove("light" === s.mode ? "dark" : "light")), [
|
||||
2
|
||||
];
|
||||
return s = r.type, e.next = 3, o(selectThemeObject);
|
||||
case 3:
|
||||
a = e.sent, window.localStorage.setItem("theme", JSON.stringify({
|
||||
theme: a.theme,
|
||||
mode: a.mode,
|
||||
palette: a.palette
|
||||
})), s === n && (c = window.document.querySelector("body")) && (c.classList.add("light" === a.mode ? "light" : "dark"), c.classList.remove("light" === a.mode ? "dark" : "light"));
|
||||
case 6:
|
||||
case "end":
|
||||
return e.stop();
|
||||
}
|
||||
});
|
||||
}, t);
|
||||
}
|
||||
export default function c() {
|
||||
return e(this, function(e) {
|
||||
switch(e.label){
|
||||
return e.wrap(function(e) {
|
||||
for(;;)switch(e.prev = e.next){
|
||||
case 0:
|
||||
return [
|
||||
4,
|
||||
t([
|
||||
o,
|
||||
return e.next = 2, r([
|
||||
s,
|
||||
a,
|
||||
n
|
||||
], saveTheme)
|
||||
];
|
||||
case 1:
|
||||
return e.sent(), [
|
||||
2
|
||||
];
|
||||
], saveTheme);
|
||||
case 2:
|
||||
case "end":
|
||||
return e.stop();
|
||||
}
|
||||
});
|
||||
}, c);
|
||||
};
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,20 +1,22 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
export var CompanyBgStore = function CompanyBgStore() {
|
||||
"use strict";
|
||||
_class_call_check(this, CompanyBgStore);
|
||||
this.corpName = 123;
|
||||
var _this = this;
|
||||
this.getBusinessInfo = _async_to_generator(function() {
|
||||
var corpName;
|
||||
var _arguments = arguments;
|
||||
return _ts_generator(this, function(_state) {
|
||||
corpName = _arguments.length > 0 && _arguments[0] !== void 0 ? _arguments[0] : _this.corpName;
|
||||
this.getBusinessInfo = _async_to_generator(regeneratorRuntime.mark(function _callee() {
|
||||
var corpName, _args = arguments;
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
corpName = _args.length > 0 && _args[0] !== void 0 ? _args[0] : _this.corpName;
|
||||
console.log(corpName);
|
||||
return [
|
||||
2
|
||||
];
|
||||
});
|
||||
});
|
||||
case 2:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
};
|
||||
|
@ -1,26 +1,32 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var A = function A() {
|
||||
"use strict";
|
||||
_class_call_check(this, A);
|
||||
var _this = this;
|
||||
this.foo = /*#__PURE__*/ _async_to_generator(function() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
this.foo = /*#__PURE__*/ _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
_this.x();
|
||||
return [
|
||||
2
|
||||
];
|
||||
});
|
||||
});
|
||||
case 1:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
var _this1 = this;
|
||||
this.bar = /*#__PURE__*/ _async_to_generator(function() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
this.bar = /*#__PURE__*/ _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
_this1.x();
|
||||
return [
|
||||
2
|
||||
];
|
||||
});
|
||||
});
|
||||
case 1:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
};
|
||||
console.log(A);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
|
||||
import _create_class from "@swc/helpers/src/_create_class.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var A = /*#__PURE__*/ function() {
|
||||
"use strict";
|
||||
function A() {
|
||||
@ -12,23 +12,29 @@ var A = /*#__PURE__*/ function() {
|
||||
key: "method",
|
||||
value: function method() {
|
||||
var _this = this;
|
||||
this.foo = /*#__PURE__*/ _async_to_generator(function() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
this.foo = /*#__PURE__*/ _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
_this.x();
|
||||
return [
|
||||
2
|
||||
];
|
||||
});
|
||||
});
|
||||
case 1:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
var _this1 = this;
|
||||
this.bar = /*#__PURE__*/ _async_to_generator(function() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
this.bar = /*#__PURE__*/ _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
_this1.x();
|
||||
return [
|
||||
2
|
||||
];
|
||||
});
|
||||
});
|
||||
case 1:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
}
|
||||
}
|
||||
]);
|
||||
|
@ -1,15 +1,18 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
import "reflect-metadata";
|
||||
var v0 = function() {
|
||||
var _ref = _async_to_generator(function(v1) {
|
||||
return _ts_generator(this, function(_state) {
|
||||
return [
|
||||
2,
|
||||
v1
|
||||
];
|
||||
});
|
||||
});
|
||||
var _ref = _async_to_generator(regeneratorRuntime.mark(function _callee(v1) {
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
return _ctx.abrupt("return", v1);
|
||||
case 1:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
return function(v1) {
|
||||
return _ref.apply(this, arguments);
|
||||
};
|
||||
|
@ -3,17 +3,21 @@ Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _asyncToGenerator = require("@swc/helpers/lib/_async_to_generator.js").default;
|
||||
var _tsGenerator = require("@swc/helpers/lib/_ts_generator.js").default;
|
||||
var _interopRequireDefault = require("@swc/helpers/lib/_interop_require_default.js").default;
|
||||
var _regeneratorRuntime = _interopRequireDefault(require("regenerator-runtime"));
|
||||
require("reflect-metadata");
|
||||
var v0 = function() {
|
||||
var _ref = _asyncToGenerator(function(v1) {
|
||||
return _tsGenerator(this, function(_state) {
|
||||
return [
|
||||
2,
|
||||
v1
|
||||
];
|
||||
});
|
||||
});
|
||||
var _ref = _asyncToGenerator(_regeneratorRuntime.default.mark(function _callee(v1) {
|
||||
return _regeneratorRuntime.default.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
return _ctx.abrupt("return", v1);
|
||||
case 1:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
return function(v1) {
|
||||
return _ref.apply(this, arguments);
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var app;
|
||||
var ctx;
|
||||
x = function x() {
|
||||
@ -9,25 +9,24 @@ x = function x() {
|
||||
type: "all",
|
||||
disable: app.config.env === "local"
|
||||
},
|
||||
task: function task(ctx) {
|
||||
var res, _tmp;
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
task: regeneratorRuntime.mark(function task(ctx) {
|
||||
var res;
|
||||
return regeneratorRuntime.wrap(function task$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
_tmp = {};
|
||||
return [
|
||||
4,
|
||||
ctx.curl("http://www.api.com/cache", (_tmp.contentType = "json", _tmp))
|
||||
];
|
||||
case 1:
|
||||
res = _state.sent();
|
||||
ctx.app.cache = res.data;
|
||||
return [
|
||||
2
|
||||
];
|
||||
}
|
||||
_ctx.next = 2;
|
||||
return ctx.curl("http://www.api.com/cache", {
|
||||
contentType: "json"
|
||||
});
|
||||
case 2:
|
||||
res = _ctx.sent;
|
||||
ctx.app.cache = res.data;
|
||||
case 4:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, task);
|
||||
})
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,7 +1,7 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
|
||||
import _create_class from "@swc/helpers/src/_create_class.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var Foo = function() {
|
||||
"use strict";
|
||||
function Foo() {
|
||||
@ -11,22 +11,20 @@ var Foo = function() {
|
||||
{
|
||||
key: "bar",
|
||||
value: function bar() {
|
||||
var x = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : _async_to_generator(function() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
var x = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : _async_to_generator(regeneratorRuntime.mark(function _callee() {
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
return [
|
||||
4,
|
||||
1
|
||||
];
|
||||
case 1:
|
||||
return [
|
||||
2,
|
||||
_state.sent()
|
||||
];
|
||||
_ctx.next = 2;
|
||||
return 1;
|
||||
case 2:
|
||||
return _ctx.abrupt("return", _ctx.sent);
|
||||
case 3:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
});
|
||||
});
|
||||
}, _callee);
|
||||
}));
|
||||
}
|
||||
}
|
||||
]);
|
||||
|
@ -1,6 +1,6 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var Router = /*#__PURE__*/ function() {
|
||||
"use strict";
|
||||
function Router() {
|
||||
@ -9,18 +9,18 @@ var Router = /*#__PURE__*/ function() {
|
||||
var _proto = Router.prototype;
|
||||
_proto.change = function change(method, url, as, options, forcedScroll) {
|
||||
var _this = this;
|
||||
return _async_to_generator(function() {
|
||||
var shouldResolveHref, prevLocale, parsedAs, localePathResult, didNavigate, ref, detectedDomain, asNoBasePath, _shallow, shallow, routeProps, _tmp, cleanedAs, localeChange, parsed, pathname, query, pages, rewrites, ref1, err, resolvedAs, rewritesResult, route, parsedAs1, asPathname, routeRegex, routeMatch, shouldInterpolate, interpolatedAs, _tmp1, missingParams, ref2, ref3, routeInfo, error, props, __N_SSG, __N_SSP, destination, parsedHref, ref4, newUrl, newAs, notFoundRoute, _, _tmp2, isValidShallowRoute, _scroll, shouldScroll, resetScroll, _tmp3, err1;
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
return _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
var shouldResolveHref, prevLocale, parsedAs, localePathResult, didNavigate, ref, detectedDomain, asNoBasePath, _shallow, shallow, routeProps, cleanedAs, localeChange, parsed, pathname, query, pages, rewrites, ref1, resolvedAs, rewritesResult, route, parsedAs1, asPathname, routeRegex, routeMatch, shouldInterpolate, interpolatedAs, missingParams, ref2, ref3, routeInfo, error, props, __N_SSG, __N_SSP, destination, parsedHref, ref4, newUrl, newAs, notFoundRoute, isValidShallowRoute, _scroll, shouldScroll, resetScroll;
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
if (!isLocalURL(url)) {
|
||||
window.location.href = url;
|
||||
return [
|
||||
2,
|
||||
false
|
||||
];
|
||||
if (isLocalURL(url)) {
|
||||
_ctx.next = 3;
|
||||
break;
|
||||
}
|
||||
window.location.href = url;
|
||||
return _ctx.abrupt("return", false);
|
||||
case 3:
|
||||
shouldResolveHref = options._h || options._shouldResolveHref || pathNoQueryHash(url) === pathNoQueryHash(as);
|
||||
// for static pages with query params in the URL we delay
|
||||
// marking the router ready until after the query is updated
|
||||
@ -28,7 +28,10 @@ var Router = /*#__PURE__*/ function() {
|
||||
_this.isReady = true;
|
||||
}
|
||||
prevLocale = _this.locale;
|
||||
if (process.env.__NEXT_I18N_SUPPORT) {
|
||||
if (!process.env.__NEXT_I18N_SUPPORT) {
|
||||
_ctx.next = 18;
|
||||
break;
|
||||
}
|
||||
_this.locale = options.locale === false ? _this.defaultLocale : options.locale || _this.locale;
|
||||
if (typeof options.locale === "undefined") {
|
||||
options.locale = _this.locale;
|
||||
@ -69,13 +72,12 @@ var Router = /*#__PURE__*/ function() {
|
||||
didNavigate = true;
|
||||
}
|
||||
}
|
||||
if (didNavigate) {
|
||||
return [
|
||||
2,
|
||||
new Promise(function() {})
|
||||
];
|
||||
}
|
||||
if (!didNavigate) {
|
||||
_ctx.next = 18;
|
||||
break;
|
||||
}
|
||||
return _ctx.abrupt("return", new Promise(function() {}));
|
||||
case 18:
|
||||
if (!options._h) {
|
||||
_this.isSsr = false;
|
||||
}
|
||||
@ -84,8 +86,9 @@ var Router = /*#__PURE__*/ function() {
|
||||
performance.mark("routeChange");
|
||||
}
|
||||
_shallow = options.shallow, shallow = _shallow === void 0 ? false : _shallow;
|
||||
_tmp = {};
|
||||
routeProps = (_tmp.shallow = shallow, _tmp);
|
||||
routeProps = {
|
||||
shallow: shallow
|
||||
};
|
||||
if (_this._inFlightRoute) {
|
||||
_this.abortComponentLoad(_this._inFlightRoute, routeProps);
|
||||
}
|
||||
@ -93,12 +96,10 @@ var Router = /*#__PURE__*/ function() {
|
||||
cleanedAs = delLocale(hasBasePath(as) ? delBasePath(as) : as, _this.locale);
|
||||
_this._inFlightRoute = as;
|
||||
localeChange = prevLocale !== _this.locale;
|
||||
// If the url change is only related to a hash change
|
||||
// We should not proceed. We should only change the state.
|
||||
// WARNING: `_h` is an internal option for handing Next.js client-side
|
||||
// hydration. Your app should _never_ use this property. It may change at
|
||||
// any time without notice.
|
||||
if (!options._h && _this.onlyAHashChange(cleanedAs) && !localeChange) {
|
||||
if (!(!options._h && _this.onlyAHashChange(cleanedAs) && !localeChange)) {
|
||||
_ctx.next = 35;
|
||||
break;
|
||||
}
|
||||
_this.asPath = cleanedAs;
|
||||
Router.events.emit("hashChangeStart", as, routeProps);
|
||||
// TODO: do we need the resolved href when only a hash change?
|
||||
@ -106,47 +107,33 @@ var Router = /*#__PURE__*/ function() {
|
||||
_this.scrollToHash(cleanedAs);
|
||||
_this.notify(_this.components[_this.route], null);
|
||||
Router.events.emit("hashChangeComplete", as, routeProps);
|
||||
return [
|
||||
2,
|
||||
true
|
||||
];
|
||||
}
|
||||
return _ctx.abrupt("return", true);
|
||||
case 35:
|
||||
parsed = parseRelativeUrl(url);
|
||||
pathname = parsed.pathname, query = parsed.query;
|
||||
_state.label = 1;
|
||||
case 1:
|
||||
_state.trys.push([
|
||||
1,
|
||||
4,
|
||||
,
|
||||
5
|
||||
]);
|
||||
return [
|
||||
4,
|
||||
_this.pageLoader.getPageList()
|
||||
];
|
||||
case 2:
|
||||
pages = _state.sent();
|
||||
return [
|
||||
4,
|
||||
getClientBuildManifest()
|
||||
];
|
||||
case 3:
|
||||
ref1 = _state.sent(), rewrites = ref1.__rewrites, ref1;
|
||||
return [
|
||||
3,
|
||||
5
|
||||
];
|
||||
case 4:
|
||||
err = _state.sent();
|
||||
;
|
||||
_ctx.prev = 38;
|
||||
_ctx.next = 41;
|
||||
return _this.pageLoader.getPageList();
|
||||
case 41:
|
||||
pages = _ctx.sent;
|
||||
;
|
||||
_ctx.next = 45;
|
||||
return getClientBuildManifest();
|
||||
case 45:
|
||||
ref1 = _ctx.sent;
|
||||
rewrites = ref1.__rewrites;
|
||||
ref1;
|
||||
_ctx.next = 54;
|
||||
break;
|
||||
case 50:
|
||||
_ctx.prev = 50;
|
||||
_ctx.t0 = _ctx["catch"](38);
|
||||
// If we fail to resolve the page list or client-build manifest, we must
|
||||
// do a server-side transition:
|
||||
window.location.href = as;
|
||||
return [
|
||||
2,
|
||||
false
|
||||
];
|
||||
case 5:
|
||||
return _ctx.abrupt("return", false);
|
||||
case 54:
|
||||
// If asked to change the current URL we should reload the current page
|
||||
// (not location.reload() but reload getInitialProps and other Next.js stuffs)
|
||||
// We also need to set the method = replaceState always
|
||||
@ -184,36 +171,50 @@ var Router = /*#__PURE__*/ function() {
|
||||
}
|
||||
}
|
||||
route = removePathTrailingSlash(pathname);
|
||||
if (!isLocalURL(as)) {
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
if (isLocalURL(as)) {
|
||||
_ctx.next = 64;
|
||||
break;
|
||||
}
|
||||
if (!(process.env.NODE_ENV !== "production")) {
|
||||
_ctx.next = 62;
|
||||
break;
|
||||
}
|
||||
throw new Error('Invalid href: "'.concat(url, '" and as: "').concat(as, '", received relative href and external as') + "\nSee more info: https://nextjs.org/docs/messages/invalid-relative-url-external-as");
|
||||
}
|
||||
case 62:
|
||||
window.location.href = as;
|
||||
return [
|
||||
2,
|
||||
false
|
||||
];
|
||||
}
|
||||
return _ctx.abrupt("return", false);
|
||||
case 64:
|
||||
resolvedAs = delLocale(delBasePath(resolvedAs), _this.locale);
|
||||
_tmp1 = {};
|
||||
if (isDynamicRoute(route)) {
|
||||
if (!isDynamicRoute(route)) {
|
||||
_ctx.next = 80;
|
||||
break;
|
||||
}
|
||||
parsedAs1 = parseRelativeUrl(resolvedAs);
|
||||
asPathname = parsedAs1.pathname;
|
||||
routeRegex = getRouteRegex(route);
|
||||
routeMatch = getRouteMatcher(routeRegex)(asPathname);
|
||||
shouldInterpolate = route === asPathname;
|
||||
interpolatedAs = shouldInterpolate ? interpolateAs(route, asPathname, query) : _tmp1;
|
||||
if (!routeMatch || shouldInterpolate && !interpolatedAs.result) {
|
||||
interpolatedAs = shouldInterpolate ? interpolateAs(route, asPathname, query) : {};
|
||||
if (!(!routeMatch || shouldInterpolate && !interpolatedAs.result)) {
|
||||
_ctx.next = 79;
|
||||
break;
|
||||
}
|
||||
missingParams = Object.keys(routeRegex.groups).filter(function(param) {
|
||||
return !query[param];
|
||||
});
|
||||
if (missingParams.length > 0) {
|
||||
if (!(missingParams.length > 0)) {
|
||||
_ctx.next = 77;
|
||||
break;
|
||||
}
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
console.warn("".concat(shouldInterpolate ? "Interpolating href" : "Mismatching `as` and `href`", " failed to manually provide ") + "the params: ".concat(missingParams.join(", "), " in the `href`'s `query`"));
|
||||
}
|
||||
throw new Error((shouldInterpolate ? "The provided `href` (".concat(url, ") value is missing query values (").concat(missingParams.join(", "), ") to be interpolated properly. ") : "The provided `as` value (".concat(asPathname, ") is incompatible with the `href` value (").concat(route, "). ")) + "Read more: https://nextjs.org/docs/messages/".concat(shouldInterpolate ? "href-interpolation-failed" : "incompatible-href-as"));
|
||||
}
|
||||
} else if (shouldInterpolate) {
|
||||
case 77:
|
||||
_ctx.next = 80;
|
||||
break;
|
||||
case 79:
|
||||
if (shouldInterpolate) {
|
||||
as = formatWithValidation(Object.assign({}, parsedAs1, {
|
||||
pathname: interpolatedAs.result,
|
||||
query: omitParmsFromQuery(query, interpolatedAs.params)
|
||||
@ -222,88 +223,61 @@ var Router = /*#__PURE__*/ function() {
|
||||
// Merge params into `query`, overwriting any specified in search
|
||||
Object.assign(query, routeMatch);
|
||||
}
|
||||
}
|
||||
case 80:
|
||||
Router.events.emit("routeChangeStart", as, routeProps);
|
||||
_state.label = 6;
|
||||
case 6:
|
||||
_state.trys.push([
|
||||
6,
|
||||
15,
|
||||
,
|
||||
16
|
||||
]);
|
||||
return [
|
||||
4,
|
||||
_this.getRouteInfo(route, pathname, query, as, resolvedAs, routeProps)
|
||||
];
|
||||
case 7:
|
||||
routeInfo = _state.sent();
|
||||
_ctx.prev = 81;
|
||||
;
|
||||
_ctx.next = 85;
|
||||
return _this.getRouteInfo(route, pathname, query, as, resolvedAs, routeProps);
|
||||
case 85:
|
||||
routeInfo = _ctx.sent;
|
||||
error = routeInfo.error, props = routeInfo.props, __N_SSG = routeInfo.__N_SSG, __N_SSP = routeInfo.__N_SSP;
|
||||
if (!((__N_SSG || __N_SSP) && props)) return [
|
||||
3,
|
||||
13
|
||||
];
|
||||
if (props.pageProps && props.pageProps.__N_REDIRECT) {
|
||||
if (!((__N_SSG || __N_SSP) && props)) {
|
||||
_ctx.next = 112;
|
||||
break;
|
||||
}
|
||||
if (!(props.pageProps && props.pageProps.__N_REDIRECT)) {
|
||||
_ctx.next = 97;
|
||||
break;
|
||||
}
|
||||
destination = props.pageProps.__N_REDIRECT;
|
||||
// check if destination is internal (resolves to a page) and attempt
|
||||
// client-navigation if it is falling back to hard navigation if
|
||||
// it's not
|
||||
if (destination.startsWith("/") && props.pageProps.__N_REDIRECT_BASE_PATH !== false) {
|
||||
if (!(destination.startsWith("/") && props.pageProps.__N_REDIRECT_BASE_PATH !== false)) {
|
||||
_ctx.next = 95;
|
||||
break;
|
||||
}
|
||||
parsedHref = parseRelativeUrl(destination);
|
||||
parsedHref.pathname = resolveDynamicRoute(parsedHref.pathname, pages);
|
||||
ref4 = prepareUrlAs(_this, destination, destination), newUrl = ref4.url, newAs = ref4.as;
|
||||
return [
|
||||
2,
|
||||
_this.change(method, newUrl, newAs, options)
|
||||
];
|
||||
}
|
||||
return _ctx.abrupt("return", _this.change(method, newUrl, newAs, options));
|
||||
case 95:
|
||||
window.location.href = destination;
|
||||
return [
|
||||
2,
|
||||
new Promise(function() {})
|
||||
];
|
||||
}
|
||||
return _ctx.abrupt("return", new Promise(function() {}));
|
||||
case 97:
|
||||
_this.isPreview = !!props.__N_PREVIEW;
|
||||
if (!(props.notFound === SSG_DATA_NOT_FOUND)) return [
|
||||
3,
|
||||
13
|
||||
];
|
||||
_state.label = 8;
|
||||
case 8:
|
||||
_state.trys.push([
|
||||
8,
|
||||
10,
|
||||
,
|
||||
11
|
||||
]);
|
||||
return [
|
||||
4,
|
||||
_this.fetchComponent("/404")
|
||||
];
|
||||
case 9:
|
||||
_state.sent();
|
||||
if (!(props.notFound === SSG_DATA_NOT_FOUND)) {
|
||||
_ctx.next = 112;
|
||||
break;
|
||||
}
|
||||
;
|
||||
_ctx.prev = 100;
|
||||
_ctx.next = 103;
|
||||
return _this.fetchComponent("/404");
|
||||
case 103:
|
||||
notFoundRoute = "/404";
|
||||
return [
|
||||
3,
|
||||
11
|
||||
];
|
||||
case 10:
|
||||
_ = _state.sent();
|
||||
_ctx.next = 109;
|
||||
break;
|
||||
case 106:
|
||||
_ctx.prev = 106;
|
||||
_ctx.t1 = _ctx["catch"](100);
|
||||
notFoundRoute = "/_error";
|
||||
return [
|
||||
3,
|
||||
11
|
||||
];
|
||||
case 11:
|
||||
_tmp2 = {};
|
||||
return [
|
||||
4,
|
||||
_this.getRouteInfo(notFoundRoute, notFoundRoute, query, as, resolvedAs, (_tmp2.shallow = false, _tmp2))
|
||||
];
|
||||
case 12:
|
||||
routeInfo = _state.sent();
|
||||
_state.label = 13;
|
||||
case 13:
|
||||
case 109:
|
||||
_ctx.next = 111;
|
||||
return _this.getRouteInfo(notFoundRoute, notFoundRoute, query, as, resolvedAs, {
|
||||
shallow: false
|
||||
});
|
||||
case 111:
|
||||
routeInfo = _ctx.sent;
|
||||
case 112:
|
||||
Router.events.emit("beforeHistoryChange", as, routeProps);
|
||||
_this.changeState(method, url, as, options);
|
||||
if (options._h && pathname === "/_error" && ((ref2 = self.__NEXT_DATA__.props) === null || ref2 === void 0 ? void 0 : (ref3 = ref2.pageProps) === null || ref3 === void 0 ? void 0 : ref3.statusCode) === 500 && (props === null || props === void 0 ? void 0 : props.pageProps)) {
|
||||
@ -312,48 +286,61 @@ var Router = /*#__PURE__*/ function() {
|
||||
props.pageProps.statusCode = 500;
|
||||
}
|
||||
isValidShallowRoute = options.shallow && _this.route === route;
|
||||
;
|
||||
shouldScroll = (_scroll = options.scroll) !== null && _scroll !== void 0 ? _scroll : !isValidShallowRoute;
|
||||
_tmp3 = {};
|
||||
resetScroll = shouldScroll ? (_tmp3.x = 0, _tmp3.y = 0, _tmp3) : null;
|
||||
return [
|
||||
4,
|
||||
_this.set(route, pathname, query, cleanedAs, routeInfo, forcedScroll !== null && forcedScroll !== void 0 ? forcedScroll : resetScroll).catch(function(e) {
|
||||
resetScroll = shouldScroll ? {
|
||||
x: 0,
|
||||
y: 0
|
||||
} : null;
|
||||
_ctx.next = 121;
|
||||
return _this.set(route, pathname, query, cleanedAs, routeInfo, forcedScroll !== null && forcedScroll !== void 0 ? forcedScroll : resetScroll).catch(function(e) {
|
||||
if (e.cancelled) error = error || e;
|
||||
else throw e;
|
||||
})
|
||||
];
|
||||
case 14:
|
||||
_state.sent();
|
||||
if (error) {
|
||||
});
|
||||
case 121:
|
||||
if (!error) {
|
||||
_ctx.next = 124;
|
||||
break;
|
||||
}
|
||||
Router.events.emit("routeChangeError", error, cleanedAs, routeProps);
|
||||
throw error;
|
||||
}
|
||||
case 124:
|
||||
if (process.env.__NEXT_I18N_SUPPORT) {
|
||||
if (_this.locale) {
|
||||
document.documentElement.lang = _this.locale;
|
||||
}
|
||||
}
|
||||
Router.events.emit("routeChangeComplete", as, routeProps);
|
||||
return [
|
||||
2,
|
||||
true
|
||||
];
|
||||
case 15:
|
||||
err1 = _state.sent();
|
||||
if (isError(err1) && err1.cancelled) {
|
||||
return [
|
||||
2,
|
||||
false
|
||||
];
|
||||
return _ctx.abrupt("return", true);
|
||||
case 129:
|
||||
_ctx.prev = 129;
|
||||
_ctx.t2 = _ctx["catch"](81);
|
||||
if (!(isError(_ctx.t2) && _ctx.t2.cancelled)) {
|
||||
_ctx.next = 133;
|
||||
break;
|
||||
}
|
||||
throw err1;
|
||||
case 16:
|
||||
return [
|
||||
2
|
||||
];
|
||||
return _ctx.abrupt("return", false);
|
||||
case 133:
|
||||
throw _ctx.t2;
|
||||
case 134:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
});
|
||||
})();
|
||||
}, _callee, null, [
|
||||
[
|
||||
38,
|
||||
50
|
||||
],
|
||||
[
|
||||
81,
|
||||
129
|
||||
],
|
||||
[
|
||||
100,
|
||||
106
|
||||
]
|
||||
]);
|
||||
}))();
|
||||
};
|
||||
return Router;
|
||||
}();
|
||||
|
@ -1,5 +1,5 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
export default function StaticPage(param) {
|
||||
var data = param.data;
|
||||
return /*#__PURE__*/ React.createElement("div", null, data.foo);
|
||||
@ -8,19 +8,22 @@ export function getStaticProps() {
|
||||
return _getStaticProps.apply(this, arguments);
|
||||
}
|
||||
function _getStaticProps() {
|
||||
_getStaticProps = _async_to_generator(function() {
|
||||
var _tmp;
|
||||
return _ts_generator(this, function(_state) {
|
||||
_tmp = {};
|
||||
return [
|
||||
2,
|
||||
(_tmp.props = {
|
||||
_getStaticProps = _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
return _ctx.abrupt("return", {
|
||||
props: {
|
||||
data: {
|
||||
foo: "bar"
|
||||
}
|
||||
}, _tmp)
|
||||
];
|
||||
});
|
||||
}
|
||||
});
|
||||
case 1:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
return _getStaticProps.apply(this, arguments);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"mappings": "AAAA;;AAAA,eAAe,SAASA,UAAU,CAAC,KAAQ,EAAE;QAAV,AAAEC,IAAI,GAAN,KAAQ,CAANA,IAAI,AAAE;IACvC,qBAAO,oBAACC,KAAG,QAAED,IAAI,CAACE,GAAG,CAAO,CAAC;AACjC,CAAC,CAAA;AAED,gBAAsBC,cAAc;WAAdA,eAAc;CAQnC;SARqBA,eAAc;IAAdA,eAAc,GAA7B,oBAAA,WAAgC;;;;YACnC;;sBACIC,KAAK,GAAE;oBACHJ,IAAI,EAAE;wBACFE,GAAG,EAAE,KAAK;qBACb;iBACJ;cACH;;IACN,CAAC,CAAA;WARqBC,eAAc",
|
||||
"mappings": "AAAA;;AAAA,eAAe,SAASA,UAAU,CAAC,KAAQ,EAAE;QAAV,AAAEC,IAAI,GAAN,KAAQ,CAANA,IAAI,AAAE;IACvC,qBAAO,oBAACC,KAAG,QAAED,IAAI,CAACE,GAAG,CAAO,CAAC;AACjC,CAAC,CAAA;AAED,gBAAsBC,cAAc;WAAdA,eAAc;CAQnC;SARqBA,eAAc;IAAdA,eAAc,GAA7B,0DAAA,mBAAgC;;;;iDAC5B;wBACHC,KAAK,EAAE;4BACHJ,IAAI,EAAE;gCACFE,GAAG,EAAE,KAAK;6BACb;yBACJ;qBACJ;;;;;;IACL,CAAC,EAAA;WARqBC,eAAc",
|
||||
"names": [
|
||||
"StaticPage",
|
||||
"data",
|
||||
|
@ -1 +1 @@
|
||||
import t from"@swc/helpers/src/_async_to_generator.mjs";import r from"@swc/helpers/src/_ts_generator.mjs";export default function n(t){var r=t.data;return React.createElement("div",null,r.foo)};export function getStaticProps(){return o.apply(this,arguments)}function o(){return(o=t(function(){var t;return r(this,function(r){return[2,((t={}).props={data:{foo:"bar"}},t)]})})).apply(this,arguments)}
|
||||
import t from"@swc/helpers/src/_async_to_generator.mjs";import r from"regenerator-runtime";export default function e(t){var r=t.data;return React.createElement("div",null,r.foo)};export function getStaticProps(){return n.apply(this,arguments)}function n(){return(n=t(r.mark(function t(){return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{props:{data:{foo:"bar"}}});case 1:case"end":return t.stop()}},t)}))).apply(this,arguments)}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"mappings": "AAAA,yGAAA,gBAAe,SAASA,CAAU,CAAC,CAAQ,CAAE,KAAV,AAAEC,CAAI,CAAN,CAAQ,CAANA,IAAI,AAAE,AACvC,QAAO,oBAACC,KAAG,MAAED,CAAI,CAACE,GAAG,CAAO,AAAC,AACjC,CAAC,AAED,iBAAsBC,cAAc,UAAdA,CAAc,uBAQnC,SARqBA,CAAc,UAAdA,CAAc,CAA7B,EAAA,UAAgC,iCACnC,iBACIC,KAAK,CAAE,CACHJ,IAAI,CAAE,CACFE,GAAG,CAAE,KAAK,CACb,CACJ,IACH,EACN,CAAC,CAAA,wBAAA",
|
||||
"mappings": "AAAA,0FAAA,gBAAe,SAASA,CAAU,CAAC,CAAQ,CAAE,KAAV,AAAEC,CAAI,CAAN,CAAQ,CAANA,IAAI,AAAE,AACvC,QAAO,oBAACC,KAAG,MAAED,CAAI,CAACE,GAAG,CAAO,AAAC,AACjC,CAAC,AAED,iBAAsBC,cAAc,UAAdA,CAAc,uBAQnC,SARqBA,CAAc,UAAdA,CAAc,CAA7B,SAAA,YAAgC,wFAC5B,CACHC,KAAK,CAAE,CACHJ,IAAI,CAAE,CACFE,GAAG,CAAE,KAAK,CACb,CACJ,CACJ,uCACL,CAAC,EAAA,wBAAA",
|
||||
"names": [
|
||||
"StaticPage",
|
||||
"data",
|
||||
|
@ -1,70 +1,69 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
it("should compress avif smaller than webp and smaller than jpg", /*#__PURE__*/ _async_to_generator(function() {
|
||||
var query, _tmp, res1, _tmp1, res2, _tmp2, res3, _tmp3, avif, webp, jpeg, _tmp4;
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
it("should compress avif smaller than webp and smaller than jpg", /*#__PURE__*/ _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
var query, res1, res2, res3, avif, webp, jpeg;
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
_tmp = {};
|
||||
query = (_tmp.url = "/test.jpg", _tmp.w = w, _tmp.q = 75, _tmp);
|
||||
_tmp1 = {};
|
||||
return [
|
||||
4,
|
||||
fetchViaHTTP(appPort, "/_next/image", query, (_tmp1.headers = {
|
||||
query = {
|
||||
url: "/test.jpg",
|
||||
w: w,
|
||||
q: 75
|
||||
};
|
||||
_ctx.next = 3;
|
||||
return fetchViaHTTP(appPort, "/_next/image", query, {
|
||||
headers: {
|
||||
accept: "image/avif"
|
||||
}, _tmp1))
|
||||
];
|
||||
case 1:
|
||||
res1 = _state.sent();
|
||||
expect(res1.status).toBe(200);
|
||||
expect(res1.headers.get("Content-Type")).toBe("image/avif");
|
||||
_tmp2 = {};
|
||||
return [
|
||||
4,
|
||||
fetchViaHTTP(appPort, "/_next/image", query, (_tmp2.headers = {
|
||||
accept: "image/webp"
|
||||
}, _tmp2))
|
||||
];
|
||||
case 2:
|
||||
res2 = _state.sent();
|
||||
expect(res2.status).toBe(200);
|
||||
expect(res2.headers.get("Content-Type")).toBe("image/webp");
|
||||
_tmp3 = {};
|
||||
return [
|
||||
4,
|
||||
fetchViaHTTP(appPort, "/_next/image", query, (_tmp3.headers = {
|
||||
accept: "image/jpeg"
|
||||
}, _tmp3))
|
||||
];
|
||||
case 3:
|
||||
res3 = _state.sent();
|
||||
expect(res3.status).toBe(200);
|
||||
expect(res3.headers.get("Content-Type")).toBe("image/jpeg");
|
||||
return [
|
||||
4,
|
||||
res1.buffer()
|
||||
];
|
||||
case 4:
|
||||
avif = _state.sent().byteLength;
|
||||
return [
|
||||
4,
|
||||
res2.buffer()
|
||||
];
|
||||
case 5:
|
||||
webp = _state.sent().byteLength;
|
||||
return [
|
||||
4,
|
||||
res3.buffer()
|
||||
];
|
||||
case 6:
|
||||
jpeg = _state.sent().byteLength;
|
||||
_tmp4 = {};
|
||||
console.log((_tmp4.isSharp = isSharp, _tmp4.w = w, _tmp4.avif = avif, _tmp4.webp = webp, _tmp4.jpeg = jpeg, _tmp4));
|
||||
expect(webp).toBeLessThan(jpeg);
|
||||
expect(avif).toBeLessThan(webp);
|
||||
return [
|
||||
2
|
||||
];
|
||||
}
|
||||
});
|
||||
}));
|
||||
case 3:
|
||||
res1 = _ctx.sent;
|
||||
expect(res1.status).toBe(200);
|
||||
expect(res1.headers.get("Content-Type")).toBe("image/avif");
|
||||
_ctx.next = 8;
|
||||
return fetchViaHTTP(appPort, "/_next/image", query, {
|
||||
headers: {
|
||||
accept: "image/webp"
|
||||
}
|
||||
});
|
||||
case 8:
|
||||
res2 = _ctx.sent;
|
||||
expect(res2.status).toBe(200);
|
||||
expect(res2.headers.get("Content-Type")).toBe("image/webp");
|
||||
_ctx.next = 13;
|
||||
return fetchViaHTTP(appPort, "/_next/image", query, {
|
||||
headers: {
|
||||
accept: "image/jpeg"
|
||||
}
|
||||
});
|
||||
case 13:
|
||||
res3 = _ctx.sent;
|
||||
expect(res3.status).toBe(200);
|
||||
expect(res3.headers.get("Content-Type")).toBe("image/jpeg");
|
||||
_ctx.next = 18;
|
||||
return res1.buffer();
|
||||
case 18:
|
||||
avif = _ctx.sent.byteLength;
|
||||
_ctx.next = 21;
|
||||
return res2.buffer();
|
||||
case 21:
|
||||
webp = _ctx.sent.byteLength;
|
||||
_ctx.next = 24;
|
||||
return res3.buffer();
|
||||
case 24:
|
||||
jpeg = _ctx.sent.byteLength;
|
||||
console.log({
|
||||
isSharp: isSharp,
|
||||
w: w,
|
||||
avif: avif,
|
||||
webp: webp,
|
||||
jpeg: jpeg
|
||||
});
|
||||
expect(webp).toBeLessThan(jpeg);
|
||||
expect(avif).toBeLessThan(webp);
|
||||
case 28:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
})));
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"mappings": "AAAAA;;AAAAA,EAAE,CAAC,6DAA6D,gBAAE,oBAAA,WAAY;QACpEC,KAAK,QACLC,IAAI,SAQJC,IAAI,SAQJC,IAAI,SAQJC,IAAI,EACJC,IAAI,EACJC,IAAI;;;;;gBA3BJN,KAAK,SAAKO,GAAG,GAAE,WAAW,OAAEC,CAAC,GAADA,CAAC,OAAEC,CAAC,GAAE,EAAE,OAAE,CAAC;;gBAChC;;oBAAMC,YAAY,CAACC,OAAO,EAAE,cAAc,EAAEX,KAAK,SAC1DY,OAAO,GAAE;wBACLC,MAAM,EAAE,YAAY;qBACvB,SACH;kBAAA;;gBAJIZ,IAAI,GAAG,aAIX,CAAA;gBACFa,MAAM,CAACb,IAAI,CAACc,MAAM,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAC9BF,MAAM,CAACb,IAAI,CAACW,OAAO,CAACK,GAAG,CAAC,cAAc,CAAC,CAAC,CAACD,IAAI,CAAC,YAAY,CAAC,CAAC;;gBAE/C;;oBAAMN,YAAY,CAACC,OAAO,EAAE,cAAc,EAAEX,KAAK,SAC1DY,OAAO,GAAE;wBACLC,MAAM,EAAE,YAAY;qBACvB,SACH;kBAAA;;gBAJIX,IAAI,GAAG,aAIX,CAAA;gBACFY,MAAM,CAACZ,IAAI,CAACa,MAAM,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAC9BF,MAAM,CAACZ,IAAI,CAACU,OAAO,CAACK,GAAG,CAAC,cAAc,CAAC,CAAC,CAACD,IAAI,CAAC,YAAY,CAAC,CAAC;;gBAE/C;;oBAAMN,YAAY,CAACC,OAAO,EAAE,cAAc,EAAEX,KAAK,SAC1DY,OAAO,GAAE;wBACLC,MAAM,EAAE,YAAY;qBACvB,SACH;kBAAA;;gBAJIV,IAAI,GAAG,aAIX,CAAA;gBACFW,MAAM,CAACX,IAAI,CAACY,MAAM,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAC9BF,MAAM,CAACX,IAAI,CAACS,OAAO,CAACK,GAAG,CAAC,cAAc,CAAC,CAAC,CAACD,IAAI,CAAC,YAAY,CAAC,CAAC;gBAE9C;;oBAAMf,IAAI,CAACiB,MAAM,EAAE;kBAAA;;gBAA3Bd,IAAI,GAAG,AAAC,aAAmB,CAAEe,UAAU,CAAA;gBAC/B;;oBAAMjB,IAAI,CAACgB,MAAM,EAAE;kBAAA;;gBAA3Bb,IAAI,GAAG,AAAC,aAAmB,CAAEc,UAAU,CAAA;gBAC/B;;oBAAMhB,IAAI,CAACe,MAAM,EAAE;kBAAA;;gBAA3BZ,IAAI,GAAG,AAAC,aAAmB,CAAEa,UAAU,CAAA;;gBAE7CC,OAAO,CAACC,GAAG,QAAGC,OAAO,GAAPA,OAAO,QAAEd,CAAC,GAADA,CAAC,QAAEJ,IAAI,GAAJA,IAAI,QAAEC,IAAI,GAAJA,IAAI,QAAEC,IAAI,GAAJA,IAAI,SAAG,CAAC;gBAE9CQ,MAAM,CAACT,IAAI,CAAC,CAACkB,YAAY,CAACjB,IAAI,CAAC,CAAC;gBAChCQ,MAAM,CAACV,IAAI,CAAC,CAACmB,YAAY,CAAClB,IAAI,CAAC,CAAC;;;;;;AACpC,CAAC,CAAA,CAAC,CAAC",
|
||||
"mappings": "AAAAA;;AAAAA,EAAE,CAAC,6DAA6D,gBAAE,0DAAA,mBAAY;QACpEC,KAAK,EACLC,IAAI,EAQJC,IAAI,EAQJC,IAAI,EAQJC,IAAI,EACJC,IAAI,EACJC,IAAI;;;;gBA3BJN,KAAK,GAAG;oBAAEO,GAAG,EAAE,WAAW;oBAAEC,CAAC,EAADA,CAAC;oBAAEC,CAAC,EAAE,EAAE;iBAAE,CAAC;;uBAC1BC,YAAY,CAACC,OAAO,EAAE,cAAc,EAAEX,KAAK,EAAE;oBAC5DY,OAAO,EAAE;wBACLC,MAAM,EAAE,YAAY;qBACvB;iBACJ,CAAC;;gBAJIZ,IAAI,YAIR,CAAA;gBACFa,MAAM,CAACb,IAAI,CAACc,MAAM,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAC9BF,MAAM,CAACb,IAAI,CAACW,OAAO,CAACK,GAAG,CAAC,cAAc,CAAC,CAAC,CAACD,IAAI,CAAC,YAAY,CAAC,CAAC;;uBAEzCN,YAAY,CAACC,OAAO,EAAE,cAAc,EAAEX,KAAK,EAAE;oBAC5DY,OAAO,EAAE;wBACLC,MAAM,EAAE,YAAY;qBACvB;iBACJ,CAAC;;gBAJIX,IAAI,YAIR,CAAA;gBACFY,MAAM,CAACZ,IAAI,CAACa,MAAM,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAC9BF,MAAM,CAACZ,IAAI,CAACU,OAAO,CAACK,GAAG,CAAC,cAAc,CAAC,CAAC,CAACD,IAAI,CAAC,YAAY,CAAC,CAAC;;uBAEzCN,YAAY,CAACC,OAAO,EAAE,cAAc,EAAEX,KAAK,EAAE;oBAC5DY,OAAO,EAAE;wBACLC,MAAM,EAAE,YAAY;qBACvB;iBACJ,CAAC;;gBAJIV,IAAI,YAIR,CAAA;gBACFW,MAAM,CAACX,IAAI,CAACY,MAAM,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAC9BF,MAAM,CAACX,IAAI,CAACS,OAAO,CAACK,GAAG,CAAC,cAAc,CAAC,CAAC,CAACD,IAAI,CAAC,YAAY,CAAC,CAAC;;uBAExCf,IAAI,CAACiB,MAAM,EAAE;;gBAA3Bd,IAAI,GAAG,UAAsBe,UAAU,CAAA;;uBACzBjB,IAAI,CAACgB,MAAM,EAAE;;gBAA3Bb,IAAI,GAAG,UAAsBc,UAAU,CAAA;;uBACzBhB,IAAI,CAACe,MAAM,EAAE;;gBAA3BZ,IAAI,GAAG,UAAsBa,UAAU,CAAA;gBAE7CC,OAAO,CAACC,GAAG,CAAC;oBAAEC,OAAO,EAAPA,OAAO;oBAAEd,CAAC,EAADA,CAAC;oBAAEJ,IAAI,EAAJA,IAAI;oBAAEC,IAAI,EAAJA,IAAI;oBAAEC,IAAI,EAAJA,IAAI;iBAAE,CAAC,CAAC;gBAE9CQ,MAAM,CAACT,IAAI,CAAC,CAACkB,YAAY,CAACjB,IAAI,CAAC,CAAC;gBAChCQ,MAAM,CAACV,IAAI,CAAC,CAACmB,YAAY,CAAClB,IAAI,CAAC,CAAC;;;;;;AACpC,CAAC,EAAA,CAAC,CAAC",
|
||||
"names": [
|
||||
"it",
|
||||
"query",
|
||||
|
@ -1,70 +1,69 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
it("should compress avif smaller than webp and smaller than jpg", /*#__PURE__*/ _async_to_generator(function() {
|
||||
var query, _tmp, res1, _tmp1, res2, _tmp2, res3, _tmp3, avif, webp, jpeg, _tmp4;
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
it("should compress avif smaller than webp and smaller than jpg", /*#__PURE__*/ _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
var query, res1, res2, res3, avif, webp, jpeg;
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
_tmp = {};
|
||||
query = (_tmp.url = "/test.jpg", _tmp.w = w, _tmp.q = 75, _tmp);
|
||||
_tmp1 = {};
|
||||
return [
|
||||
4,
|
||||
fetchViaHTTP(appPort, "/_next/image", query, (_tmp1.headers = {
|
||||
query = {
|
||||
url: "/test.jpg",
|
||||
w: w,
|
||||
q: 75
|
||||
};
|
||||
_ctx.next = 3;
|
||||
return fetchViaHTTP(appPort, "/_next/image", query, {
|
||||
headers: {
|
||||
accept: "image/avif"
|
||||
}, _tmp1))
|
||||
];
|
||||
case 1:
|
||||
res1 = _state.sent();
|
||||
expect(res1.status).toBe(200);
|
||||
expect(res1.headers.get("Content-Type")).toBe("image/avif");
|
||||
_tmp2 = {};
|
||||
return [
|
||||
4,
|
||||
fetchViaHTTP(appPort, "/_next/image", query, (_tmp2.headers = {
|
||||
accept: "image/webp"
|
||||
}, _tmp2))
|
||||
];
|
||||
case 2:
|
||||
res2 = _state.sent();
|
||||
expect(res2.status).toBe(200);
|
||||
expect(res2.headers.get("Content-Type")).toBe("image/webp");
|
||||
_tmp3 = {};
|
||||
return [
|
||||
4,
|
||||
fetchViaHTTP(appPort, "/_next/image", query, (_tmp3.headers = {
|
||||
accept: "image/jpeg"
|
||||
}, _tmp3))
|
||||
];
|
||||
case 3:
|
||||
res3 = _state.sent();
|
||||
expect(res3.status).toBe(200);
|
||||
expect(res3.headers.get("Content-Type")).toBe("image/jpeg");
|
||||
return [
|
||||
4,
|
||||
res1.buffer()
|
||||
];
|
||||
case 4:
|
||||
avif = _state.sent().byteLength;
|
||||
return [
|
||||
4,
|
||||
res2.buffer()
|
||||
];
|
||||
case 5:
|
||||
webp = _state.sent().byteLength;
|
||||
return [
|
||||
4,
|
||||
res3.buffer()
|
||||
];
|
||||
case 6:
|
||||
jpeg = _state.sent().byteLength;
|
||||
_tmp4 = {};
|
||||
console.log((_tmp4.isSharp = isSharp, _tmp4.w = w, _tmp4.avif = avif, _tmp4.webp = webp, _tmp4.jpeg = jpeg, _tmp4));
|
||||
expect(webp).toBeLessThan(jpeg);
|
||||
expect(avif).toBeLessThan(webp);
|
||||
return [
|
||||
2
|
||||
];
|
||||
}
|
||||
});
|
||||
}));
|
||||
case 3:
|
||||
res1 = _ctx.sent;
|
||||
expect(res1.status).toBe(200);
|
||||
expect(res1.headers.get("Content-Type")).toBe("image/avif");
|
||||
_ctx.next = 8;
|
||||
return fetchViaHTTP(appPort, "/_next/image", query, {
|
||||
headers: {
|
||||
accept: "image/webp"
|
||||
}
|
||||
});
|
||||
case 8:
|
||||
res2 = _ctx.sent;
|
||||
expect(res2.status).toBe(200);
|
||||
expect(res2.headers.get("Content-Type")).toBe("image/webp");
|
||||
_ctx.next = 13;
|
||||
return fetchViaHTTP(appPort, "/_next/image", query, {
|
||||
headers: {
|
||||
accept: "image/jpeg"
|
||||
}
|
||||
});
|
||||
case 13:
|
||||
res3 = _ctx.sent;
|
||||
expect(res3.status).toBe(200);
|
||||
expect(res3.headers.get("Content-Type")).toBe("image/jpeg");
|
||||
_ctx.next = 18;
|
||||
return res1.buffer();
|
||||
case 18:
|
||||
avif = _ctx.sent.byteLength;
|
||||
_ctx.next = 21;
|
||||
return res2.buffer();
|
||||
case 21:
|
||||
webp = _ctx.sent.byteLength;
|
||||
_ctx.next = 24;
|
||||
return res3.buffer();
|
||||
case 24:
|
||||
jpeg = _ctx.sent.byteLength;
|
||||
console.log({
|
||||
isSharp: isSharp,
|
||||
w: w,
|
||||
avif: avif,
|
||||
webp: webp,
|
||||
jpeg: jpeg
|
||||
});
|
||||
expect(webp).toBeLessThan(jpeg);
|
||||
expect(avif).toBeLessThan(webp);
|
||||
case 28:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
})));
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"mappings": "AAAAA;;AAAAA,EAAE,CAAC,6DAA6D,gBAAE,oBAAA,WAAY;QAOpEC,KAAK,QACLC,IAAI,SAQJC,IAAI,SAQJC,IAAI,SAQJC,IAAI,EACJC,IAAI,EACJC,IAAI;;;;;gBA3BJN,KAAK,SAAKO,GAAG,GAAE,WAAW,OAAEC,CAAC,GAADA,CAAC,OAAEC,CAAC,GAAE,EAAE,OAAE,CAAC;;gBAChC;;oBAAMC,YAAY,CAACC,OAAO,EAAE,cAAc,EAAEX,KAAK,SAC1DY,OAAO,GAAE;wBACLC,MAAM,EAAE,YAAY;qBACvB,SACH;kBAAA;;gBAJIZ,IAAI,GAAG,aAIX,CAAA;gBACFa,MAAM,CAACb,IAAI,CAACc,MAAM,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAC9BF,MAAM,CAACb,IAAI,CAACW,OAAO,CAACK,GAAG,CAAC,cAAc,CAAC,CAAC,CAACD,IAAI,CAAC,YAAY,CAAC,CAAC;;gBAE/C;;oBAAMN,YAAY,CAACC,OAAO,EAAE,cAAc,EAAEX,KAAK,SAC1DY,OAAO,GAAE;wBACLC,MAAM,EAAE,YAAY;qBACvB,SACH;kBAAA;;gBAJIX,IAAI,GAAG,aAIX,CAAA;gBACFY,MAAM,CAACZ,IAAI,CAACa,MAAM,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAC9BF,MAAM,CAACZ,IAAI,CAACU,OAAO,CAACK,GAAG,CAAC,cAAc,CAAC,CAAC,CAACD,IAAI,CAAC,YAAY,CAAC,CAAC;;gBAE/C;;oBAAMN,YAAY,CAACC,OAAO,EAAE,cAAc,EAAEX,KAAK,SAC1DY,OAAO,GAAE;wBACLC,MAAM,EAAE,YAAY;qBACvB,SACH;kBAAA;;gBAJIV,IAAI,GAAG,aAIX,CAAA;gBACFW,MAAM,CAACX,IAAI,CAACY,MAAM,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAC9BF,MAAM,CAACX,IAAI,CAACS,OAAO,CAACK,GAAG,CAAC,cAAc,CAAC,CAAC,CAACD,IAAI,CAAC,YAAY,CAAC,CAAC;gBAE9C;;oBAAMf,IAAI,CAACiB,MAAM,EAAE;kBAAA;;gBAA3Bd,IAAI,GAAG,AAAC,aAAmB,CAAEe,UAAU,CAAA;gBAC/B;;oBAAMjB,IAAI,CAACgB,MAAM,EAAE;kBAAA;;gBAA3Bb,IAAI,GAAG,AAAC,aAAmB,CAAEc,UAAU,CAAA;gBAC/B;;oBAAMhB,IAAI,CAACe,MAAM,EAAE;kBAAA;;gBAA3BZ,IAAI,GAAG,AAAC,aAAmB,CAAEa,UAAU,CAAA;;gBAE7CC,OAAO,CAACC,GAAG,QAAGC,OAAO,GAAPA,OAAO,QAAEd,CAAC,GAADA,CAAC,QAAEJ,IAAI,GAAJA,IAAI,QAAEC,IAAI,GAAJA,IAAI,QAAEC,IAAI,GAAJA,IAAI,SAAG,CAAC;gBAE9CQ,MAAM,CAACT,IAAI,CAAC,CAACkB,YAAY,CAACjB,IAAI,CAAC,CAAC;gBAChCQ,MAAM,CAACV,IAAI,CAAC,CAACmB,YAAY,CAAClB,IAAI,CAAC,CAAC;;;;;;AACpC,CAAC,CAAA,CAAC,CAAC",
|
||||
"mappings": "AAAAA;;AAAAA,EAAE,CAAC,6DAA6D,gBAAE,0DAAA,mBAAY;QAOpEC,KAAK,EACLC,IAAI,EAQJC,IAAI,EAQJC,IAAI,EAQJC,IAAI,EACJC,IAAI,EACJC,IAAI;;;;gBA3BJN,KAAK,GAAG;oBAAEO,GAAG,EAAE,WAAW;oBAAEC,CAAC,EAADA,CAAC;oBAAEC,CAAC,EAAE,EAAE;iBAAE,CAAC;;uBAC1BC,YAAY,CAACC,OAAO,EAAE,cAAc,EAAEX,KAAK,EAAE;oBAC5DY,OAAO,EAAE;wBACLC,MAAM,EAAE,YAAY;qBACvB;iBACJ,CAAC;;gBAJIZ,IAAI,YAIR,CAAA;gBACFa,MAAM,CAACb,IAAI,CAACc,MAAM,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAC9BF,MAAM,CAACb,IAAI,CAACW,OAAO,CAACK,GAAG,CAAC,cAAc,CAAC,CAAC,CAACD,IAAI,CAAC,YAAY,CAAC,CAAC;;uBAEzCN,YAAY,CAACC,OAAO,EAAE,cAAc,EAAEX,KAAK,EAAE;oBAC5DY,OAAO,EAAE;wBACLC,MAAM,EAAE,YAAY;qBACvB;iBACJ,CAAC;;gBAJIX,IAAI,YAIR,CAAA;gBACFY,MAAM,CAACZ,IAAI,CAACa,MAAM,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAC9BF,MAAM,CAACZ,IAAI,CAACU,OAAO,CAACK,GAAG,CAAC,cAAc,CAAC,CAAC,CAACD,IAAI,CAAC,YAAY,CAAC,CAAC;;uBAEzCN,YAAY,CAACC,OAAO,EAAE,cAAc,EAAEX,KAAK,EAAE;oBAC5DY,OAAO,EAAE;wBACLC,MAAM,EAAE,YAAY;qBACvB;iBACJ,CAAC;;gBAJIV,IAAI,YAIR,CAAA;gBACFW,MAAM,CAACX,IAAI,CAACY,MAAM,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAC9BF,MAAM,CAACX,IAAI,CAACS,OAAO,CAACK,GAAG,CAAC,cAAc,CAAC,CAAC,CAACD,IAAI,CAAC,YAAY,CAAC,CAAC;;uBAExCf,IAAI,CAACiB,MAAM,EAAE;;gBAA3Bd,IAAI,GAAG,UAAsBe,UAAU,CAAA;;uBACzBjB,IAAI,CAACgB,MAAM,EAAE;;gBAA3Bb,IAAI,GAAG,UAAsBc,UAAU,CAAA;;uBACzBhB,IAAI,CAACe,MAAM,EAAE;;gBAA3BZ,IAAI,GAAG,UAAsBa,UAAU,CAAA;gBAE7CC,OAAO,CAACC,GAAG,CAAC;oBAAEC,OAAO,EAAPA,OAAO;oBAAEd,CAAC,EAADA,CAAC;oBAAEJ,IAAI,EAAJA,IAAI;oBAAEC,IAAI,EAAJA,IAAI;oBAAEC,IAAI,EAAJA,IAAI;iBAAE,CAAC,CAAC;gBAE9CQ,MAAM,CAACT,IAAI,CAAC,CAACkB,YAAY,CAACjB,IAAI,CAAC,CAAC;gBAChCQ,MAAM,CAACV,IAAI,CAAC,CAACmB,YAAY,CAAClB,IAAI,CAAC,CAAC;;;;;;AACpC,CAAC,EAAA,CAAC,CAAC",
|
||||
"names": [
|
||||
"it",
|
||||
"query",
|
||||
|
@ -3,13 +3,10 @@ $DIR/tests/stacktrace/issue-622/input/index.js:3
|
||||
^
|
||||
|
||||
ReferenceError: call is not defined
|
||||
at null.<anonymous> ($DIR/tests/stacktrace/issue-622/input/index.js:3:9)
|
||||
at null.step ($DIR/tests/stacktrace/issue-622/input/index.js:1:1)
|
||||
at Object.next ($DIR/tests/stacktrace/issue-622/input/index.js:1:1)
|
||||
at null._callee$ ($DIR/tests/stacktrace/issue-622/input/index.js:3:9)
|
||||
at null.asyncGeneratorStep ($DIR/tests/stacktrace/issue-622/input/index.js:1:1)
|
||||
at null._next ($DIR/tests/stacktrace/issue-622/input/index.js:1:1)
|
||||
at null.<anonymous> ($DIR/tests/stacktrace/issue-622/input/index.js:1:1)
|
||||
at new Promise (<anonymous>)
|
||||
at null.<anonymous> ($DIR/tests/stacktrace/issue-622/input/index.js:1:1)
|
||||
at null._foo ($DIR/tests/stacktrace/issue-622/input/index.js:1:19)
|
||||
at null.foo ($DIR/tests/stacktrace/issue-622/input/index.js:1:19)
|
||||
|
@ -1,10 +1,15 @@
|
||||
// @target: es6
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var _marked = /*#__PURE__*/ regeneratorRuntime.mark(foo);
|
||||
function foo() {
|
||||
var v;
|
||||
return _ts_generator(this, function(_state) {
|
||||
return [
|
||||
2
|
||||
];
|
||||
});
|
||||
return regeneratorRuntime.wrap(function foo$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
;
|
||||
case 1:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _marked);
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
|
@ -1,9 +1,12 @@
|
||||
// @target: es6
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var _marked = /*#__PURE__*/ regeneratorRuntime.mark(foo);
|
||||
function foo() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
return [
|
||||
2
|
||||
];
|
||||
});
|
||||
return regeneratorRuntime.wrap(function foo$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _marked);
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
|
@ -1,23 +1,23 @@
|
||||
// @target: es6
|
||||
import _define_property from "@swc/helpers/src/_define_property.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var _marked = /*#__PURE__*/ regeneratorRuntime.mark(foo);
|
||||
function foo() {
|
||||
var v, _tmp, _tmp1;
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
var v;
|
||||
return regeneratorRuntime.wrap(function foo$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
_tmp1 = {};
|
||||
_tmp = [
|
||||
_tmp1
|
||||
];
|
||||
return [
|
||||
4
|
||||
];
|
||||
case 1:
|
||||
v = _define_property.apply(void 0, _tmp.concat(_state.sent(), foo));
|
||||
return [
|
||||
2
|
||||
];
|
||||
_ctx.t0 = _define_property;
|
||||
_ctx.t1 = {};
|
||||
_ctx.next = 4;
|
||||
return;
|
||||
case 4:
|
||||
_ctx.t2 = _ctx.sent;
|
||||
_ctx.t3 = foo;
|
||||
v = (0, _ctx.t0)(_ctx.t1, _ctx.t2, _ctx.t3);
|
||||
case 7:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
});
|
||||
}, _marked);
|
||||
}
|
||||
|
@ -1,2 +1,2 @@
|
||||
import _define_property from "@swc/helpers/src/_define_property.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
|
@ -1,9 +1,11 @@
|
||||
// @target: es6
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
var v = function v() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
return [
|
||||
2
|
||||
];
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var v = /*#__PURE__*/ regeneratorRuntime.mark(function v() {
|
||||
return regeneratorRuntime.wrap(function v$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, v);
|
||||
});
|
||||
};
|
||||
|
@ -1 +1 @@
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
|
@ -1,9 +1,11 @@
|
||||
// @target: es6
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
var v = function foo() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
return [
|
||||
2
|
||||
];
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var v = /*#__PURE__*/ regeneratorRuntime.mark(function foo() {
|
||||
return regeneratorRuntime.wrap(function foo$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, foo);
|
||||
});
|
||||
};
|
||||
|
@ -1 +1 @@
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
|
@ -1,11 +1,13 @@
|
||||
// @target: es6
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var v = {
|
||||
foo: function foo() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
return [
|
||||
2
|
||||
];
|
||||
});
|
||||
foo: /*#__PURE__*/ regeneratorRuntime.mark(function foo() {
|
||||
return regeneratorRuntime.wrap(function foo$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, foo);
|
||||
})
|
||||
};
|
||||
|
@ -1 +1 @@
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
|
@ -1,10 +1,12 @@
|
||||
// @target: es6
|
||||
import _define_property from "@swc/helpers/src/_define_property.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
var v = _define_property({}, foo(), function() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
return [
|
||||
2
|
||||
];
|
||||
});
|
||||
});
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var v = _define_property({}, foo(), /*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
|
@ -1,9 +1,11 @@
|
||||
import _define_property from "@swc/helpers/src/_define_property.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
_define_property({}, foo(), function() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
return [
|
||||
2
|
||||
];
|
||||
});
|
||||
});
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
_define_property({}, foo(), regeneratorRuntime.mark(function _callee() {
|
||||
return regeneratorRuntime.wrap(function(_ctx) {
|
||||
for(;;)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
|
@ -1,18 +1,20 @@
|
||||
// @target: es6
|
||||
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var C = /*#__PURE__*/ function() {
|
||||
"use strict";
|
||||
function C() {
|
||||
_class_call_check(this, C);
|
||||
}
|
||||
var _proto = C.prototype;
|
||||
_proto.foo = function foo() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
return [
|
||||
2
|
||||
];
|
||||
_proto.foo = /*#__PURE__*/ regeneratorRuntime.mark(function foo() {
|
||||
return regeneratorRuntime.wrap(function foo$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, foo);
|
||||
});
|
||||
};
|
||||
return C;
|
||||
}();
|
||||
|
@ -1,2 +1,2 @@
|
||||
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
|
@ -1,18 +1,20 @@
|
||||
// @target: es6
|
||||
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var C = /*#__PURE__*/ function() {
|
||||
"use strict";
|
||||
function C() {
|
||||
_class_call_check(this, C);
|
||||
}
|
||||
var _proto = C.prototype;
|
||||
_proto.foo = function foo() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
return [
|
||||
2
|
||||
];
|
||||
_proto.foo = /*#__PURE__*/ regeneratorRuntime.mark(function foo() {
|
||||
return regeneratorRuntime.wrap(function foo$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, foo);
|
||||
});
|
||||
};
|
||||
return C;
|
||||
}();
|
||||
|
@ -1,2 +1,2 @@
|
||||
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
|
@ -1,18 +1,20 @@
|
||||
// @target: es6
|
||||
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var C = /*#__PURE__*/ function() {
|
||||
"use strict";
|
||||
function C() {
|
||||
_class_call_check(this, C);
|
||||
}
|
||||
var _proto = C.prototype;
|
||||
_proto[foo] = function() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
return [
|
||||
2
|
||||
];
|
||||
_proto[foo] = /*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
});
|
||||
};
|
||||
return C;
|
||||
}();
|
||||
|
@ -1,2 +1,2 @@
|
||||
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
|
@ -1,18 +1,20 @@
|
||||
// @target: es6
|
||||
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var C = /*#__PURE__*/ function() {
|
||||
"use strict";
|
||||
function C() {
|
||||
_class_call_check(this, C);
|
||||
}
|
||||
var _proto = C.prototype;
|
||||
_proto.foo = function foo() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
return [
|
||||
2
|
||||
];
|
||||
_proto.foo = /*#__PURE__*/ regeneratorRuntime.mark(function foo() {
|
||||
return regeneratorRuntime.wrap(function foo$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, foo);
|
||||
});
|
||||
};
|
||||
return C;
|
||||
}();
|
||||
|
@ -1,2 +1,2 @@
|
||||
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
|
@ -1,20 +1,16 @@
|
||||
// @target: es6
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var v = {
|
||||
foo: function foo1() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
foo: /*#__PURE__*/ regeneratorRuntime.mark(function foo1() {
|
||||
return regeneratorRuntime.wrap(function foo$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
return [
|
||||
4,
|
||||
foo
|
||||
];
|
||||
case 1:
|
||||
_state.sent();
|
||||
return [
|
||||
2
|
||||
];
|
||||
}
|
||||
});
|
||||
_ctx.next = 2;
|
||||
return foo;
|
||||
case 2:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, foo1);
|
||||
})
|
||||
};
|
||||
|
@ -1 +1 @@
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
|
@ -1,27 +1,23 @@
|
||||
// @target: es6
|
||||
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var C = /*#__PURE__*/ function() {
|
||||
"use strict";
|
||||
function C() {
|
||||
_class_call_check(this, C);
|
||||
}
|
||||
var _proto = C.prototype;
|
||||
_proto.foo = function foo1() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
_proto.foo = /*#__PURE__*/ regeneratorRuntime.mark(function foo1() {
|
||||
return regeneratorRuntime.wrap(function foo$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
return [
|
||||
4,
|
||||
foo
|
||||
];
|
||||
case 1:
|
||||
_state.sent();
|
||||
return [
|
||||
2
|
||||
];
|
||||
_ctx.next = 2;
|
||||
return foo;
|
||||
case 2:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, foo1);
|
||||
});
|
||||
};
|
||||
return C;
|
||||
}();
|
||||
|
@ -1,2 +1,2 @@
|
||||
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
|
@ -1,17 +1,15 @@
|
||||
// @target: es6
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var _marked = /*#__PURE__*/ regeneratorRuntime.mark(foo);
|
||||
function foo() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
return regeneratorRuntime.wrap(function foo$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
return [
|
||||
4
|
||||
];
|
||||
case 1:
|
||||
_state.sent();
|
||||
return [
|
||||
2
|
||||
];
|
||||
_ctx.next = 2;
|
||||
return;
|
||||
case 2:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
});
|
||||
}, _marked);
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
|
@ -1,28 +1,29 @@
|
||||
// @target: es6
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var _marked = /*#__PURE__*/ regeneratorRuntime.mark(foo);
|
||||
function foo() {
|
||||
var bar;
|
||||
return _ts_generator(this, function(_state) {
|
||||
bar = function bar() {
|
||||
function quux() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
return regeneratorRuntime.wrap(function foo$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
return [
|
||||
4,
|
||||
foo
|
||||
];
|
||||
case 1:
|
||||
_state.sent();
|
||||
return [
|
||||
2
|
||||
];
|
||||
bar = function bar() {
|
||||
var _marked = /*#__PURE__*/ regeneratorRuntime.mark(quux);
|
||||
function quux() {
|
||||
return regeneratorRuntime.wrap(function quux$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
_ctx.next = 2;
|
||||
return foo;
|
||||
case 2:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
});
|
||||
}, _marked);
|
||||
}
|
||||
};
|
||||
return [
|
||||
2
|
||||
];
|
||||
});
|
||||
case 1:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _marked);
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
|
@ -1,22 +1,18 @@
|
||||
// @target: es6
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var _marked = /*#__PURE__*/ regeneratorRuntime.mark(foo);
|
||||
function foo() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
return regeneratorRuntime.wrap(function foo$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
return [
|
||||
4
|
||||
];
|
||||
case 1:
|
||||
_state.sent();
|
||||
return [
|
||||
4
|
||||
];
|
||||
_ctx.next = 2;
|
||||
return;
|
||||
case 2:
|
||||
_state.sent();
|
||||
return [
|
||||
2
|
||||
];
|
||||
_ctx.next = 4;
|
||||
return;
|
||||
case 4:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
});
|
||||
}, _marked);
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
|
@ -1,22 +1,18 @@
|
||||
// @target: es6
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var _marked = /*#__PURE__*/ regeneratorRuntime.mark(foo);
|
||||
function foo() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
return regeneratorRuntime.wrap(function foo$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
return [
|
||||
4
|
||||
];
|
||||
case 1:
|
||||
_state.sent();
|
||||
return [
|
||||
4
|
||||
];
|
||||
_ctx.next = 2;
|
||||
return;
|
||||
case 2:
|
||||
_state.sent();
|
||||
return [
|
||||
2
|
||||
];
|
||||
_ctx.next = 4;
|
||||
return;
|
||||
case 4:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
});
|
||||
}, _marked);
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
|
@ -1,19 +1,14 @@
|
||||
// @target: es6
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import _ts_values from "@swc/helpers/src/_ts_values.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var _marked = /*#__PURE__*/ regeneratorRuntime.mark(foo);
|
||||
function foo() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
return regeneratorRuntime.wrap(function foo$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
return [
|
||||
5,
|
||||
_ts_values(foo)
|
||||
];
|
||||
return _ctx.delegateYield(foo, "t0", 1);
|
||||
case 1:
|
||||
_state.sent();
|
||||
return [
|
||||
2
|
||||
];
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
});
|
||||
}, _marked);
|
||||
}
|
||||
|
@ -1,2 +1,13 @@
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import _ts_values from "@swc/helpers/src/_ts_values.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var _marked = regeneratorRuntime.mark(foo);
|
||||
function foo() {
|
||||
return regeneratorRuntime.wrap(function(_ctx) {
|
||||
for(;;)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
return _ctx.delegateYield(foo, "t0", 1);
|
||||
case 1:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _marked);
|
||||
}
|
||||
|
@ -1,18 +1,15 @@
|
||||
// @target: es6
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var _marked = /*#__PURE__*/ regeneratorRuntime.mark(foo);
|
||||
function foo() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
return regeneratorRuntime.wrap(function foo$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
return [
|
||||
4,
|
||||
foo
|
||||
];
|
||||
case 1:
|
||||
_state.sent();
|
||||
return [
|
||||
2
|
||||
];
|
||||
_ctx.next = 2;
|
||||
return foo;
|
||||
case 2:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
});
|
||||
}, _marked);
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
|
@ -1,18 +1,14 @@
|
||||
// @target: es6
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
var v = function v() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var v = /*#__PURE__*/ regeneratorRuntime.mark(function v() {
|
||||
return regeneratorRuntime.wrap(function v$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
return [
|
||||
4,
|
||||
foo
|
||||
];
|
||||
case 1:
|
||||
_state.sent();
|
||||
return [
|
||||
2
|
||||
];
|
||||
_ctx.next = 2;
|
||||
return foo;
|
||||
case 2:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, v);
|
||||
});
|
||||
};
|
||||
|
@ -1 +1 @@
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
|
@ -1,19 +1,14 @@
|
||||
// @target: es6
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import _ts_values from "@swc/helpers/src/_ts_values.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var _marked = /*#__PURE__*/ regeneratorRuntime.mark(g);
|
||||
function g() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
switch(_state.label){
|
||||
return regeneratorRuntime.wrap(function g$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
return [
|
||||
5,
|
||||
_ts_values([])
|
||||
];
|
||||
return _ctx.delegateYield([], "t0", 1);
|
||||
case 1:
|
||||
_state.sent();
|
||||
return [
|
||||
2
|
||||
];
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
});
|
||||
}, _marked);
|
||||
}
|
||||
|
@ -1,2 +1 @@
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import _ts_values from "@swc/helpers/src/_ts_values.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
|
@ -2,17 +2,19 @@
|
||||
// @lib: es5,es2015.promise
|
||||
// @noEmitHelpers: true
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
function f() {
|
||||
return _f.apply(this, arguments);
|
||||
}
|
||||
function _f() {
|
||||
_f = _async_to_generator(function() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
return [
|
||||
2
|
||||
];
|
||||
});
|
||||
});
|
||||
_f = _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
return _f.apply(this, arguments);
|
||||
}
|
||||
|
@ -1,2 +1,2 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
|
@ -1,17 +1,19 @@
|
||||
// @target: ES6
|
||||
// @noEmitHelpers: true
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
function f() {
|
||||
return _f.apply(this, arguments);
|
||||
}
|
||||
function _f() {
|
||||
_f = _async_to_generator(function() {
|
||||
return _ts_generator(this, function(_state) {
|
||||
return [
|
||||
2
|
||||
];
|
||||
});
|
||||
});
|
||||
_f = _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
return _f.apply(this, arguments);
|
||||
}
|
||||
|
@ -1,2 +1,2 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
|
@ -1,16 +1,20 @@
|
||||
// @target: es2017
|
||||
// @noEmitHelpers: true
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var foo = function() {
|
||||
var _ref = _async_to_generator(function() {
|
||||
var _ref = _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
var v;
|
||||
return _ts_generator(this, function(_state) {
|
||||
return [
|
||||
2
|
||||
];
|
||||
});
|
||||
});
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
;
|
||||
case 1:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
return function foo() {
|
||||
return _ref.apply(this, arguments);
|
||||
};
|
||||
|
@ -1,2 +1,2 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
|
@ -2,16 +2,20 @@
|
||||
// @lib: es5,es2015.promise
|
||||
// @noEmitHelpers: true
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var foo = function() {
|
||||
var _ref = _async_to_generator(function() {
|
||||
var _ref = _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
var v;
|
||||
return _ts_generator(this, function(_state) {
|
||||
return [
|
||||
2
|
||||
];
|
||||
});
|
||||
});
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
;
|
||||
case 1:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
return function foo() {
|
||||
return _ref.apply(this, arguments);
|
||||
};
|
||||
|
@ -1,2 +1,2 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
|
@ -1,16 +1,20 @@
|
||||
// @target: ES6
|
||||
// @noEmitHelpers: true
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
var foo = function() {
|
||||
var _ref = _async_to_generator(function() {
|
||||
var _ref = _async_to_generator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
|
||||
var v;
|
||||
return _ts_generator(this, function(_state) {
|
||||
return [
|
||||
2
|
||||
];
|
||||
});
|
||||
});
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
;
|
||||
case 1:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
return function foo() {
|
||||
return _ref.apply(this, arguments);
|
||||
};
|
||||
|
@ -1,2 +1,2 @@
|
||||
import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs";
|
||||
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
|
||||
import regeneratorRuntime from "regenerator-runtime";
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user