@jwn-js/common 2.1.14 → 2.1.16
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/ApiError.d.ts +1 -29
- package/ApiError.js +1 -39
- package/ApiError.mjs +1 -0
- package/Jwt-7tQL-rwa.js +1 -0
- package/Jwt-CDdbxwvH.js +1 -0
- package/Jwt.js +1 -44
- package/Jwt.mjs +1 -0
- package/Memcached.js +9 -124
- package/Memcached.mjs +9 -0
- package/Server.d.ts +5 -4
- package/Server.js +1 -239
- package/Server.mjs +1 -0
- package/cookieParse.js +1 -27
- package/cookieParse.mjs +1 -0
- package/cookieString.js +1 -24
- package/cookieString.mjs +1 -0
- package/docs/assets/highlight.css +19 -5
- package/docs/assets/main.js +59 -52
- package/docs/assets/navigation.js +1 -0
- package/docs/assets/search.js +1 -1
- package/docs/assets/style.css +826 -826
- package/docs/classes/ApiError.html +22 -17
- package/docs/classes/AsyncJwt.html +16 -17
- package/docs/classes/Controller.html +42 -24
- package/docs/classes/Jwt.html +16 -17
- package/docs/classes/Memcached.html +31 -38
- package/docs/classes/Model.html +24 -7
- package/docs/classes/Server.html +25 -25
- package/docs/classes/Ssr.html +13 -11
- package/docs/classes/Web.html +10 -3
- package/docs/functions/action.html +2 -0
- package/docs/functions/body.html +2 -0
- package/docs/functions/codeToStatus.html +2 -0
- package/docs/functions/config.html +2 -0
- package/docs/functions/connection.html +2 -0
- package/docs/functions/context.html +2 -0
- package/docs/functions/controller-1.html +2 -0
- package/docs/functions/cookies.html +2 -0
- package/docs/functions/db.html +2 -0
- package/docs/functions/headers.html +2 -0
- package/docs/functions/home.html +2 -0
- package/docs/functions/hostname.html +2 -0
- package/docs/functions/http.html +4 -0
- package/docs/functions/init.html +2 -0
- package/docs/functions/json.html +3 -0
- package/docs/functions/logerror.html +3 -0
- package/docs/functions/method.html +2 -0
- package/docs/functions/mixin.html +5 -0
- package/docs/functions/mount.html +2 -0
- package/docs/functions/pool.html +2 -0
- package/docs/functions/protocol.html +2 -0
- package/docs/functions/request.html +2 -0
- package/docs/functions/selectControllersSchema.html +1 -0
- package/docs/functions/stream.html +2 -0
- package/docs/functions/subaction.html +2 -0
- package/docs/functions/url.html +2 -0
- package/docs/functions/xml.html +3 -0
- package/docs/index.html +8 -16
- package/docs/interfaces/ApiErrorMessage.html +6 -1
- package/docs/interfaces/ContextSsr.html +22 -19
- package/docs/interfaces/ContextWeb.html +7 -1
- package/docs/interfaces/OptionsSsr.html +3 -1
- package/docs/interfaces/OptionsWeb.html +6 -1
- package/docs/interfaces/ResponseOptions.html +4 -1
- package/docs/interfaces/Route.html +4 -1
- package/docs/interfaces/Schema.html +3 -1
- package/docs/interfaces/ServerHandler.html +4 -1
- package/docs/interfaces/ServerOptions.html +8 -1
- package/docs/interfaces/ServerWebsocket.html +4 -1
- package/docs/modules.html +50 -85
- package/docs/types/ServerRoutes.html +1 -0
- package/docs/variables/helpers.html +31 -0
- package/index.d.ts +33 -111
- package/index.js +4 -1965
- package/index.mjs +57 -0
- package/jsonBody.js +1 -27
- package/jsonBody.mjs +1 -0
- package/multipartBody.d.ts +1 -1
- package/multipartBody.js +1 -48
- package/multipartBody.mjs +1 -0
- package/package.json +14 -20
- package/readConfig.js +1 -17
- package/readConfig.mjs +1 -0
- package/readConfigSync.js +1 -18
- package/readConfigSync.mjs +1 -0
- package/staticBody.js +1 -207
- package/staticBody.mjs +1 -0
- package/urlencodedBody.js +1 -32
- package/urlencodedBody.mjs +1 -0
- package/ApiError-b517f53a.js +0 -37
- package/cookieParse-49f1da46.js +0 -25
- package/decoders-ee9f4396.js +0 -18
- package/docs/assets/icons.css +0 -1043
- package/docs/assets/icons.png +0 -0
- package/docs/assets/icons@2x.png +0 -0
- package/docs/assets/widgets.png +0 -0
- package/docs/assets/widgets@2x.png +0 -0
package/cookieParse-49f1da46.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const cookieParse = (str) => {
|
|
4
|
-
if (!str) {
|
|
5
|
-
return {};
|
|
6
|
-
}
|
|
7
|
-
return str.split(/; */).reduce((obj, str2) => {
|
|
8
|
-
if (str2 === "") {
|
|
9
|
-
return obj;
|
|
10
|
-
}
|
|
11
|
-
const eq = str2.indexOf("=");
|
|
12
|
-
const key = eq > 0 ? str2.slice(0, eq) : str2;
|
|
13
|
-
let val = eq > 0 ? str2.slice(eq + 1) : null;
|
|
14
|
-
if (val != null) {
|
|
15
|
-
try {
|
|
16
|
-
val = decodeURIComponent(val);
|
|
17
|
-
} catch (ex) {
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
obj[key] = val;
|
|
21
|
-
return obj;
|
|
22
|
-
}, {});
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
exports.cookieParse = cookieParse;
|
package/decoders-ee9f4396.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const urlEncode = (str) => {
|
|
4
|
-
return str.replace(/\+/ig, "-").replace(/\//ig, "_").replace(/=+$/, "");
|
|
5
|
-
};
|
|
6
|
-
const urlDecode = (str) => {
|
|
7
|
-
return str.replace(/-/ig, "+").replace(/_/ig, "/");
|
|
8
|
-
};
|
|
9
|
-
const toBase64url = (params) => {
|
|
10
|
-
return urlEncode(Buffer.from(JSON.stringify(params)).toString("base64"));
|
|
11
|
-
};
|
|
12
|
-
const fromBase64url = (str) => {
|
|
13
|
-
return JSON.parse(Buffer.from(urlDecode(str), "base64").toString());
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
exports.fromBase64url = fromBase64url;
|
|
17
|
-
exports.toBase64url = toBase64url;
|
|
18
|
-
exports.urlEncode = urlEncode;
|