ovr 6.0.0 → 6.0.1
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/jsx/index.d.ts +6 -4
- package/dist/jsx/index.d.ts.map +1 -1
- package/dist/multipart/index.d.ts.map +1 -1
- package/dist/multipart/index.js +1 -2
- package/dist/util/index.d.ts +0 -2
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js +0 -1
- package/package.json +1 -1
- package/src/jsx/index.ts +5 -3
- package/src/multipart/index.ts +1 -2
- package/src/util/index.ts +0 -3
package/dist/jsx/index.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import type { Util } from "../util/index.js";
|
|
2
1
|
import type { IntrinsicElements as IE } from "./elements.js";
|
|
3
2
|
export declare namespace JSX {
|
|
3
|
+
type MaybePromise<T> = T | Promise<T>;
|
|
4
|
+
type MaybeFunction<T> = T | (() => T);
|
|
4
5
|
/** Standard HTML elements */
|
|
5
|
-
interface IntrinsicElements extends IE {
|
|
6
|
+
export interface IntrinsicElements extends IE {
|
|
6
7
|
}
|
|
7
8
|
/** JSX Element */
|
|
8
|
-
type Element =
|
|
9
|
+
export type Element = MaybeFunction<MaybePromise<string | number | bigint | boolean | object | null | undefined | Symbol | Iterable<Element> | AsyncIterable<Element>>>;
|
|
9
10
|
/** Unknown component props */
|
|
10
|
-
type Props = Record<string, JSX.Element>;
|
|
11
|
+
export type Props = Record<string, JSX.Element>;
|
|
12
|
+
export {};
|
|
11
13
|
}
|
|
12
14
|
/** ovr JSX */
|
|
13
15
|
export declare class JSX {
|
package/dist/jsx/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/jsx/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/jsx/index.ts"],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;;;;;OAMG;gBACS,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU;CA6BtE;AAED,yBAAiB,SAAS,CAAC;IAC1B,wBAAwB;IACxB,KAAY,OAAO,GAAG;QACrB;;;;;;;;;;;;;;;WAeG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;QAEhB;;;;;;;;;;;;;;;;WAgBG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;QAEjB;;;;;;;;;;WAUG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IAEF,8CAA8C;IAC9C,KAAY,IAAI,GAAG,YAAY,CAAC,OAAO,IAAI,CAAC,CAAC;CAC7C;AAED,wBAAwB;AACxB,qBAAa,SAAU,SAAQ,OAAO;;IAsCrC;;;;;;;;;;;;;;OAcG;gBACS,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,SAAS,CAAC,OAAO;IAmMrD,4CAA4C;IACrC,CAAC,MAAM,CAAC,aAAa,CAAC;IA6C7B;;;;;;;OAOG;IACG,IAAI;CAsBV"}
|
package/dist/multipart/index.js
CHANGED
|
@@ -81,7 +81,6 @@ class Part extends Request {
|
|
|
81
81
|
export class Multipart extends Request {
|
|
82
82
|
static #kb = 1024;
|
|
83
83
|
static #mb = 1024 ** 2;
|
|
84
|
-
static #multipartType = "multipart/form-data";
|
|
85
84
|
/** New line needle to share across requests and parts */
|
|
86
85
|
static #newLine = new Needle("\r\n\r\n");
|
|
87
86
|
/** Parser options */
|
|
@@ -124,7 +123,7 @@ export class Multipart extends Request {
|
|
|
124
123
|
constructor(req, options) {
|
|
125
124
|
super(req);
|
|
126
125
|
const [type, params] = Header.shift(this.headers.get(Header.contentType));
|
|
127
|
-
if (type
|
|
126
|
+
if (!type?.startsWith("multipart/")) {
|
|
128
127
|
throw new TypeError("Unsupported Media Type");
|
|
129
128
|
}
|
|
130
129
|
const { boundary } = Header.params(params);
|
package/dist/util/index.d.ts
CHANGED
package/dist/util/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,yBAAiB,IAAI,CAAC;IACrB,KAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,yBAAiB,IAAI,CAAC;IACrB,KAAY,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;CAC9C;AAED,2BAA2B;AAC3B,qBAAa,MAAM;IAClB,MAAM,CAAC,QAAQ,CAAC,WAAW,kBAAkB;IAE7C;;;OAGG;IACH,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,CAAC,MAAM,GAAG,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAWnE;;;OAGG;IACH,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;CAmDnC;AAED,gBAAgB;AAChB,qBAAa,IAAI;IAChB;;;;;OAKG;IACH,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM;CAQrB;AAED,6CAA6C;AAC7C,qBAAa,KAAK;;IAIjB,MAAM,CAAC,MAAM,GAAI,GAAG,MAAM,6BAA8B;IAExD,6BAA6B;IAC7B,MAAM,CAAC,MAAM,GAAI,QAAQ,UAAU,YAAkC;CACrE"}
|
package/dist/util/index.js
CHANGED
package/package.json
CHANGED
package/src/jsx/index.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { Render } from "../render/index.js";
|
|
2
|
-
import type { Util } from "../util/index.js";
|
|
3
2
|
import type { IntrinsicElements as IE } from "./elements.js";
|
|
4
3
|
|
|
5
4
|
export namespace JSX {
|
|
5
|
+
type MaybePromise<T> = T | Promise<T>;
|
|
6
|
+
type MaybeFunction<T> = T | (() => T);
|
|
7
|
+
|
|
6
8
|
/** Standard HTML elements */
|
|
7
9
|
export interface IntrinsicElements extends IE {}
|
|
8
10
|
|
|
9
11
|
/** JSX Element */
|
|
10
|
-
export type Element =
|
|
11
|
-
|
|
12
|
+
export type Element = MaybeFunction<
|
|
13
|
+
MaybePromise<
|
|
12
14
|
| string
|
|
13
15
|
| number
|
|
14
16
|
| bigint
|
package/src/multipart/index.ts
CHANGED
|
@@ -161,7 +161,6 @@ export namespace Multipart {
|
|
|
161
161
|
export class Multipart extends Request {
|
|
162
162
|
static readonly #kb = 1024;
|
|
163
163
|
static readonly #mb = 1024 ** 2;
|
|
164
|
-
static #multipartType = "multipart/form-data";
|
|
165
164
|
|
|
166
165
|
/** New line needle to share across requests and parts */
|
|
167
166
|
static readonly #newLine = new Needle("\r\n\r\n");
|
|
@@ -217,7 +216,7 @@ export class Multipart extends Request {
|
|
|
217
216
|
|
|
218
217
|
const [type, params] = Header.shift(this.headers.get(Header.contentType));
|
|
219
218
|
|
|
220
|
-
if (type
|
|
219
|
+
if (!type?.startsWith("multipart/")) {
|
|
221
220
|
throw new TypeError("Unsupported Media Type");
|
|
222
221
|
}
|
|
223
222
|
|
package/src/util/index.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
/** General utility types */
|
|
2
2
|
export namespace Util {
|
|
3
|
-
export type MaybePromise<T> = T | Promise<T>;
|
|
4
|
-
export type MaybeFunction<T> = T | (() => T);
|
|
5
3
|
export type DeepArray<T> = T | DeepArray<T>[];
|
|
6
4
|
}
|
|
7
5
|
|
|
8
6
|
/** Header parsing utils */
|
|
9
7
|
export class Header {
|
|
10
|
-
// shared content type header to minify better
|
|
11
8
|
static readonly contentType = "content-type";
|
|
12
9
|
|
|
13
10
|
/**
|