@arkstack/http 0.14.18 → 0.14.20
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/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as registerResponseFlashSweep, B as normalizeHeaderValue, C as parseCookies, D as attachViewState, E as signValue, F as Response, H as resolveMiddleware, I as Request, L as isHeaders, M as Session, N as ErrorBag, O as ensureSession, P as FlashBag, R as isRecord, S as getCookie, T as setCookie, U as unwrapRequestSource, V as normalizeHeaders, _ as decodeJson, a as kanunSessionPlugin, b as encodeSignedValue, c as getSessionDriver, d as CookieSessionDriver, f as BaseSessionDriver, g as encodeSessionPayload, h as decodeSessionPayload, i as arkstackHttpPlugin, j as old, k as getSession, l as FileSessionDriver, m as encryptSessionValue, n as redirectBackTarget, o as configureSession, p as decryptSessionValue, r as resolveRedirectTarget, s as createSessionDriver, t as redirect, u as DatabaseSessionDriver, v as decodeSignedValue, w as serializeCookie, x as generateSessionId, y as encodeJson, z as makeHeaders } from "./redirect-
|
|
1
|
+
import { A as registerResponseFlashSweep, B as normalizeHeaderValue, C as parseCookies, D as attachViewState, E as signValue, F as Response, H as resolveMiddleware, I as Request, L as isHeaders, M as Session, N as ErrorBag, O as ensureSession, P as FlashBag, R as isRecord, S as getCookie, T as setCookie, U as unwrapRequestSource, V as normalizeHeaders, _ as decodeJson, a as kanunSessionPlugin, b as encodeSignedValue, c as getSessionDriver, d as CookieSessionDriver, f as BaseSessionDriver, g as encodeSessionPayload, h as decodeSessionPayload, i as arkstackHttpPlugin, j as old, k as getSession, l as FileSessionDriver, m as encryptSessionValue, n as redirectBackTarget, o as configureSession, p as decryptSessionValue, r as resolveRedirectTarget, s as createSessionDriver, t as redirect, u as DatabaseSessionDriver, v as decodeSignedValue, w as serializeCookie, x as generateSessionId, y as encodeJson, z as makeHeaders } from "./redirect-CsrtLK0U.js";
|
|
2
2
|
//#region src/middlewares/web.ts
|
|
3
3
|
const webMiddlewareKey = Symbol.for("arkstack:http:web");
|
|
4
4
|
const markWebRequest = (target) => {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { isClass } from "@arkstack/common";
|
|
2
1
|
import { Request, Response } from "clear-router";
|
|
3
2
|
import { definePlugin } from "clear-router/core";
|
|
4
3
|
import { definePlugin as definePlugin$1 } from "kanun";
|
|
@@ -8,6 +7,15 @@ import { dirname, join } from "node:path";
|
|
|
8
7
|
import { mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
9
8
|
import { Arkstack } from "@arkstack/contract";
|
|
10
9
|
//#region src/helpers.ts
|
|
10
|
+
/**
|
|
11
|
+
* Checks and asserts if target is a class
|
|
12
|
+
*
|
|
13
|
+
* @param target
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
const isClass = (target) => {
|
|
17
|
+
return typeof target === "function" && /^class\s/.test(Function.prototype.toString.call(target));
|
|
18
|
+
};
|
|
11
19
|
const unwrapRequestSource = (source) => {
|
|
12
20
|
if (source.original) return unwrapRequestSource(source.original);
|
|
13
21
|
if (source.headers) return source;
|
package/dist/setup.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as Response$1, I as Request$1, a as kanunSessionPlugin, i as arkstackHttpPlugin, j as old, t as redirect } from "./redirect-
|
|
1
|
+
import { F as Response$1, I as Request$1, a as kanunSessionPlugin, i as arkstackHttpPlugin, j as old, t as redirect } from "./redirect-CsrtLK0U.js";
|
|
2
2
|
import { CoreRouter } from "clear-router";
|
|
3
3
|
import { Validator } from "kanun";
|
|
4
4
|
import "dotenv/config";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkstack/http",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.20",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "HTTP module for Arkstack, providing framework-agnostic request and response primitives.",
|
|
6
6
|
"homepage": "https://arkstack.toneflix.net/guide/http",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"clear-router": "^2.8.9",
|
|
32
32
|
"dotenv": "^17.4.2",
|
|
33
|
-
"@arkstack/contract": "^0.14.
|
|
34
|
-
"@arkstack/common": "^0.14.
|
|
33
|
+
"@arkstack/contract": "^0.14.20",
|
|
34
|
+
"@arkstack/common": "^0.14.20"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"arkormx": "^2.10.1",
|