@ywfe/fe-tools 1.0.2-beta.0 → 1.0.2-beta.10
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/index.ts +1 -0
- package/jest.config.js +12 -0
- package/{dist/bundle.js → lib/ywfe-tools.esm.js} +80 -144
- package/lib/ywfe-tools.esm.js.map +1 -0
- package/package.json +20 -17
- package/request.ts +49 -0
- package/rollup.config.js +73 -0
- package/tsconfig.json +10 -0
- package/tsconfig.type.json +8 -0
- package/dist/bundle.js.map +0 -1
package/index.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export { default as request } from './request'
|
package/jest.config.js
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
module.exports = {
|
2
|
+
preset: 'ts-jest',
|
3
|
+
testEnvironment: 'jsdom',
|
4
|
+
moduleFileExtensions: ['js', 'jsx', 'json', 'ts', 'tsx'],
|
5
|
+
rootDir: '.',
|
6
|
+
roots: ['<rootDir>/src/'],
|
7
|
+
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?|ts?)$',
|
8
|
+
transform: {
|
9
|
+
'^.+\\.(t|j)s$': 'ts-jest',
|
10
|
+
'^.+\\.(t|j)sx$': 'ts-jest',
|
11
|
+
},
|
12
|
+
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
'use strict';
|
2
2
|
|
3
3
|
/******************************************************************************
|
4
4
|
Copyright (c) Microsoft Corporation.
|
@@ -13,153 +13,89 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
13
13
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
14
14
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
15
15
|
PERFORMANCE OF THIS SOFTWARE.
|
16
|
-
***************************************************************************** */
|
17
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
return value instanceof P ? value : new P(function (resolve) {
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
}
|
33
|
-
function
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
}
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
}
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
next: verb(0),
|
62
|
-
"throw": verb(1),
|
63
|
-
"return": verb(2)
|
64
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
65
|
-
return this;
|
66
|
-
}), g;
|
67
|
-
function verb(n) {
|
68
|
-
return function (v) {
|
69
|
-
return step([n, v]);
|
70
|
-
};
|
71
|
-
}
|
72
|
-
function step(op) {
|
73
|
-
if (f) throw new TypeError("Generator is already executing.");
|
74
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
75
|
-
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) return t;
|
76
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
77
|
-
switch (op[0]) {
|
78
|
-
case 0:
|
79
|
-
case 1:
|
80
|
-
t = op;
|
81
|
-
break;
|
82
|
-
case 4:
|
83
|
-
_.label++;
|
84
|
-
return {
|
85
|
-
value: op[1],
|
86
|
-
done: false
|
87
|
-
};
|
88
|
-
case 5:
|
89
|
-
_.label++;
|
90
|
-
y = op[1];
|
91
|
-
op = [0];
|
92
|
-
continue;
|
93
|
-
case 7:
|
94
|
-
op = _.ops.pop();
|
95
|
-
_.trys.pop();
|
96
|
-
continue;
|
97
|
-
default:
|
98
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
99
|
-
_ = 0;
|
100
|
-
continue;
|
101
|
-
}
|
102
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
103
|
-
_.label = op[1];
|
104
|
-
break;
|
105
|
-
}
|
106
|
-
if (op[0] === 6 && _.label < t[1]) {
|
107
|
-
_.label = t[1];
|
108
|
-
t = op;
|
109
|
-
break;
|
110
|
-
}
|
111
|
-
if (t && _.label < t[2]) {
|
112
|
-
_.label = t[2];
|
113
|
-
_.ops.push(op);
|
114
|
-
break;
|
115
|
-
}
|
116
|
-
if (t[2]) _.ops.pop();
|
117
|
-
_.trys.pop();
|
118
|
-
continue;
|
119
|
-
}
|
120
|
-
op = body.call(thisArg, _);
|
121
|
-
} catch (e) {
|
122
|
-
op = [6, e];
|
123
|
-
y = 0;
|
124
|
-
} finally {
|
125
|
-
f = t = 0;
|
126
|
-
}
|
127
|
-
if (op[0] & 5) throw op[1];
|
128
|
-
return {
|
129
|
-
value: op[0] ? op[1] : void 0,
|
130
|
-
done: true
|
131
|
-
};
|
132
|
-
}
|
133
|
-
}
|
134
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
135
|
-
var e = new Error(message);
|
136
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
16
|
+
***************************************************************************** */
|
17
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
18
|
+
|
19
|
+
|
20
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
21
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
22
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
23
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
24
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
25
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
26
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
27
|
+
});
|
28
|
+
}
|
29
|
+
|
30
|
+
function __generator(thisArg, body) {
|
31
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
32
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
33
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
34
|
+
function step(op) {
|
35
|
+
if (f) throw new TypeError("Generator is already executing.");
|
36
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
37
|
+
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) return t;
|
38
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
39
|
+
switch (op[0]) {
|
40
|
+
case 0: case 1: t = op; break;
|
41
|
+
case 4: _.label++; return { value: op[1], done: false };
|
42
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
43
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
44
|
+
default:
|
45
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
46
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
47
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
48
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
49
|
+
if (t[2]) _.ops.pop();
|
50
|
+
_.trys.pop(); continue;
|
51
|
+
}
|
52
|
+
op = body.call(thisArg, _);
|
53
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
54
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
59
|
+
var e = new Error(message);
|
60
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
137
61
|
};
|
138
62
|
|
139
|
-
function
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
63
|
+
function getAugmentedNamespace(n) {
|
64
|
+
if (n.__esModule) return n;
|
65
|
+
var f = n.default;
|
66
|
+
if (typeof f == "function") {
|
67
|
+
var a = function a () {
|
68
|
+
if (this instanceof a) {
|
69
|
+
return Reflect.construct(f, arguments, this.constructor);
|
70
|
+
}
|
71
|
+
return f.apply(this, arguments);
|
72
|
+
};
|
73
|
+
a.prototype = f.prototype;
|
74
|
+
} else a = {};
|
75
|
+
Object.defineProperty(a, '__esModule', {value: true});
|
76
|
+
Object.keys(n).forEach(function (k) {
|
77
|
+
var d = Object.getOwnPropertyDescriptor(n, k);
|
78
|
+
Object.defineProperty(a, k, d.get ? d : {
|
79
|
+
enumerable: true,
|
80
|
+
get: function () {
|
81
|
+
return n[k];
|
82
|
+
}
|
83
|
+
});
|
84
|
+
});
|
85
|
+
return a;
|
159
86
|
}
|
160
87
|
|
161
88
|
var ywfeUtils_esm = {};
|
162
89
|
|
90
|
+
var empty = {};
|
91
|
+
|
92
|
+
var empty$1 = /*#__PURE__*/Object.freeze({
|
93
|
+
__proto__: null,
|
94
|
+
default: empty
|
95
|
+
});
|
96
|
+
|
97
|
+
var require$$1 = /*@__PURE__*/getAugmentedNamespace(empty$1);
|
98
|
+
|
163
99
|
(function (exports) {
|
164
100
|
|
165
101
|
Object.defineProperty(exports, '__esModule', { value: true });
|
@@ -8819,5 +8755,5 @@ function request(_a) {
|
|
8819
8755
|
});
|
8820
8756
|
}
|
8821
8757
|
|
8822
|
-
|
8823
|
-
//# sourceMappingURL=
|
8758
|
+
exports.request = request;
|
8759
|
+
//# sourceMappingURL=ywfe-tools.esm.js.map
|