@opra/common 0.20.1 → 0.21.0
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/browser.js +296 -403
- package/cjs/document/api-document.js +8 -0
- package/cjs/document/data-type/data-type.js +1 -1
- package/cjs/document/data-type/mapped-type.js +1 -1
- package/cjs/document/data-type/union-type.js +1 -1
- package/cjs/document/factory/factory.js +3 -2
- package/cjs/document/factory/process-resources.js +22 -7
- package/cjs/document/index.js +1 -0
- package/cjs/document/resource/storage.js +81 -0
- package/cjs/helpers/mixin-utils.js +6 -5
- package/cjs/helpers/responsive-map.js +6 -1
- package/cjs/http/enums/http-headers-codes.enum.js +1 -1
- package/cjs/http/index.js +0 -1
- package/cjs/schema/opra-schema.ns.js +1 -0
- package/cjs/schema/resource/storage.interface.js +7 -0
- package/cjs/schema/type-guards.js +6 -1
- package/esm/document/api-document.js +8 -0
- package/esm/document/data-type/data-type.js +1 -1
- package/esm/document/data-type/mapped-type.js +2 -2
- package/esm/document/data-type/union-type.js +2 -2
- package/esm/document/factory/factory.js +4 -3
- package/esm/document/factory/process-resources.js +18 -4
- package/esm/document/index.js +1 -0
- package/esm/document/resource/storage.js +77 -0
- package/esm/helpers/mixin-utils.js +4 -3
- package/esm/helpers/responsive-map.js +6 -1
- package/esm/http/enums/http-headers-codes.enum.js +1 -1
- package/esm/http/index.js +0 -1
- package/esm/schema/opra-schema.ns.js +1 -0
- package/esm/schema/resource/storage.interface.js +4 -0
- package/esm/schema/type-guards.js +4 -0
- package/package.json +2 -2
- package/types/document/api-document.d.ts +3 -10
- package/types/document/factory/factory.d.ts +4 -3
- package/types/document/factory/process-resources.d.ts +4 -2
- package/types/document/index.d.ts +1 -0
- package/types/document/resource/storage.d.ts +44 -0
- package/types/helpers/mixin-utils.d.ts +1 -1
- package/types/http/enums/http-headers-codes.enum.d.ts +1 -1
- package/types/http/index.d.ts +0 -1
- package/types/schema/opra-schema.ns.d.ts +1 -0
- package/types/schema/resource/resource.interface.d.ts +3 -2
- package/types/schema/resource/storage.interface.d.ts +18 -0
- package/types/schema/type-guards.d.ts +1 -0
- package/cjs/http/http-headers.js +0 -227
- package/esm/http/http-headers.js +0 -223
- package/types/http/http-headers.d.ts +0 -86
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference lib="dom" />
|
|
3
|
-
import { IncomingHttpHeaders, OutgoingHttpHeaders } from 'http';
|
|
4
|
-
import { ResponsiveMap } from '../helpers/index.js';
|
|
5
|
-
declare const nodeInspectCustom: unique symbol;
|
|
6
|
-
declare const kEntries: unique symbol;
|
|
7
|
-
declare const kOptions: unique symbol;
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
* @namespace HttpHeaders
|
|
11
|
-
*/
|
|
12
|
-
export declare namespace HttpHeaders {
|
|
13
|
-
type Initiator = Headers | HttpHeaders | IncomingHttpHeaders | OutgoingHttpHeaders | HeadersObject | Map<string, string | string[]>;
|
|
14
|
-
type HeadersObject = Record<string, string | string[]>;
|
|
15
|
-
interface Options {
|
|
16
|
-
onChange?: () => void;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
* @class HttpHeaders
|
|
22
|
-
*/
|
|
23
|
-
export declare class HttpHeaders {
|
|
24
|
-
protected static kEntries: symbol;
|
|
25
|
-
protected static kOptions: symbol;
|
|
26
|
-
protected [kEntries]: ResponsiveMap<string | string[]>;
|
|
27
|
-
protected [kOptions]: HttpHeaders.Options;
|
|
28
|
-
constructor(init?: HttpHeaders.Initiator | string, options?: HttpHeaders.Options);
|
|
29
|
-
get size(): number;
|
|
30
|
-
/**
|
|
31
|
-
* Appends a new value to the existing set of values for a header
|
|
32
|
-
* and returns this instance
|
|
33
|
-
*/
|
|
34
|
-
append(name: string, value: string | number | string[]): this;
|
|
35
|
-
/**
|
|
36
|
-
* Appends multiple values to the existing set of values for a header
|
|
37
|
-
* and returns this instance
|
|
38
|
-
*/
|
|
39
|
-
appendAll(headers: HttpHeaders.Initiator): this;
|
|
40
|
-
/**
|
|
41
|
-
* Appends multiple values to the existing set of values for a header
|
|
42
|
-
* and returns this instance
|
|
43
|
-
*/
|
|
44
|
-
set(init: HttpHeaders.Initiator): this;
|
|
45
|
-
/**
|
|
46
|
-
* Sets or modifies a value for a given header.
|
|
47
|
-
* If the header already exists, its value is replaced with the given value
|
|
48
|
-
*/
|
|
49
|
-
set(name: string, value: number | string | string[] | undefined): this;
|
|
50
|
-
parse(init: string): void;
|
|
51
|
-
/**
|
|
52
|
-
* Retrieves value of a given header
|
|
53
|
-
*/
|
|
54
|
-
get(name: string): string | string[] | undefined;
|
|
55
|
-
clear(): void;
|
|
56
|
-
/**
|
|
57
|
-
* Deletes a header entry
|
|
58
|
-
*/
|
|
59
|
-
delete(name: string): boolean;
|
|
60
|
-
/**
|
|
61
|
-
* Returns an iterable of key, value pairs for every entry in the map.
|
|
62
|
-
*/
|
|
63
|
-
entries(): IterableIterator<[string, string | string[]]>;
|
|
64
|
-
forEach(callbackFn: (value: number | string | string[], key: string, parent: HttpHeaders) => void, thisArg?: any): void;
|
|
65
|
-
/**
|
|
66
|
-
* Retrieves the names of the headers.
|
|
67
|
-
*/
|
|
68
|
-
keys(): IterableIterator<string>;
|
|
69
|
-
/**
|
|
70
|
-
* Checks for existence of a given header.
|
|
71
|
-
*/
|
|
72
|
-
has(name: string): boolean;
|
|
73
|
-
sort(compareFn?: (a: string, b: string) => number): this;
|
|
74
|
-
toObject(): Record<string, string>;
|
|
75
|
-
getProxy(): HttpHeaders.HeadersObject;
|
|
76
|
-
[nodeInspectCustom](): ResponsiveMap<string | string[]>;
|
|
77
|
-
[Symbol.iterator](): IterableIterator<[string, number | string | string[]]>;
|
|
78
|
-
get [Symbol.toStringTag](): string;
|
|
79
|
-
protected _append(name: string, value: any): void;
|
|
80
|
-
protected _set(name: string, value: any): void;
|
|
81
|
-
protected changed(): void;
|
|
82
|
-
static NON_DELIMITED_HEADERS: any;
|
|
83
|
-
static SEMICOLON_DELIMITED_HEADERS: any;
|
|
84
|
-
static ARRAY_HEADERS: any;
|
|
85
|
-
}
|
|
86
|
-
export {};
|