fets 0.8.6 → 0.8.7
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/cjs/plugins/formats.js +0 -7
- package/esm/plugins/formats.js +0 -7
- package/package.json +2 -2
package/cjs/plugins/formats.js
CHANGED
|
@@ -66,7 +66,6 @@ function float(str) {
|
|
|
66
66
|
exports.fullFormat = {
|
|
67
67
|
date,
|
|
68
68
|
time: time.bind(undefined, false),
|
|
69
|
-
// eslint-disable-next-line camelcase
|
|
70
69
|
'date-time': date_time,
|
|
71
70
|
duration: DURATION,
|
|
72
71
|
uri,
|
|
@@ -74,7 +73,6 @@ exports.fullFormat = {
|
|
|
74
73
|
'uri-template': bind(URITEMPLATE),
|
|
75
74
|
url: v => {
|
|
76
75
|
try {
|
|
77
|
-
// eslint-disable-next-line no-new
|
|
78
76
|
new fetch_1.URL(v);
|
|
79
77
|
return true;
|
|
80
78
|
}
|
|
@@ -128,7 +126,6 @@ function date(str) {
|
|
|
128
126
|
return (month >= 1 &&
|
|
129
127
|
month <= 12 &&
|
|
130
128
|
day >= 1 &&
|
|
131
|
-
// eslint-disable-next-line eqeqeq
|
|
132
129
|
day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]));
|
|
133
130
|
}
|
|
134
131
|
function time(full, str) {
|
|
@@ -140,16 +137,13 @@ function time(full, str) {
|
|
|
140
137
|
const second = +matches[3];
|
|
141
138
|
const timeZone = !!matches[5];
|
|
142
139
|
return (((hour <= 23 && minute <= 59 && second <= 59) ||
|
|
143
|
-
// eslint-disable-next-line eqeqeq
|
|
144
140
|
(hour == 23 && minute == 59 && second == 60)) &&
|
|
145
141
|
(!full || timeZone));
|
|
146
142
|
}
|
|
147
143
|
const DATE_TIME_SEPARATOR = /t|\s/i;
|
|
148
|
-
// eslint-disable-next-line camelcase
|
|
149
144
|
function date_time(str) {
|
|
150
145
|
// http://tools.ietf.org/html/rfc3339#section-5.6
|
|
151
146
|
const dateTime = str.split(DATE_TIME_SEPARATOR);
|
|
152
|
-
// eslint-disable-next-line eqeqeq
|
|
153
147
|
return dateTime.length == 2 && date(dateTime[0]) && time(true, dateTime[1]);
|
|
154
148
|
}
|
|
155
149
|
const NOT_URI_FRAGMENT = /\/|:/;
|
|
@@ -163,7 +157,6 @@ function regex(str) {
|
|
|
163
157
|
if (Z_ANCHOR.test(str))
|
|
164
158
|
return false;
|
|
165
159
|
try {
|
|
166
|
-
// eslint-disable-next-line no-new
|
|
167
160
|
new RegExp(str);
|
|
168
161
|
return true;
|
|
169
162
|
}
|
package/esm/plugins/formats.js
CHANGED
|
@@ -62,7 +62,6 @@ function float(str) {
|
|
|
62
62
|
export const fullFormat = {
|
|
63
63
|
date,
|
|
64
64
|
time: time.bind(undefined, false),
|
|
65
|
-
// eslint-disable-next-line camelcase
|
|
66
65
|
'date-time': date_time,
|
|
67
66
|
duration: DURATION,
|
|
68
67
|
uri,
|
|
@@ -70,7 +69,6 @@ export const fullFormat = {
|
|
|
70
69
|
'uri-template': bind(URITEMPLATE),
|
|
71
70
|
url: v => {
|
|
72
71
|
try {
|
|
73
|
-
// eslint-disable-next-line no-new
|
|
74
72
|
new URL(v);
|
|
75
73
|
return true;
|
|
76
74
|
}
|
|
@@ -124,7 +122,6 @@ function date(str) {
|
|
|
124
122
|
return (month >= 1 &&
|
|
125
123
|
month <= 12 &&
|
|
126
124
|
day >= 1 &&
|
|
127
|
-
// eslint-disable-next-line eqeqeq
|
|
128
125
|
day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]));
|
|
129
126
|
}
|
|
130
127
|
function time(full, str) {
|
|
@@ -136,16 +133,13 @@ function time(full, str) {
|
|
|
136
133
|
const second = +matches[3];
|
|
137
134
|
const timeZone = !!matches[5];
|
|
138
135
|
return (((hour <= 23 && minute <= 59 && second <= 59) ||
|
|
139
|
-
// eslint-disable-next-line eqeqeq
|
|
140
136
|
(hour == 23 && minute == 59 && second == 60)) &&
|
|
141
137
|
(!full || timeZone));
|
|
142
138
|
}
|
|
143
139
|
const DATE_TIME_SEPARATOR = /t|\s/i;
|
|
144
|
-
// eslint-disable-next-line camelcase
|
|
145
140
|
function date_time(str) {
|
|
146
141
|
// http://tools.ietf.org/html/rfc3339#section-5.6
|
|
147
142
|
const dateTime = str.split(DATE_TIME_SEPARATOR);
|
|
148
|
-
// eslint-disable-next-line eqeqeq
|
|
149
143
|
return dateTime.length == 2 && date(dateTime[0]) && time(true, dateTime[1]);
|
|
150
144
|
}
|
|
151
145
|
const NOT_URI_FRAGMENT = /\/|:/;
|
|
@@ -159,7 +153,6 @@ function regex(str) {
|
|
|
159
153
|
if (Z_ANCHOR.test(str))
|
|
160
154
|
return false;
|
|
161
155
|
try {
|
|
162
|
-
// eslint-disable-next-line no-new
|
|
163
156
|
new RegExp(str);
|
|
164
157
|
return true;
|
|
165
158
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fets",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.7",
|
|
4
4
|
"description": "TypeScript HTTP Framework focusing on e2e type-safety, easy setup, performance & great developer experience",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@sinclair/typebox": "^0.34.48",
|
|
8
8
|
"@whatwg-node/cookie-store": "^0.2.0",
|
|
9
9
|
"@whatwg-node/fetch": "^0.10.12",
|
|
10
|
-
"@whatwg-node/server": "^0.
|
|
10
|
+
"@whatwg-node/server": "^0.11.0",
|
|
11
11
|
"hotscript": "^1.0.11",
|
|
12
12
|
"json-schema-to-ts": "^3.0.0",
|
|
13
13
|
"qs": "^6.14.2",
|