@modern-js/plugin-garfish 2.19.0 → 2.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/cjs/deps/index.js +2 -6
- package/dist/cjs/index.js +3 -19
- package/dist/cjs/runtime/index.js +3 -7
- package/dist/cjs/runtime/plugin.js +7 -23
- package/dist/cjs/runtime/useModuleApps.js +2 -41
- package/dist/cjs/runtime/utils/Context.js +2 -6
- package/dist/cjs/runtime/utils/MApp.js +5 -21
- package/dist/cjs/runtime/utils/apps.js +4 -47
- package/dist/cjs/runtime/utils/setExternal.js +4 -8
- package/dist/cjs/util.js +2 -6
- package/dist/esm/cli/index.js +5 -194
- package/dist/esm/runtime/loadable.js +4 -142
- package/dist/esm/runtime/plugin.js +14 -344
- package/dist/esm/runtime/useModuleApps.js +1 -28
- package/dist/esm/runtime/utils/MApp.js +9 -187
- package/dist/esm/runtime/utils/apps.js +8 -288
- package/dist/esm-node/runtime/plugin.js +1 -13
- package/dist/esm-node/runtime/utils/MApp.js +1 -13
- package/package.json +11 -11
|
@@ -1,190 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return _array_like_to_array(arr);
|
|
11
|
-
}
|
|
12
|
-
function _assert_this_initialized(self) {
|
|
13
|
-
if (self === void 0) {
|
|
14
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
15
|
-
}
|
|
16
|
-
return self;
|
|
17
|
-
}
|
|
18
|
-
function _class_call_check(instance, Constructor) {
|
|
19
|
-
if (!(instance instanceof Constructor)) {
|
|
20
|
-
throw new TypeError("Cannot call a class as a function");
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
function _defineProperties(target, props) {
|
|
24
|
-
for (var i = 0; i < props.length; i++) {
|
|
25
|
-
var descriptor = props[i];
|
|
26
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
27
|
-
descriptor.configurable = true;
|
|
28
|
-
if ("value" in descriptor)
|
|
29
|
-
descriptor.writable = true;
|
|
30
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
34
|
-
if (protoProps)
|
|
35
|
-
_defineProperties(Constructor.prototype, protoProps);
|
|
36
|
-
if (staticProps)
|
|
37
|
-
_defineProperties(Constructor, staticProps);
|
|
38
|
-
return Constructor;
|
|
39
|
-
}
|
|
40
|
-
function _define_property(obj, key, value) {
|
|
41
|
-
if (key in obj) {
|
|
42
|
-
Object.defineProperty(obj, key, {
|
|
43
|
-
value: value,
|
|
44
|
-
enumerable: true,
|
|
45
|
-
configurable: true,
|
|
46
|
-
writable: true
|
|
47
|
-
});
|
|
48
|
-
} else {
|
|
49
|
-
obj[key] = value;
|
|
50
|
-
}
|
|
51
|
-
return obj;
|
|
52
|
-
}
|
|
53
|
-
function _get_prototype_of(o) {
|
|
54
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o2) {
|
|
55
|
-
return o2.__proto__ || Object.getPrototypeOf(o2);
|
|
56
|
-
};
|
|
57
|
-
return _get_prototype_of(o);
|
|
58
|
-
}
|
|
59
|
-
function _inherits(subClass, superClass) {
|
|
60
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
61
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
62
|
-
}
|
|
63
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
64
|
-
constructor: {
|
|
65
|
-
value: subClass,
|
|
66
|
-
writable: true,
|
|
67
|
-
configurable: true
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
if (superClass)
|
|
71
|
-
_set_prototype_of(subClass, superClass);
|
|
72
|
-
}
|
|
73
|
-
function _iterable_to_array(iter) {
|
|
74
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
75
|
-
return Array.from(iter);
|
|
76
|
-
}
|
|
77
|
-
function _non_iterable_spread() {
|
|
78
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
79
|
-
}
|
|
80
|
-
function _object_spread(target) {
|
|
81
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
82
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
83
|
-
var ownKeys = Object.keys(source);
|
|
84
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
85
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
86
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
87
|
-
}));
|
|
88
|
-
}
|
|
89
|
-
ownKeys.forEach(function(key) {
|
|
90
|
-
_define_property(target, key, source[key]);
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
return target;
|
|
94
|
-
}
|
|
95
|
-
function _object_without_properties(source, excluded) {
|
|
96
|
-
if (source == null)
|
|
97
|
-
return {};
|
|
98
|
-
var target = _object_without_properties_loose(source, excluded);
|
|
99
|
-
var key, i;
|
|
100
|
-
if (Object.getOwnPropertySymbols) {
|
|
101
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
102
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
103
|
-
key = sourceSymbolKeys[i];
|
|
104
|
-
if (excluded.indexOf(key) >= 0)
|
|
105
|
-
continue;
|
|
106
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key))
|
|
107
|
-
continue;
|
|
108
|
-
target[key] = source[key];
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
return target;
|
|
112
|
-
}
|
|
113
|
-
function _object_without_properties_loose(source, excluded) {
|
|
114
|
-
if (source == null)
|
|
115
|
-
return {};
|
|
116
|
-
var target = {};
|
|
117
|
-
var sourceKeys = Object.keys(source);
|
|
118
|
-
var key, i;
|
|
119
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
120
|
-
key = sourceKeys[i];
|
|
121
|
-
if (excluded.indexOf(key) >= 0)
|
|
122
|
-
continue;
|
|
123
|
-
target[key] = source[key];
|
|
124
|
-
}
|
|
125
|
-
return target;
|
|
126
|
-
}
|
|
127
|
-
function _possible_constructor_return(self, call) {
|
|
128
|
-
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
129
|
-
return call;
|
|
130
|
-
}
|
|
131
|
-
return _assert_this_initialized(self);
|
|
132
|
-
}
|
|
133
|
-
function _set_prototype_of(o, p) {
|
|
134
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o2, p2) {
|
|
135
|
-
o2.__proto__ = p2;
|
|
136
|
-
return o2;
|
|
137
|
-
};
|
|
138
|
-
return _set_prototype_of(o, p);
|
|
139
|
-
}
|
|
140
|
-
function _to_consumable_array(arr) {
|
|
141
|
-
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
142
|
-
}
|
|
143
|
-
function _type_of(obj) {
|
|
144
|
-
"@swc/helpers - typeof";
|
|
145
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
146
|
-
}
|
|
147
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
148
|
-
if (!o)
|
|
149
|
-
return;
|
|
150
|
-
if (typeof o === "string")
|
|
151
|
-
return _array_like_to_array(o, minLen);
|
|
152
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
153
|
-
if (n === "Object" && o.constructor)
|
|
154
|
-
n = o.constructor.name;
|
|
155
|
-
if (n === "Map" || n === "Set")
|
|
156
|
-
return Array.from(n);
|
|
157
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
158
|
-
return _array_like_to_array(o, minLen);
|
|
159
|
-
}
|
|
160
|
-
function _is_native_reflect_construct() {
|
|
161
|
-
if (typeof Reflect === "undefined" || !Reflect.construct)
|
|
162
|
-
return false;
|
|
163
|
-
if (Reflect.construct.sham)
|
|
164
|
-
return false;
|
|
165
|
-
if (typeof Proxy === "function")
|
|
166
|
-
return true;
|
|
167
|
-
try {
|
|
168
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
169
|
-
}));
|
|
170
|
-
return true;
|
|
171
|
-
} catch (e) {
|
|
172
|
-
return false;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
function _create_super(Derived) {
|
|
176
|
-
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
177
|
-
return function _createSuperInternal() {
|
|
178
|
-
var Super = _get_prototype_of(Derived), result;
|
|
179
|
-
if (hasNativeReflectConstruct) {
|
|
180
|
-
var NewTarget = _get_prototype_of(this).constructor;
|
|
181
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
|
182
|
-
} else {
|
|
183
|
-
result = Super.apply(this, arguments);
|
|
184
|
-
}
|
|
185
|
-
return _possible_constructor_return(this, result);
|
|
186
|
-
};
|
|
187
|
-
}
|
|
1
|
+
import { _ as _assert_this_initialized } from "@swc/helpers/_/_assert_this_initialized";
|
|
2
|
+
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
|
|
3
|
+
import { _ as _create_class } from "@swc/helpers/_/_create_class";
|
|
4
|
+
import { _ as _define_property } from "@swc/helpers/_/_define_property";
|
|
5
|
+
import { _ as _inherits } from "@swc/helpers/_/_inherits";
|
|
6
|
+
import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
7
|
+
import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_properties";
|
|
8
|
+
import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array";
|
|
9
|
+
import { _ as _create_super } from "@swc/helpers/_/_create_super";
|
|
188
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
189
11
|
import React from "react";
|
|
190
12
|
import Garfish from "garfish";
|
|
@@ -1,290 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
function _array_with_holes(arr) {
|
|
9
|
-
if (Array.isArray(arr))
|
|
10
|
-
return arr;
|
|
11
|
-
}
|
|
12
|
-
function _array_without_holes(arr) {
|
|
13
|
-
if (Array.isArray(arr))
|
|
14
|
-
return _array_like_to_array(arr);
|
|
15
|
-
}
|
|
16
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
17
|
-
try {
|
|
18
|
-
var info = gen[key](arg);
|
|
19
|
-
var value = info.value;
|
|
20
|
-
} catch (error) {
|
|
21
|
-
reject(error);
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
if (info.done) {
|
|
25
|
-
resolve(value);
|
|
26
|
-
} else {
|
|
27
|
-
Promise.resolve(value).then(_next, _throw);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
function _async_to_generator(fn) {
|
|
31
|
-
return function() {
|
|
32
|
-
var self = this, args = arguments;
|
|
33
|
-
return new Promise(function(resolve, reject) {
|
|
34
|
-
var gen = fn.apply(self, args);
|
|
35
|
-
function _next(value) {
|
|
36
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
37
|
-
}
|
|
38
|
-
function _throw(err) {
|
|
39
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
40
|
-
}
|
|
41
|
-
_next(void 0);
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
function _define_property(obj, key, value) {
|
|
46
|
-
if (key in obj) {
|
|
47
|
-
Object.defineProperty(obj, key, {
|
|
48
|
-
value: value,
|
|
49
|
-
enumerable: true,
|
|
50
|
-
configurable: true,
|
|
51
|
-
writable: true
|
|
52
|
-
});
|
|
53
|
-
} else {
|
|
54
|
-
obj[key] = value;
|
|
55
|
-
}
|
|
56
|
-
return obj;
|
|
57
|
-
}
|
|
58
|
-
function _iterable_to_array(iter) {
|
|
59
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
60
|
-
return Array.from(iter);
|
|
61
|
-
}
|
|
62
|
-
function _iterable_to_array_limit(arr, i) {
|
|
63
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
64
|
-
if (_i == null)
|
|
65
|
-
return;
|
|
66
|
-
var _arr = [];
|
|
67
|
-
var _n = true;
|
|
68
|
-
var _d = false;
|
|
69
|
-
var _s, _e;
|
|
70
|
-
try {
|
|
71
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
72
|
-
_arr.push(_s.value);
|
|
73
|
-
if (i && _arr.length === i)
|
|
74
|
-
break;
|
|
75
|
-
}
|
|
76
|
-
} catch (err) {
|
|
77
|
-
_d = true;
|
|
78
|
-
_e = err;
|
|
79
|
-
} finally {
|
|
80
|
-
try {
|
|
81
|
-
if (!_n && _i["return"] != null)
|
|
82
|
-
_i["return"]();
|
|
83
|
-
} finally {
|
|
84
|
-
if (_d)
|
|
85
|
-
throw _e;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
return _arr;
|
|
89
|
-
}
|
|
90
|
-
function _non_iterable_rest() {
|
|
91
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
92
|
-
}
|
|
93
|
-
function _non_iterable_spread() {
|
|
94
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
95
|
-
}
|
|
96
|
-
function _object_spread(target) {
|
|
97
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
98
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
99
|
-
var ownKeys2 = Object.keys(source);
|
|
100
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
101
|
-
ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
102
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
103
|
-
}));
|
|
104
|
-
}
|
|
105
|
-
ownKeys2.forEach(function(key) {
|
|
106
|
-
_define_property(target, key, source[key]);
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
return target;
|
|
110
|
-
}
|
|
111
|
-
function ownKeys(object, enumerableOnly) {
|
|
112
|
-
var keys = Object.keys(object);
|
|
113
|
-
if (Object.getOwnPropertySymbols) {
|
|
114
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
115
|
-
if (enumerableOnly) {
|
|
116
|
-
symbols = symbols.filter(function(sym) {
|
|
117
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
keys.push.apply(keys, symbols);
|
|
121
|
-
}
|
|
122
|
-
return keys;
|
|
123
|
-
}
|
|
124
|
-
function _object_spread_props(target, source) {
|
|
125
|
-
source = source != null ? source : {};
|
|
126
|
-
if (Object.getOwnPropertyDescriptors) {
|
|
127
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
128
|
-
} else {
|
|
129
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
130
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
return target;
|
|
134
|
-
}
|
|
135
|
-
function _object_without_properties(source, excluded) {
|
|
136
|
-
if (source == null)
|
|
137
|
-
return {};
|
|
138
|
-
var target = _object_without_properties_loose(source, excluded);
|
|
139
|
-
var key, i;
|
|
140
|
-
if (Object.getOwnPropertySymbols) {
|
|
141
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
142
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
143
|
-
key = sourceSymbolKeys[i];
|
|
144
|
-
if (excluded.indexOf(key) >= 0)
|
|
145
|
-
continue;
|
|
146
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key))
|
|
147
|
-
continue;
|
|
148
|
-
target[key] = source[key];
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
return target;
|
|
152
|
-
}
|
|
153
|
-
function _object_without_properties_loose(source, excluded) {
|
|
154
|
-
if (source == null)
|
|
155
|
-
return {};
|
|
156
|
-
var target = {};
|
|
157
|
-
var sourceKeys = Object.keys(source);
|
|
158
|
-
var key, i;
|
|
159
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
160
|
-
key = sourceKeys[i];
|
|
161
|
-
if (excluded.indexOf(key) >= 0)
|
|
162
|
-
continue;
|
|
163
|
-
target[key] = source[key];
|
|
164
|
-
}
|
|
165
|
-
return target;
|
|
166
|
-
}
|
|
167
|
-
function _sliced_to_array(arr, i) {
|
|
168
|
-
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
169
|
-
}
|
|
170
|
-
function _to_consumable_array(arr) {
|
|
171
|
-
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
172
|
-
}
|
|
173
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
174
|
-
if (!o)
|
|
175
|
-
return;
|
|
176
|
-
if (typeof o === "string")
|
|
177
|
-
return _array_like_to_array(o, minLen);
|
|
178
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
179
|
-
if (n === "Object" && o.constructor)
|
|
180
|
-
n = o.constructor.name;
|
|
181
|
-
if (n === "Map" || n === "Set")
|
|
182
|
-
return Array.from(n);
|
|
183
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
184
|
-
return _array_like_to_array(o, minLen);
|
|
185
|
-
}
|
|
186
|
-
var __generator = function(thisArg, body) {
|
|
187
|
-
var f, y, t, g, _ = {
|
|
188
|
-
label: 0,
|
|
189
|
-
sent: function() {
|
|
190
|
-
if (t[0] & 1)
|
|
191
|
-
throw t[1];
|
|
192
|
-
return t[1];
|
|
193
|
-
},
|
|
194
|
-
trys: [],
|
|
195
|
-
ops: []
|
|
196
|
-
};
|
|
197
|
-
return g = {
|
|
198
|
-
next: verb(0),
|
|
199
|
-
"throw": verb(1),
|
|
200
|
-
"return": verb(2)
|
|
201
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
202
|
-
return this;
|
|
203
|
-
}), g;
|
|
204
|
-
function verb(n) {
|
|
205
|
-
return function(v) {
|
|
206
|
-
return step([
|
|
207
|
-
n,
|
|
208
|
-
v
|
|
209
|
-
]);
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
function step(op) {
|
|
213
|
-
if (f)
|
|
214
|
-
throw new TypeError("Generator is already executing.");
|
|
215
|
-
while (_)
|
|
216
|
-
try {
|
|
217
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
218
|
-
return t;
|
|
219
|
-
if (y = 0, t)
|
|
220
|
-
op = [
|
|
221
|
-
op[0] & 2,
|
|
222
|
-
t.value
|
|
223
|
-
];
|
|
224
|
-
switch (op[0]) {
|
|
225
|
-
case 0:
|
|
226
|
-
case 1:
|
|
227
|
-
t = op;
|
|
228
|
-
break;
|
|
229
|
-
case 4:
|
|
230
|
-
_.label++;
|
|
231
|
-
return {
|
|
232
|
-
value: op[1],
|
|
233
|
-
done: false
|
|
234
|
-
};
|
|
235
|
-
case 5:
|
|
236
|
-
_.label++;
|
|
237
|
-
y = op[1];
|
|
238
|
-
op = [
|
|
239
|
-
0
|
|
240
|
-
];
|
|
241
|
-
continue;
|
|
242
|
-
case 7:
|
|
243
|
-
op = _.ops.pop();
|
|
244
|
-
_.trys.pop();
|
|
245
|
-
continue;
|
|
246
|
-
default:
|
|
247
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
248
|
-
_ = 0;
|
|
249
|
-
continue;
|
|
250
|
-
}
|
|
251
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
252
|
-
_.label = op[1];
|
|
253
|
-
break;
|
|
254
|
-
}
|
|
255
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
256
|
-
_.label = t[1];
|
|
257
|
-
t = op;
|
|
258
|
-
break;
|
|
259
|
-
}
|
|
260
|
-
if (t && _.label < t[2]) {
|
|
261
|
-
_.label = t[2];
|
|
262
|
-
_.ops.push(op);
|
|
263
|
-
break;
|
|
264
|
-
}
|
|
265
|
-
if (t[2])
|
|
266
|
-
_.ops.pop();
|
|
267
|
-
_.trys.pop();
|
|
268
|
-
continue;
|
|
269
|
-
}
|
|
270
|
-
op = body.call(thisArg, _);
|
|
271
|
-
} catch (e) {
|
|
272
|
-
op = [
|
|
273
|
-
6,
|
|
274
|
-
e
|
|
275
|
-
];
|
|
276
|
-
y = 0;
|
|
277
|
-
} finally {
|
|
278
|
-
f = t = 0;
|
|
279
|
-
}
|
|
280
|
-
if (op[0] & 5)
|
|
281
|
-
throw op[1];
|
|
282
|
-
return {
|
|
283
|
-
value: op[0] ? op[1] : void 0,
|
|
284
|
-
done: true
|
|
285
|
-
};
|
|
286
|
-
}
|
|
287
|
-
};
|
|
1
|
+
import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
|
|
2
|
+
import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
3
|
+
import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
4
|
+
import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_properties";
|
|
5
|
+
import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
|
|
6
|
+
import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array";
|
|
7
|
+
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
288
8
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
289
9
|
import { useContext, useState, useEffect, useRef } from "react";
|
|
290
10
|
import { RuntimeReactContext } from "@modern-js/runtime";
|
|
@@ -396,7 +116,7 @@ function getAppInstance(options, appInfo, manifest) {
|
|
|
396
116
|
function _renderApp() {
|
|
397
117
|
_renderApp = _async_to_generator(function() {
|
|
398
118
|
var appInstance, error;
|
|
399
|
-
return
|
|
119
|
+
return _ts_generator(this, function(_state) {
|
|
400
120
|
switch (_state.label) {
|
|
401
121
|
case 0:
|
|
402
122
|
_state.trys.push([
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
if (key in obj) {
|
|
3
|
-
Object.defineProperty(obj, key, {
|
|
4
|
-
value,
|
|
5
|
-
enumerable: true,
|
|
6
|
-
configurable: true,
|
|
7
|
-
writable: true
|
|
8
|
-
});
|
|
9
|
-
} else {
|
|
10
|
-
obj[key] = value;
|
|
11
|
-
}
|
|
12
|
-
return obj;
|
|
13
|
-
}
|
|
1
|
+
import { _ as _define_property } from "@swc/helpers/_/_define_property";
|
|
14
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
3
|
import GarfishInstance from "garfish";
|
|
16
4
|
import React from "react";
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
if (key in obj) {
|
|
3
|
-
Object.defineProperty(obj, key, {
|
|
4
|
-
value,
|
|
5
|
-
enumerable: true,
|
|
6
|
-
configurable: true,
|
|
7
|
-
writable: true
|
|
8
|
-
});
|
|
9
|
-
} else {
|
|
10
|
-
obj[key] = value;
|
|
11
|
-
}
|
|
12
|
-
return obj;
|
|
13
|
-
}
|
|
1
|
+
import { _ as _define_property } from "@swc/helpers/_/_define_property";
|
|
14
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
3
|
import React from "react";
|
|
16
4
|
import Garfish from "garfish";
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.
|
|
18
|
+
"version": "2.20.0",
|
|
19
19
|
"jsnext:source": "./src/cli/index.ts",
|
|
20
20
|
"types": "./dist/types/cli/index.d.ts",
|
|
21
21
|
"typesVersions": {
|
|
@@ -63,17 +63,17 @@
|
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@babel/runtime": "^7.18.0",
|
|
67
66
|
"@types/debug": "^4.1.7",
|
|
68
67
|
"@types/react-loadable": "^5.5.6",
|
|
69
68
|
"debug": "^4.3.2",
|
|
70
69
|
"garfish": "^1.8.1",
|
|
71
70
|
"hoist-non-react-statics": "^3.3.2",
|
|
72
71
|
"react-loadable": "^5.5.0",
|
|
73
|
-
"@
|
|
72
|
+
"@swc/helpers": "0.5.1",
|
|
73
|
+
"@modern-js/utils": "2.20.0"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"@modern-js/runtime": "^2.
|
|
76
|
+
"@modern-js/runtime": "^2.20.0"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@testing-library/jest-dom": "^5.16.1",
|
|
@@ -89,13 +89,13 @@
|
|
|
89
89
|
"react-router-dom": "^6.8.1",
|
|
90
90
|
"typescript": "^4",
|
|
91
91
|
"webpack-chain": "^6.5.1",
|
|
92
|
-
"@modern-js/app-tools": "2.
|
|
93
|
-
"@modern-js/core": "2.
|
|
94
|
-
"@modern-js/
|
|
95
|
-
"@modern-js/
|
|
96
|
-
"@
|
|
97
|
-
"@scripts/
|
|
98
|
-
"@
|
|
92
|
+
"@modern-js/app-tools": "2.20.0",
|
|
93
|
+
"@modern-js/core": "2.20.0",
|
|
94
|
+
"@modern-js/plugin-router-v5": "2.20.0",
|
|
95
|
+
"@modern-js/runtime": "2.20.0",
|
|
96
|
+
"@modern-js/types": "2.20.0",
|
|
97
|
+
"@scripts/build": "2.20.0",
|
|
98
|
+
"@scripts/jest-config": "2.20.0"
|
|
99
99
|
},
|
|
100
100
|
"sideEffects": false,
|
|
101
101
|
"modernConfig": {},
|