@byteluck-fe/model-driven-shared 2.23.0-beta.17 → 2.23.0-beta.18

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.
Files changed (2) hide show
  1. package/dist/esm/log.js +25 -15
  2. package/package.json +2 -2
package/dist/esm/log.js CHANGED
@@ -12,10 +12,6 @@ function _assert_this_initialized(self) {
12
12
  }
13
13
  return self;
14
14
  }
15
- function _call_super(_this, derived, args) {
16
- derived = _get_prototype_of(derived);
17
- return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
18
- }
19
15
  function _class_call_check(instance, Constructor) {
20
16
  if (!(instance instanceof Constructor)) {
21
17
  throw new TypeError("Cannot call a class as a function");
@@ -121,12 +117,28 @@ function _wrap_native_super(Class) {
121
117
  return _wrap_native_super(Class);
122
118
  }
123
119
  function _is_native_reflect_construct() {
120
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
121
+ if (Reflect.construct.sham) return false;
122
+ if (typeof Proxy === "function") return true;
124
123
  try {
125
- var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
126
- } catch (_) {}
127
- return (_is_native_reflect_construct = function() {
128
- return !!result;
129
- })();
124
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
125
+ return true;
126
+ } catch (e) {
127
+ return false;
128
+ }
129
+ }
130
+ function _create_super(Derived) {
131
+ var hasNativeReflectConstruct = _is_native_reflect_construct();
132
+ return function _createSuperInternal() {
133
+ var Super = _get_prototype_of(Derived), result;
134
+ if (hasNativeReflectConstruct) {
135
+ var NewTarget = _get_prototype_of(this).constructor;
136
+ result = Reflect.construct(Super, arguments, NewTarget);
137
+ } else {
138
+ result = Super.apply(this, arguments);
139
+ }
140
+ return _possible_constructor_return(this, result);
141
+ };
130
142
  }
131
143
  var logger = console;
132
144
  export function warn() {
@@ -156,12 +168,11 @@ function joinMessage(message) {
156
168
  var DrivenError = /*#__PURE__*/ function(Error1) {
157
169
  "use strict";
158
170
  _inherits(DrivenError, Error1);
171
+ var _super = _create_super(DrivenError);
159
172
  function DrivenError(message) {
160
173
  _class_call_check(this, DrivenError);
161
174
  var _this;
162
- _this = _call_super(this, DrivenError, [
163
- message
164
- ]);
175
+ _this = _super.call(this, message);
165
176
  _this.name = 'đŸ’„ Driven Error';
166
177
  _this.message = message ? joinMessage(message) : 'An unknown error occurred in the Driven, please contact the person in charge 🚑🚑🚑';
167
178
  return _this;
@@ -172,12 +183,11 @@ var DrivenError = /*#__PURE__*/ function(Error1) {
172
183
  var DrivenReferenceError = /*#__PURE__*/ function(DrivenError) {
173
184
  "use strict";
174
185
  _inherits(DrivenReferenceError, DrivenError);
186
+ var _super = _create_super(DrivenReferenceError);
175
187
  function DrivenReferenceError(message) {
176
188
  _class_call_check(this, DrivenReferenceError);
177
189
  var _this;
178
- _this = _call_super(this, DrivenReferenceError, [
179
- message
180
- ]);
190
+ _this = _super.call(this, message);
181
191
  _this.name = '🚹 Driven Reference Error';
182
192
  return _this;
183
193
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byteluck-fe/model-driven-shared",
3
- "version": "2.23.0-beta.17",
3
+ "version": "2.23.0-beta.18",
4
4
  "description": "> TODO: description",
5
5
  "author": "éƒæ™šć…‰ <2293885211@qq.com>",
6
6
  "homepage": "",
@@ -31,5 +31,5 @@
31
31
  "humps": "^2.0.1",
32
32
  "vue-i18n": "^9.13.1"
33
33
  },
34
- "gitHead": "8990d6ba4aa29fa8f9ceb535eb231bde1cc643b9"
34
+ "gitHead": "c96a34b95e765e413057ee7170bcbf4cf8122d68"
35
35
  }