@ywfe/fe-tools 1.0.2-beta.12 → 1.0.2-beta.2
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/{lib/ywfe-tools.esm.js → dist/bundle.js} +134 -82
- package/dist/bundle.js.map +1 -0
- package/package.json +17 -20
- package/index.ts +0 -2
- package/jest.config.js +0 -12
- package/lib/index.d.ts +0 -2
- package/lib/request.d.ts +0 -9
- package/lib/userInputToJson.d.ts +0 -8
- package/lib/ywfe-tools.esm.js.map +0 -1
- package/request.ts +0 -49
- package/rollup.config.js +0 -73
- package/tsconfig.json +0 -10
- package/tsconfig.type.json +0 -8
- package/userInputToJson.ts +0 -17
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import require$$1 from 'fs';
|
|
2
2
|
|
|
3
3
|
/******************************************************************************
|
|
4
4
|
Copyright (c) Microsoft Corporation.
|
|
@@ -13,89 +13,131 @@ 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
|
-
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;
|
|
61
|
-
};
|
|
16
|
+
***************************************************************************** */
|
|
17
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
62
18
|
|
|
63
|
-
function
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
19
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
20
|
+
function adopt(value) {
|
|
21
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
22
|
+
resolve(value);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
26
|
+
function fulfilled(value) {
|
|
27
|
+
try {
|
|
28
|
+
step(generator.next(value));
|
|
29
|
+
} catch (e) {
|
|
30
|
+
reject(e);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function rejected(value) {
|
|
34
|
+
try {
|
|
35
|
+
step(generator["throw"](value));
|
|
36
|
+
} catch (e) {
|
|
37
|
+
reject(e);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function step(result) {
|
|
41
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
42
|
+
}
|
|
43
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
44
|
+
});
|
|
86
45
|
}
|
|
46
|
+
function __generator(thisArg, body) {
|
|
47
|
+
var _ = {
|
|
48
|
+
label: 0,
|
|
49
|
+
sent: function () {
|
|
50
|
+
if (t[0] & 1) throw t[1];
|
|
51
|
+
return t[1];
|
|
52
|
+
},
|
|
53
|
+
trys: [],
|
|
54
|
+
ops: []
|
|
55
|
+
},
|
|
56
|
+
f,
|
|
57
|
+
y,
|
|
58
|
+
t,
|
|
59
|
+
g;
|
|
60
|
+
return g = {
|
|
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;
|
|
137
|
+
};
|
|
87
138
|
|
|
88
139
|
var ywfeUtils_esm = {};
|
|
89
140
|
|
|
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
|
-
|
|
99
141
|
(function (exports) {
|
|
100
142
|
|
|
101
143
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
@@ -8777,6 +8819,16 @@ function userInputToJson(_a) {
|
|
|
8777
8819
|
});
|
|
8778
8820
|
}
|
|
8779
8821
|
|
|
8780
|
-
|
|
8781
|
-
|
|
8782
|
-
|
|
8822
|
+
function JSON2String(_a) {
|
|
8823
|
+
var input = _a.input;
|
|
8824
|
+
var _b = input.data, data = _b === void 0 ? {} : _b;
|
|
8825
|
+
try {
|
|
8826
|
+
return "```json" + JSON.stringify(data) + "json```";
|
|
8827
|
+
}
|
|
8828
|
+
catch (error) {
|
|
8829
|
+
return "```json" + JSON.stringify({}) + "json```";
|
|
8830
|
+
}
|
|
8831
|
+
}
|
|
8832
|
+
|
|
8833
|
+
export { JSON2String, request, userInputToJson };
|
|
8834
|
+
//# sourceMappingURL=bundle.js.map
|