@xfe-repo/mini-app 1.5.0 → 1.6.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.
@@ -35,6 +35,19 @@ function _async_to_generator(fn) {
35
35
  });
36
36
  };
37
37
  }
38
+ function _inherits(subClass, superClass) {
39
+ if (typeof superClass !== "function" && superClass !== null) {
40
+ throw new TypeError("Super expression must either be null or a function");
41
+ }
42
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
43
+ constructor: {
44
+ value: subClass,
45
+ writable: true,
46
+ configurable: true
47
+ }
48
+ });
49
+ if (superClass) _set_prototype_of(subClass, superClass);
50
+ }
38
51
  function _iterable_to_array_limit(arr, i) {
39
52
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
40
53
  if (_i == null) return;
@@ -62,6 +75,13 @@ function _iterable_to_array_limit(arr, i) {
62
75
  function _non_iterable_rest() {
63
76
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
64
77
  }
78
+ function _set_prototype_of(o, p) {
79
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
80
+ o.__proto__ = p;
81
+ return o;
82
+ };
83
+ return _set_prototype_of(o, p);
84
+ }
65
85
  function _sliced_to_array(arr, i) {
66
86
  return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
67
87
  }
@@ -73,6 +93,64 @@ function _unsupported_iterable_to_array(o, minLen) {
73
93
  if (n === "Map" || n === "Set") return Array.from(n);
74
94
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
75
95
  }
96
+ function _wrap_reg_exp(re, groups) {
97
+ _wrap_reg_exp = function(re, groups) {
98
+ return new WrappedRegExp(re, undefined, groups);
99
+ };
100
+ var _super = RegExp.prototype;
101
+ var _groups = new WeakMap();
102
+ function WrappedRegExp(re, flags, groups) {
103
+ var _re = new RegExp(re, flags);
104
+ _groups.set(_re, groups || _groups.get(re));
105
+ return _set_prototype_of(_re, WrappedRegExp.prototype);
106
+ }
107
+ _inherits(WrappedRegExp, RegExp);
108
+ WrappedRegExp.prototype.exec = function(str) {
109
+ var result = _super.exec.call(this, str);
110
+ if (result) {
111
+ result.groups = buildGroups(result, this);
112
+ var indices = result.indices;
113
+ if (indices) indices.groups = buildGroups(indices, this);
114
+ }
115
+ return result;
116
+ };
117
+ WrappedRegExp.prototype[Symbol.replace] = function(str, substitution) {
118
+ if (typeof substitution === "string") {
119
+ var groups = _groups.get(this);
120
+ return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function(_, name) {
121
+ var group = groups ? groups[name] : undefined;
122
+ if (group === undefined) return "";
123
+ return "$" + (Array.isArray(group) ? group.join("$") : group);
124
+ }));
125
+ }
126
+ if (typeof substitution === "function") {
127
+ var _this = this;
128
+ return _super[Symbol.replace].call(this, str, function() {
129
+ var args = arguments;
130
+ if (typeof args[args.length - 1] !== "object") {
131
+ args = [].slice.call(args);
132
+ args.push(buildGroups(args, _this));
133
+ }
134
+ return substitution.apply(this, args);
135
+ });
136
+ }
137
+ return _super[Symbol.replace].call(this, str, substitution);
138
+ };
139
+ function buildGroups(result, re) {
140
+ var g = _groups.get(re);
141
+ return Object.keys(g).reduce(function(groups, name) {
142
+ var i = g[name];
143
+ if (typeof i === "number") groups[name] = result[i];
144
+ else {
145
+ var k = 0;
146
+ while(result[i[k]] === undefined && k + 1 < i.length)k++;
147
+ groups[name] = result[i[k]];
148
+ }
149
+ return groups;
150
+ }, Object.create(null));
151
+ }
152
+ return _wrap_reg_exp.apply(this, arguments);
153
+ }
76
154
  function _ts_generator(thisArg, body) {
77
155
  var f, y, t, _ = {
78
156
  label: 0,
@@ -237,7 +315,10 @@ function previewMini(version) {
237
315
  }
238
316
  var choiceRobot = function choiceRobot() {
239
317
  var _process_env = process.env, _process_env_API_ENV = _process_env.API_ENV, API_ENV = _process_env_API_ENV === void 0 ? "" : _process_env_API_ENV;
240
- var groups = (API_ENV.match(RegExp("^(?<env>prod|beta|stage|test)(?<sn>.*)")) || {}).groups;
318
+ var groups = (API_ENV.match(_wrap_reg_exp(/^(prod|beta|stage|test)(.*)/, {
319
+ env: 1,
320
+ sn: 2
321
+ })) || {}).groups;
241
322
  var env = (groups === null || groups === void 0 ? void 0 : groups.env) || "other";
242
323
  var sn = Number(groups === null || groups === void 0 ? void 0 : groups.sn) || 0;
243
324
  var robot;
package/dist/cli.js CHANGED
@@ -49,6 +49,19 @@ function _define_property(obj, key, value) {
49
49
  }
50
50
  return obj;
51
51
  }
52
+ function _inherits(subClass, superClass) {
53
+ if (typeof superClass !== "function" && superClass !== null) {
54
+ throw new TypeError("Super expression must either be null or a function");
55
+ }
56
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
57
+ constructor: {
58
+ value: subClass,
59
+ writable: true,
60
+ configurable: true
61
+ }
62
+ });
63
+ if (superClass) _set_prototype_of(subClass, superClass);
64
+ }
52
65
  function _iterable_to_array_limit(arr, i) {
53
66
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
54
67
  if (_i == null) return;
@@ -151,6 +164,13 @@ function _object_without_properties_loose(source, excluded) {
151
164
  }
152
165
  return target;
153
166
  }
167
+ function _set_prototype_of(o, p) {
168
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
169
+ o.__proto__ = p;
170
+ return o;
171
+ };
172
+ return _set_prototype_of(o, p);
173
+ }
154
174
  function _sliced_to_array(arr, i) {
155
175
  return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
156
176
  }
@@ -166,6 +186,64 @@ function _unsupported_iterable_to_array(o, minLen) {
166
186
  if (n === "Map" || n === "Set") return Array.from(n);
167
187
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
168
188
  }
189
+ function _wrap_reg_exp(re, groups) {
190
+ _wrap_reg_exp = function(re, groups) {
191
+ return new WrappedRegExp(re, undefined, groups);
192
+ };
193
+ var _super = RegExp.prototype;
194
+ var _groups = new WeakMap();
195
+ function WrappedRegExp(re, flags, groups) {
196
+ var _re = new RegExp(re, flags);
197
+ _groups.set(_re, groups || _groups.get(re));
198
+ return _set_prototype_of(_re, WrappedRegExp.prototype);
199
+ }
200
+ _inherits(WrappedRegExp, RegExp);
201
+ WrappedRegExp.prototype.exec = function(str) {
202
+ var result = _super.exec.call(this, str);
203
+ if (result) {
204
+ result.groups = buildGroups(result, this);
205
+ var indices = result.indices;
206
+ if (indices) indices.groups = buildGroups(indices, this);
207
+ }
208
+ return result;
209
+ };
210
+ WrappedRegExp.prototype[Symbol.replace] = function(str, substitution) {
211
+ if (typeof substitution === "string") {
212
+ var groups = _groups.get(this);
213
+ return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function(_, name) {
214
+ var group = groups ? groups[name] : undefined;
215
+ if (group === undefined) return "";
216
+ return "$" + (Array.isArray(group) ? group.join("$") : group);
217
+ }));
218
+ }
219
+ if (typeof substitution === "function") {
220
+ var _this = this;
221
+ return _super[Symbol.replace].call(this, str, function() {
222
+ var args = arguments;
223
+ if (typeof args[args.length - 1] !== "object") {
224
+ args = [].slice.call(args);
225
+ args.push(buildGroups(args, _this));
226
+ }
227
+ return substitution.apply(this, args);
228
+ });
229
+ }
230
+ return _super[Symbol.replace].call(this, str, substitution);
231
+ };
232
+ function buildGroups(result, re) {
233
+ var g = _groups.get(re);
234
+ return Object.keys(g).reduce(function(groups, name) {
235
+ var i = g[name];
236
+ if (typeof i === "number") groups[name] = result[i];
237
+ else {
238
+ var k = 0;
239
+ while(result[i[k]] === undefined && k + 1 < i.length)k++;
240
+ groups[name] = result[i[k]];
241
+ }
242
+ return groups;
243
+ }, Object.create(null));
244
+ }
245
+ return _wrap_reg_exp.apply(this, arguments);
246
+ }
169
247
  function _ts_generator(thisArg, body) {
170
248
  var f, y, t, _ = {
171
249
  label: 0,
@@ -493,7 +571,10 @@ function previewMini(version) {
493
571
  }
494
572
  var choiceRobot = function choiceRobot() {
495
573
  var _process_env = process.env, _process_env_API_ENV = _process_env.API_ENV, API_ENV = _process_env_API_ENV === void 0 ? "" : _process_env_API_ENV;
496
- var groups = (API_ENV.match(RegExp("^(?<env>prod|beta|stage|test)(?<sn>.*)")) || {}).groups;
574
+ var groups = (API_ENV.match(_wrap_reg_exp(/^(prod|beta|stage|test)(.*)/, {
575
+ env: 1,
576
+ sn: 2
577
+ })) || {}).groups;
497
578
  var env2 = (groups === null || groups === void 0 ? void 0 : groups.env) || "other";
498
579
  var sn = Number(groups === null || groups === void 0 ? void 0 : groups.sn) || 0;
499
580
  var robot;
package/dist/preview.js CHANGED
@@ -36,6 +36,19 @@ function _async_to_generator(fn) {
36
36
  });
37
37
  };
38
38
  }
39
+ function _inherits(subClass, superClass) {
40
+ if (typeof superClass !== "function" && superClass !== null) {
41
+ throw new TypeError("Super expression must either be null or a function");
42
+ }
43
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
44
+ constructor: {
45
+ value: subClass,
46
+ writable: true,
47
+ configurable: true
48
+ }
49
+ });
50
+ if (superClass) _set_prototype_of(subClass, superClass);
51
+ }
39
52
  function _iterable_to_array_limit(arr, i) {
40
53
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
41
54
  if (_i == null) return;
@@ -63,6 +76,13 @@ function _iterable_to_array_limit(arr, i) {
63
76
  function _non_iterable_rest() {
64
77
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
65
78
  }
79
+ function _set_prototype_of(o, p) {
80
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
81
+ o.__proto__ = p;
82
+ return o;
83
+ };
84
+ return _set_prototype_of(o, p);
85
+ }
66
86
  function _sliced_to_array(arr, i) {
67
87
  return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
68
88
  }
@@ -78,6 +98,64 @@ function _unsupported_iterable_to_array(o, minLen) {
78
98
  if (n === "Map" || n === "Set") return Array.from(n);
79
99
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
80
100
  }
101
+ function _wrap_reg_exp(re, groups) {
102
+ _wrap_reg_exp = function(re, groups) {
103
+ return new WrappedRegExp(re, undefined, groups);
104
+ };
105
+ var _super = RegExp.prototype;
106
+ var _groups = new WeakMap();
107
+ function WrappedRegExp(re, flags, groups) {
108
+ var _re = new RegExp(re, flags);
109
+ _groups.set(_re, groups || _groups.get(re));
110
+ return _set_prototype_of(_re, WrappedRegExp.prototype);
111
+ }
112
+ _inherits(WrappedRegExp, RegExp);
113
+ WrappedRegExp.prototype.exec = function(str) {
114
+ var result = _super.exec.call(this, str);
115
+ if (result) {
116
+ result.groups = buildGroups(result, this);
117
+ var indices = result.indices;
118
+ if (indices) indices.groups = buildGroups(indices, this);
119
+ }
120
+ return result;
121
+ };
122
+ WrappedRegExp.prototype[Symbol.replace] = function(str, substitution) {
123
+ if (typeof substitution === "string") {
124
+ var groups = _groups.get(this);
125
+ return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function(_, name) {
126
+ var group = groups ? groups[name] : undefined;
127
+ if (group === undefined) return "";
128
+ return "$" + (Array.isArray(group) ? group.join("$") : group);
129
+ }));
130
+ }
131
+ if (typeof substitution === "function") {
132
+ var _this = this;
133
+ return _super[Symbol.replace].call(this, str, function() {
134
+ var args = arguments;
135
+ if (typeof args[args.length - 1] !== "object") {
136
+ args = [].slice.call(args);
137
+ args.push(buildGroups(args, _this));
138
+ }
139
+ return substitution.apply(this, args);
140
+ });
141
+ }
142
+ return _super[Symbol.replace].call(this, str, substitution);
143
+ };
144
+ function buildGroups(result, re) {
145
+ var g = _groups.get(re);
146
+ return Object.keys(g).reduce(function(groups, name) {
147
+ var i = g[name];
148
+ if (typeof i === "number") groups[name] = result[i];
149
+ else {
150
+ var k = 0;
151
+ while(result[i[k]] === undefined && k + 1 < i.length)k++;
152
+ groups[name] = result[i[k]];
153
+ }
154
+ return groups;
155
+ }, Object.create(null));
156
+ }
157
+ return _wrap_reg_exp.apply(this, arguments);
158
+ }
81
159
  function _ts_generator(thisArg, body) {
82
160
  var f, y, t, _ = {
83
161
  label: 0,
@@ -313,7 +391,10 @@ function previewMini(version) {
313
391
  }
314
392
  var choiceRobot = function choiceRobot() {
315
393
  var _process_env = process.env, _process_env_API_ENV = _process_env.API_ENV, API_ENV = _process_env_API_ENV === void 0 ? "" : _process_env_API_ENV;
316
- var groups = (API_ENV.match(RegExp("^(?<env>prod|beta|stage|test)(?<sn>.*)")) || {}).groups;
394
+ var groups = (API_ENV.match(_wrap_reg_exp(/^(prod|beta|stage|test)(.*)/, {
395
+ env: 1,
396
+ sn: 2
397
+ })) || {}).groups;
317
398
  var env = (groups === null || groups === void 0 ? void 0 : groups.env) || "other";
318
399
  var sn = Number(groups === null || groups === void 0 ? void 0 : groups.sn) || 0;
319
400
  var robot;
package/dist/upload.js CHANGED
@@ -28,10 +28,88 @@ function _async_to_generator(fn) {
28
28
  });
29
29
  };
30
30
  }
31
+ function _inherits(subClass, superClass) {
32
+ if (typeof superClass !== "function" && superClass !== null) {
33
+ throw new TypeError("Super expression must either be null or a function");
34
+ }
35
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
36
+ constructor: {
37
+ value: subClass,
38
+ writable: true,
39
+ configurable: true
40
+ }
41
+ });
42
+ if (superClass) _set_prototype_of(subClass, superClass);
43
+ }
44
+ function _set_prototype_of(o, p) {
45
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
46
+ o.__proto__ = p;
47
+ return o;
48
+ };
49
+ return _set_prototype_of(o, p);
50
+ }
31
51
  function _type_of(obj) {
32
52
  "@swc/helpers - typeof";
33
53
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
34
54
  }
55
+ function _wrap_reg_exp(re, groups) {
56
+ _wrap_reg_exp = function(re, groups) {
57
+ return new WrappedRegExp(re, undefined, groups);
58
+ };
59
+ var _super = RegExp.prototype;
60
+ var _groups = new WeakMap();
61
+ function WrappedRegExp(re, flags, groups) {
62
+ var _re = new RegExp(re, flags);
63
+ _groups.set(_re, groups || _groups.get(re));
64
+ return _set_prototype_of(_re, WrappedRegExp.prototype);
65
+ }
66
+ _inherits(WrappedRegExp, RegExp);
67
+ WrappedRegExp.prototype.exec = function(str) {
68
+ var result = _super.exec.call(this, str);
69
+ if (result) {
70
+ result.groups = buildGroups(result, this);
71
+ var indices = result.indices;
72
+ if (indices) indices.groups = buildGroups(indices, this);
73
+ }
74
+ return result;
75
+ };
76
+ WrappedRegExp.prototype[Symbol.replace] = function(str, substitution) {
77
+ if (typeof substitution === "string") {
78
+ var groups = _groups.get(this);
79
+ return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function(_, name) {
80
+ var group = groups ? groups[name] : undefined;
81
+ if (group === undefined) return "";
82
+ return "$" + (Array.isArray(group) ? group.join("$") : group);
83
+ }));
84
+ }
85
+ if (typeof substitution === "function") {
86
+ var _this = this;
87
+ return _super[Symbol.replace].call(this, str, function() {
88
+ var args = arguments;
89
+ if (typeof args[args.length - 1] !== "object") {
90
+ args = [].slice.call(args);
91
+ args.push(buildGroups(args, _this));
92
+ }
93
+ return substitution.apply(this, args);
94
+ });
95
+ }
96
+ return _super[Symbol.replace].call(this, str, substitution);
97
+ };
98
+ function buildGroups(result, re) {
99
+ var g = _groups.get(re);
100
+ return Object.keys(g).reduce(function(groups, name) {
101
+ var i = g[name];
102
+ if (typeof i === "number") groups[name] = result[i];
103
+ else {
104
+ var k = 0;
105
+ while(result[i[k]] === undefined && k + 1 < i.length)k++;
106
+ groups[name] = result[i[k]];
107
+ }
108
+ return groups;
109
+ }, Object.create(null));
110
+ }
111
+ return _wrap_reg_exp.apply(this, arguments);
112
+ }
35
113
  function _ts_generator(thisArg, body) {
36
114
  var f, y, t, _ = {
37
115
  label: 0,
@@ -230,7 +308,10 @@ var getProject = function getProject() {
230
308
  };
231
309
  var choiceRobot = function choiceRobot() {
232
310
  var _process_env = process.env, _process_env_API_ENV = _process_env.API_ENV, API_ENV = _process_env_API_ENV === void 0 ? "" : _process_env_API_ENV;
233
- var groups = (API_ENV.match(RegExp("^(?<env>prod|beta|stage|test)(?<sn>.*)")) || {}).groups;
311
+ var groups = (API_ENV.match(_wrap_reg_exp(/^(prod|beta|stage|test)(.*)/, {
312
+ env: 1,
313
+ sn: 2
314
+ })) || {}).groups;
234
315
  var env = (groups === null || groups === void 0 ? void 0 : groups.env) || "other";
235
316
  var sn = Number(groups === null || groups === void 0 ? void 0 : groups.sn) || 0;
236
317
  var robot;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xfe-repo/mini-app",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "bin": {
5
5
  "xfe-mini": "./bin/index.js"
6
6
  },
@@ -51,8 +51,8 @@
51
51
  "typescript": "5.3.3",
52
52
  "webpack": "5.91.0",
53
53
  "yaml": "^2.3.4",
54
- "@xfe-repo/routes-define-webpack-plugin": "1.5.0",
55
- "@xfe-repo/typescript-config": "1.5.0"
54
+ "@xfe-repo/routes-define-webpack-plugin": "1.6.0",
55
+ "@xfe-repo/typescript-config": "1.6.0"
56
56
  },
57
57
  "peerDependencies": {
58
58
  "react": "18.2.0",
@@ -65,6 +65,6 @@
65
65
  "build": "tsup",
66
66
  "dev": "tsup --watch",
67
67
  "lint": "eslint \"src/**/*.ts*\" --fix",
68
- "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
68
+ "clean": "rm -rf .turbo coverage dist node_modules"
69
69
  }
70
70
  }