@eik/core 1.3.53 → 1.3.55
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/CHANGELOG.md +7 -0
- package/lib/classes/alias.js +48 -48
- package/lib/classes/asset.js +99 -92
- package/lib/classes/author.js +20 -20
- package/lib/classes/http-incoming.js +52 -52
- package/lib/classes/http-outgoing.js +84 -83
- package/lib/classes/meta.js +20 -23
- package/lib/classes/package.js +73 -70
- package/lib/classes/versions.js +62 -60
- package/lib/handlers/alias.delete.js +125 -120
- package/lib/handlers/alias.get.js +92 -87
- package/lib/handlers/alias.post.js +196 -203
- package/lib/handlers/alias.put.js +196 -202
- package/lib/handlers/auth.post.js +95 -93
- package/lib/handlers/map.get.js +110 -111
- package/lib/handlers/map.put.js +256 -231
- package/lib/handlers/pkg.get.js +120 -122
- package/lib/handlers/pkg.log.js +112 -110
- package/lib/handlers/pkg.put.js +223 -213
- package/lib/handlers/versions.get.js +92 -101
- package/lib/main.js +47 -47
- package/lib/multipart/form-field.js +20 -23
- package/lib/multipart/form-file.js +22 -24
- package/lib/multipart/parser.js +231 -217
- package/lib/sinks/mem-entry.js +26 -31
- package/lib/sinks/test.js +287 -273
- package/lib/utils/defaults.js +11 -11
- package/lib/utils/globals.js +5 -5
- package/lib/utils/healthcheck.js +131 -108
- package/lib/utils/path-builders-fs.js +61 -29
- package/lib/utils/path-builders-uri.js +26 -18
- package/lib/utils/utils.js +76 -79
- package/package.json +22 -17
- package/types/classes/alias.d.ts +28 -0
- package/types/classes/asset.d.ts +48 -0
- package/types/classes/author.d.ts +17 -0
- package/types/classes/http-incoming.d.ts +37 -0
- package/types/classes/http-outgoing.d.ts +20 -0
- package/types/classes/meta.d.ts +17 -0
- package/types/classes/package.d.ts +40 -0
- package/types/classes/versions.d.ts +28 -0
- package/types/handlers/alias.delete.d.ts +33 -0
- package/types/handlers/alias.get.d.ts +48 -0
- package/types/handlers/alias.post.d.ts +83 -0
- package/types/handlers/alias.put.d.ts +83 -0
- package/types/handlers/auth.post.d.ts +82 -0
- package/types/handlers/map.get.d.ts +51 -0
- package/types/handlers/map.put.d.ts +78 -0
- package/types/handlers/pkg.get.d.ts +51 -0
- package/types/handlers/pkg.log.d.ts +51 -0
- package/types/handlers/pkg.put.d.ts +107 -0
- package/types/handlers/versions.get.d.ts +48 -0
- package/types/main.d.ts +44 -0
- package/types/multipart/form-field.d.ts +17 -0
- package/types/multipart/form-file.d.ts +17 -0
- package/types/multipart/parser.d.ts +52 -0
- package/types/sinks/mem-entry.d.ts +15 -0
- package/types/sinks/test.d.ts +32 -0
- package/types/utils/defaults.d.ts +9 -0
- package/types/utils/globals.d.ts +8 -0
- package/types/utils/healthcheck.d.ts +24 -0
- package/types/utils/path-builders-fs.d.ts +41 -0
- package/types/utils/path-builders-uri.d.ts +26 -0
- package/types/utils/utils.d.ts +6 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export default Alias;
|
|
2
|
+
declare const Alias: {
|
|
3
|
+
new ({ name, type, alias, org }?: {
|
|
4
|
+
name?: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
alias?: string;
|
|
7
|
+
org?: string;
|
|
8
|
+
}): {
|
|
9
|
+
_version: string;
|
|
10
|
+
_alias: string;
|
|
11
|
+
_name: string;
|
|
12
|
+
_type: string;
|
|
13
|
+
_org: string;
|
|
14
|
+
version: string;
|
|
15
|
+
readonly alias: string;
|
|
16
|
+
readonly name: string;
|
|
17
|
+
readonly type: string;
|
|
18
|
+
readonly org: string;
|
|
19
|
+
toJSON(): {
|
|
20
|
+
version: string;
|
|
21
|
+
alias: string;
|
|
22
|
+
type: string;
|
|
23
|
+
name: string;
|
|
24
|
+
org: string;
|
|
25
|
+
};
|
|
26
|
+
readonly [Symbol.toStringTag]: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export default Asset;
|
|
2
|
+
export type AssetOptions = {
|
|
3
|
+
pathname?: string;
|
|
4
|
+
version?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
type?: string;
|
|
7
|
+
org?: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* @typedef {object} AssetOptions
|
|
11
|
+
* @property {string} [pathname]
|
|
12
|
+
* @property {string} [version]
|
|
13
|
+
* @property {string} [name]
|
|
14
|
+
* @property {string} [type]
|
|
15
|
+
* @property {string} [org]
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Meta information about an Asset.
|
|
19
|
+
*/
|
|
20
|
+
declare const Asset: {
|
|
21
|
+
new ({ pathname, version, name, type, org, }?: AssetOptions): {
|
|
22
|
+
_mimeType: string;
|
|
23
|
+
_type: string;
|
|
24
|
+
_size: number;
|
|
25
|
+
_integrity: string;
|
|
26
|
+
_pathname: string;
|
|
27
|
+
_version: string;
|
|
28
|
+
_name: string;
|
|
29
|
+
_org: string;
|
|
30
|
+
integrity: string;
|
|
31
|
+
readonly pathname: string;
|
|
32
|
+
readonly mimeType: string;
|
|
33
|
+
readonly version: string;
|
|
34
|
+
readonly asset: string;
|
|
35
|
+
readonly name: string;
|
|
36
|
+
type: string;
|
|
37
|
+
size: number;
|
|
38
|
+
readonly org: string;
|
|
39
|
+
toJSON(): {
|
|
40
|
+
integrity: string;
|
|
41
|
+
pathname: string;
|
|
42
|
+
mimeType: string;
|
|
43
|
+
type: string;
|
|
44
|
+
size: number;
|
|
45
|
+
};
|
|
46
|
+
readonly [Symbol.toStringTag]: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export default Author;
|
|
2
|
+
declare const Author: {
|
|
3
|
+
new ({ name, user }?: {
|
|
4
|
+
name?: string;
|
|
5
|
+
user?: string;
|
|
6
|
+
}): {
|
|
7
|
+
_name: string;
|
|
8
|
+
_user: string;
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly user: string;
|
|
11
|
+
toJSON(): {
|
|
12
|
+
name: string;
|
|
13
|
+
user: string;
|
|
14
|
+
};
|
|
15
|
+
readonly [Symbol.toStringTag]: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export default HttpIncoming;
|
|
2
|
+
/**
|
|
3
|
+
* A bearer object to hold misc data through a http
|
|
4
|
+
* request / response cyclus.
|
|
5
|
+
* @class HttpIncoming
|
|
6
|
+
*/
|
|
7
|
+
declare const HttpIncoming: {
|
|
8
|
+
new (request: any, { version, extras, author, alias, type, name, org, }?: {
|
|
9
|
+
version?: string;
|
|
10
|
+
extras?: string;
|
|
11
|
+
author?: {};
|
|
12
|
+
alias?: string;
|
|
13
|
+
type?: string;
|
|
14
|
+
name?: string;
|
|
15
|
+
org?: string;
|
|
16
|
+
}): {
|
|
17
|
+
_version: string;
|
|
18
|
+
_extras: string;
|
|
19
|
+
_author: {};
|
|
20
|
+
_alias: string;
|
|
21
|
+
_type: string;
|
|
22
|
+
_name: string;
|
|
23
|
+
_org: string;
|
|
24
|
+
_request: any;
|
|
25
|
+
_headers: any;
|
|
26
|
+
readonly version: string;
|
|
27
|
+
readonly extras: string;
|
|
28
|
+
readonly author: {};
|
|
29
|
+
readonly alias: string;
|
|
30
|
+
readonly name: string;
|
|
31
|
+
readonly type: string;
|
|
32
|
+
readonly org: string;
|
|
33
|
+
readonly request: any;
|
|
34
|
+
readonly headers: any;
|
|
35
|
+
readonly [Symbol.toStringTag]: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export default HttpOutgoing;
|
|
2
|
+
declare const HttpOutgoing: {
|
|
3
|
+
new (): {
|
|
4
|
+
_cacheControl: string;
|
|
5
|
+
_statusCode: number;
|
|
6
|
+
_mimeType: string;
|
|
7
|
+
_location: string;
|
|
8
|
+
_stream: any;
|
|
9
|
+
_body: any;
|
|
10
|
+
_etag: string;
|
|
11
|
+
cacheControl: string;
|
|
12
|
+
statusCode: number;
|
|
13
|
+
location: string;
|
|
14
|
+
mimeType: string;
|
|
15
|
+
stream: any;
|
|
16
|
+
body: any;
|
|
17
|
+
etag: string;
|
|
18
|
+
readonly [Symbol.toStringTag]: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export default Meta;
|
|
2
|
+
declare const Meta: {
|
|
3
|
+
new ({ value, name }?: {
|
|
4
|
+
value?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
}): {
|
|
7
|
+
_value: string;
|
|
8
|
+
_name: string;
|
|
9
|
+
readonly value: string;
|
|
10
|
+
readonly name: string;
|
|
11
|
+
toJSON(): {
|
|
12
|
+
value: string;
|
|
13
|
+
name: string;
|
|
14
|
+
};
|
|
15
|
+
readonly [Symbol.toStringTag]: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export default Package;
|
|
2
|
+
declare const Package: {
|
|
3
|
+
new ({ version, type, name, org, author, }?: {
|
|
4
|
+
version?: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
org?: string;
|
|
8
|
+
author?: {};
|
|
9
|
+
}): {
|
|
10
|
+
_version: string;
|
|
11
|
+
_created: number;
|
|
12
|
+
_author: {};
|
|
13
|
+
_type: string;
|
|
14
|
+
_name: string;
|
|
15
|
+
_org: string;
|
|
16
|
+
_files: any[];
|
|
17
|
+
_meta: any[];
|
|
18
|
+
readonly integrity: string;
|
|
19
|
+
readonly version: string;
|
|
20
|
+
readonly created: number;
|
|
21
|
+
readonly author: {};
|
|
22
|
+
readonly type: string;
|
|
23
|
+
readonly name: string;
|
|
24
|
+
readonly org: string;
|
|
25
|
+
setAsset(asset: any): void;
|
|
26
|
+
setMeta(meta: any): void;
|
|
27
|
+
toJSON(): {
|
|
28
|
+
integrity: string;
|
|
29
|
+
version: string;
|
|
30
|
+
created: number;
|
|
31
|
+
author: {};
|
|
32
|
+
type: string;
|
|
33
|
+
name: string;
|
|
34
|
+
org: string;
|
|
35
|
+
files: any[];
|
|
36
|
+
meta: any[];
|
|
37
|
+
};
|
|
38
|
+
readonly [Symbol.toStringTag]: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export default Versions;
|
|
2
|
+
declare const Versions: {
|
|
3
|
+
new ({ versions, type, name, org }?: {
|
|
4
|
+
versions?: any[];
|
|
5
|
+
type?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
org?: string;
|
|
8
|
+
}): {
|
|
9
|
+
_versions: Map<any, any>;
|
|
10
|
+
_type: string;
|
|
11
|
+
_name: string;
|
|
12
|
+
_org: string;
|
|
13
|
+
readonly versions: [any, any][];
|
|
14
|
+
readonly type: string;
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly org: string;
|
|
17
|
+
setVersion(version: any, integrity: any): void;
|
|
18
|
+
getVersion(major: any): any;
|
|
19
|
+
check(version: any): boolean;
|
|
20
|
+
toJSON(): {
|
|
21
|
+
versions: [any, any][];
|
|
22
|
+
type: string;
|
|
23
|
+
name: string;
|
|
24
|
+
org: string;
|
|
25
|
+
};
|
|
26
|
+
readonly [Symbol.toStringTag]: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export default AliasDel;
|
|
2
|
+
export type AliasDeleteOptions = {
|
|
3
|
+
cacheControl?: string;
|
|
4
|
+
/**
|
|
5
|
+
* List of key-value pairs [hostname, organization]
|
|
6
|
+
*/
|
|
7
|
+
organizations?: Array<[string, string]>;
|
|
8
|
+
sink?: import("@eik/sink").default;
|
|
9
|
+
logger?: import("abslog").AbstractLoggerOptions;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @typedef {object} AliasDeleteOptions
|
|
13
|
+
* @property {string} [cacheControl]
|
|
14
|
+
* @property {Array<[string, string]>} [organizations] List of key-value pairs [hostname, organization]
|
|
15
|
+
* @property {import("@eik/sink").default} [sink]
|
|
16
|
+
* @property {import("abslog").AbstractLoggerOptions} [logger]
|
|
17
|
+
*/
|
|
18
|
+
declare const AliasDel: {
|
|
19
|
+
new ({ organizations, cacheControl, logger, sink }?: AliasDeleteOptions): {
|
|
20
|
+
_organizations: [string, string][];
|
|
21
|
+
_cacheControl: string;
|
|
22
|
+
_sink: import("@eik/sink").default;
|
|
23
|
+
_log: abslog.ValidLogger;
|
|
24
|
+
_metrics: Metrics;
|
|
25
|
+
_histogram: Metrics.MetricsHistogram;
|
|
26
|
+
_orgRegistry: Map<string, string>;
|
|
27
|
+
readonly metrics: Metrics;
|
|
28
|
+
_exist(path?: string): Promise<boolean>;
|
|
29
|
+
handler(req: any, user: any, type: any, name: any, alias: any): Promise<any>;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
import abslog from "abslog";
|
|
33
|
+
import Metrics from "@metrics/client";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export default AliasGet;
|
|
2
|
+
export type AliasGetOptions = {
|
|
3
|
+
cacheControl?: string;
|
|
4
|
+
/**
|
|
5
|
+
* List of key-value pairs [hostname, organization]
|
|
6
|
+
*/
|
|
7
|
+
organizations?: Array<[string, string]>;
|
|
8
|
+
sink?: import("@eik/sink").default;
|
|
9
|
+
logger?: import("abslog").AbstractLoggerOptions;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @typedef {object} AliasGetOptions
|
|
13
|
+
* @property {string} [cacheControl]
|
|
14
|
+
* @property {Array<[string, string]>} [organizations] List of key-value pairs [hostname, organization]
|
|
15
|
+
* @property {import("@eik/sink").default} [sink]
|
|
16
|
+
* @property {import("abslog").AbstractLoggerOptions} [logger]
|
|
17
|
+
*/
|
|
18
|
+
declare const AliasGet: {
|
|
19
|
+
new ({ organizations, cacheControl, logger, sink }?: AliasGetOptions): {
|
|
20
|
+
_organizations: [string, string][];
|
|
21
|
+
_cacheControl: string;
|
|
22
|
+
_sink: import("@eik/sink").default;
|
|
23
|
+
_log: abslog.ValidLogger;
|
|
24
|
+
_metrics: Metrics;
|
|
25
|
+
_histogram: Metrics.MetricsHistogram;
|
|
26
|
+
_orgRegistry: Map<string, string>;
|
|
27
|
+
readonly metrics: Metrics;
|
|
28
|
+
handler(req: any, type: any, name: any, alias: any, extra: any): Promise<{
|
|
29
|
+
_cacheControl: string;
|
|
30
|
+
_statusCode: number;
|
|
31
|
+
_mimeType: string;
|
|
32
|
+
_location: string;
|
|
33
|
+
_stream: any;
|
|
34
|
+
_body: any;
|
|
35
|
+
_etag: string;
|
|
36
|
+
cacheControl: string;
|
|
37
|
+
statusCode: number;
|
|
38
|
+
location: string;
|
|
39
|
+
mimeType: string;
|
|
40
|
+
stream: any;
|
|
41
|
+
body: any;
|
|
42
|
+
etag: string;
|
|
43
|
+
readonly [Symbol.toStringTag]: string;
|
|
44
|
+
}>;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
import abslog from "abslog";
|
|
48
|
+
import Metrics from "@metrics/client";
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export default AliasPost;
|
|
2
|
+
export type AliasPostOptions = {
|
|
3
|
+
cacheControl?: string;
|
|
4
|
+
/**
|
|
5
|
+
* List of key-value pairs [hostname, organization]
|
|
6
|
+
*/
|
|
7
|
+
organizations?: Array<[string, string]>;
|
|
8
|
+
sink?: import("@eik/sink").default;
|
|
9
|
+
logger?: import("abslog").AbstractLoggerOptions;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @typedef {object} AliasPostOptions
|
|
13
|
+
* @property {string} [cacheControl]
|
|
14
|
+
* @property {Array<[string, string]>} [organizations] List of key-value pairs [hostname, organization]
|
|
15
|
+
* @property {import("@eik/sink").default} [sink]
|
|
16
|
+
* @property {import("abslog").AbstractLoggerOptions} [logger]
|
|
17
|
+
*/
|
|
18
|
+
declare const AliasPost: {
|
|
19
|
+
new ({ organizations, cacheControl, logger, sink }?: AliasPostOptions): {
|
|
20
|
+
_organizations: [string, string][];
|
|
21
|
+
_cacheControl: string;
|
|
22
|
+
_sink: import("@eik/sink").default;
|
|
23
|
+
_log: abslog.ValidLogger;
|
|
24
|
+
_metrics: Metrics;
|
|
25
|
+
_histogram: Metrics.MetricsHistogram;
|
|
26
|
+
_orgRegistry: Map<string, string>;
|
|
27
|
+
_multipart: {
|
|
28
|
+
_pkgMaxFileSize: number;
|
|
29
|
+
_legalFields: string[];
|
|
30
|
+
_legalFiles: string[];
|
|
31
|
+
_sink: import("@eik/sink").default;
|
|
32
|
+
_log: abslog.ValidLogger;
|
|
33
|
+
parse(incoming: any): Promise<any>;
|
|
34
|
+
_handleField({ name, value }: {
|
|
35
|
+
name: any;
|
|
36
|
+
value: any;
|
|
37
|
+
}): {
|
|
38
|
+
_value: string;
|
|
39
|
+
_name: string;
|
|
40
|
+
readonly value: string;
|
|
41
|
+
readonly name: string;
|
|
42
|
+
toJSON(): {
|
|
43
|
+
value: string;
|
|
44
|
+
name: string;
|
|
45
|
+
};
|
|
46
|
+
readonly [Symbol.toStringTag]: string;
|
|
47
|
+
};
|
|
48
|
+
_handleFile({ fieldname, file, filename, incoming }: {
|
|
49
|
+
fieldname: any;
|
|
50
|
+
file: any;
|
|
51
|
+
filename: any;
|
|
52
|
+
incoming: any;
|
|
53
|
+
}): Promise<any>;
|
|
54
|
+
_persistFile({ incoming, entry }: {
|
|
55
|
+
incoming: any;
|
|
56
|
+
entry: any;
|
|
57
|
+
}): Promise<any>;
|
|
58
|
+
readonly [Symbol.toStringTag]: string;
|
|
59
|
+
};
|
|
60
|
+
readonly metrics: Metrics;
|
|
61
|
+
_parser(incoming: any): Promise<any>;
|
|
62
|
+
_exist(incoming: any): Promise<boolean>;
|
|
63
|
+
handler(req: any, user: any, type: any, name: any, alias: any): Promise<{
|
|
64
|
+
_cacheControl: string;
|
|
65
|
+
_statusCode: number;
|
|
66
|
+
_mimeType: string;
|
|
67
|
+
_location: string;
|
|
68
|
+
_stream: any;
|
|
69
|
+
_body: any;
|
|
70
|
+
_etag: string;
|
|
71
|
+
cacheControl: string;
|
|
72
|
+
statusCode: number;
|
|
73
|
+
location: string;
|
|
74
|
+
mimeType: string;
|
|
75
|
+
stream: any;
|
|
76
|
+
body: any;
|
|
77
|
+
etag: string;
|
|
78
|
+
readonly [Symbol.toStringTag]: string;
|
|
79
|
+
}>;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
import abslog from "abslog";
|
|
83
|
+
import Metrics from "@metrics/client";
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export default AliasPut;
|
|
2
|
+
export type AliasPutOptions = {
|
|
3
|
+
cacheControl?: string;
|
|
4
|
+
/**
|
|
5
|
+
* List of key-value pairs [hostname, organization]
|
|
6
|
+
*/
|
|
7
|
+
organizations?: Array<[string, string]>;
|
|
8
|
+
sink?: import("@eik/sink").default;
|
|
9
|
+
logger?: import("abslog").AbstractLoggerOptions;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @typedef {object} AliasPutOptions
|
|
13
|
+
* @property {string} [cacheControl]
|
|
14
|
+
* @property {Array<[string, string]>} [organizations] List of key-value pairs [hostname, organization]
|
|
15
|
+
* @property {import("@eik/sink").default} [sink]
|
|
16
|
+
* @property {import("abslog").AbstractLoggerOptions} [logger]
|
|
17
|
+
*/
|
|
18
|
+
declare const AliasPut: {
|
|
19
|
+
new ({ organizations, cacheControl, logger, sink }?: AliasPutOptions): {
|
|
20
|
+
_organizations: [string, string][];
|
|
21
|
+
_cacheControl: string;
|
|
22
|
+
_sink: import("@eik/sink").default;
|
|
23
|
+
_log: abslog.ValidLogger;
|
|
24
|
+
_metrics: Metrics;
|
|
25
|
+
_histogram: Metrics.MetricsHistogram;
|
|
26
|
+
_orgRegistry: Map<string, string>;
|
|
27
|
+
_multipart: {
|
|
28
|
+
_pkgMaxFileSize: number;
|
|
29
|
+
_legalFields: string[];
|
|
30
|
+
_legalFiles: string[];
|
|
31
|
+
_sink: import("@eik/sink").default;
|
|
32
|
+
_log: abslog.ValidLogger;
|
|
33
|
+
parse(incoming: any): Promise<any>;
|
|
34
|
+
_handleField({ name, value }: {
|
|
35
|
+
name: any;
|
|
36
|
+
value: any;
|
|
37
|
+
}): {
|
|
38
|
+
_value: string;
|
|
39
|
+
_name: string;
|
|
40
|
+
readonly value: string;
|
|
41
|
+
readonly name: string;
|
|
42
|
+
toJSON(): {
|
|
43
|
+
value: string;
|
|
44
|
+
name: string;
|
|
45
|
+
};
|
|
46
|
+
readonly [Symbol.toStringTag]: string;
|
|
47
|
+
};
|
|
48
|
+
_handleFile({ fieldname, file, filename, incoming }: {
|
|
49
|
+
fieldname: any;
|
|
50
|
+
file: any;
|
|
51
|
+
filename: any;
|
|
52
|
+
incoming: any;
|
|
53
|
+
}): Promise<any>;
|
|
54
|
+
_persistFile({ incoming, entry }: {
|
|
55
|
+
incoming: any;
|
|
56
|
+
entry: any;
|
|
57
|
+
}): Promise<any>;
|
|
58
|
+
readonly [Symbol.toStringTag]: string;
|
|
59
|
+
};
|
|
60
|
+
readonly metrics: Metrics;
|
|
61
|
+
_parser(incoming: any): Promise<any>;
|
|
62
|
+
_exist(incoming: any): Promise<boolean>;
|
|
63
|
+
handler(req: any, user: any, type: any, name: any, alias: any): Promise<{
|
|
64
|
+
_cacheControl: string;
|
|
65
|
+
_statusCode: number;
|
|
66
|
+
_mimeType: string;
|
|
67
|
+
_location: string;
|
|
68
|
+
_stream: any;
|
|
69
|
+
_body: any;
|
|
70
|
+
_etag: string;
|
|
71
|
+
cacheControl: string;
|
|
72
|
+
statusCode: number;
|
|
73
|
+
location: string;
|
|
74
|
+
mimeType: string;
|
|
75
|
+
stream: any;
|
|
76
|
+
body: any;
|
|
77
|
+
etag: string;
|
|
78
|
+
readonly [Symbol.toStringTag]: string;
|
|
79
|
+
}>;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
import abslog from "abslog";
|
|
83
|
+
import Metrics from "@metrics/client";
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export default AuthPost;
|
|
2
|
+
export type AuthPostOptions = {
|
|
3
|
+
authKey?: string;
|
|
4
|
+
cacheControl?: string;
|
|
5
|
+
/**
|
|
6
|
+
* List of key-value pairs [hostname, organization]
|
|
7
|
+
*/
|
|
8
|
+
organizations?: Array<[string, string]>;
|
|
9
|
+
logger?: import("abslog").AbstractLoggerOptions;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @typedef {object} AuthPostOptions
|
|
13
|
+
* @property {string} [authKey]
|
|
14
|
+
* @property {string} [cacheControl]
|
|
15
|
+
* @property {Array<[string, string]>} [organizations] List of key-value pairs [hostname, organization]
|
|
16
|
+
* @property {import("abslog").AbstractLoggerOptions} [logger]
|
|
17
|
+
*/
|
|
18
|
+
declare const AuthPost: {
|
|
19
|
+
new ({ organizations, cacheControl, authKey, logger }?: AuthPostOptions): {
|
|
20
|
+
_organizations: [string, string][];
|
|
21
|
+
_cacheControl: string;
|
|
22
|
+
_authKey: string;
|
|
23
|
+
_log: abslog.ValidLogger;
|
|
24
|
+
_metrics: Metrics;
|
|
25
|
+
_histogram: Metrics.MetricsHistogram;
|
|
26
|
+
_orgRegistry: Map<string, string>;
|
|
27
|
+
_multipart: {
|
|
28
|
+
_pkgMaxFileSize: number;
|
|
29
|
+
_legalFields: string[];
|
|
30
|
+
_legalFiles: string[];
|
|
31
|
+
_sink: import("@eik/sink").default;
|
|
32
|
+
_log: abslog.ValidLogger;
|
|
33
|
+
parse(incoming: any): Promise<any>;
|
|
34
|
+
_handleField({ name, value }: {
|
|
35
|
+
name: any;
|
|
36
|
+
value: any;
|
|
37
|
+
}): {
|
|
38
|
+
_value: string;
|
|
39
|
+
_name: string;
|
|
40
|
+
readonly value: string;
|
|
41
|
+
readonly name: string;
|
|
42
|
+
toJSON(): {
|
|
43
|
+
value: string;
|
|
44
|
+
name: string;
|
|
45
|
+
};
|
|
46
|
+
readonly [Symbol.toStringTag]: string;
|
|
47
|
+
};
|
|
48
|
+
_handleFile({ fieldname, file, filename, incoming }: {
|
|
49
|
+
fieldname: any;
|
|
50
|
+
file: any;
|
|
51
|
+
filename: any;
|
|
52
|
+
incoming: any;
|
|
53
|
+
}): Promise<any>;
|
|
54
|
+
_persistFile({ incoming, entry }: {
|
|
55
|
+
incoming: any;
|
|
56
|
+
entry: any;
|
|
57
|
+
}): Promise<any>;
|
|
58
|
+
readonly [Symbol.toStringTag]: string;
|
|
59
|
+
};
|
|
60
|
+
readonly metrics: Metrics;
|
|
61
|
+
_parser(incoming: any): Promise<any>;
|
|
62
|
+
handler(req: any): Promise<{
|
|
63
|
+
_cacheControl: string;
|
|
64
|
+
_statusCode: number;
|
|
65
|
+
_mimeType: string;
|
|
66
|
+
_location: string;
|
|
67
|
+
_stream: any;
|
|
68
|
+
_body: any;
|
|
69
|
+
_etag: string;
|
|
70
|
+
cacheControl: string;
|
|
71
|
+
statusCode: number;
|
|
72
|
+
location: string;
|
|
73
|
+
mimeType: string;
|
|
74
|
+
stream: any;
|
|
75
|
+
body: any;
|
|
76
|
+
etag: string;
|
|
77
|
+
readonly [Symbol.toStringTag]: string;
|
|
78
|
+
}>;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
import abslog from "abslog";
|
|
82
|
+
import Metrics from "@metrics/client";
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export default MapGet;
|
|
2
|
+
export type MapGetOptions = {
|
|
3
|
+
etag?: boolean;
|
|
4
|
+
cacheControl?: string;
|
|
5
|
+
/**
|
|
6
|
+
* List of key-value pairs [hostname, organization]
|
|
7
|
+
*/
|
|
8
|
+
organizations?: Array<[string, string]>;
|
|
9
|
+
sink?: import("@eik/sink").default;
|
|
10
|
+
logger?: import("abslog").AbstractLoggerOptions;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* @typedef {object} MapGetOptions
|
|
14
|
+
* @property {boolean} [etag]
|
|
15
|
+
* @property {string} [cacheControl]
|
|
16
|
+
* @property {Array<[string, string]>} [organizations] List of key-value pairs [hostname, organization]
|
|
17
|
+
* @property {import("@eik/sink").default} [sink]
|
|
18
|
+
* @property {import("abslog").AbstractLoggerOptions} [logger]
|
|
19
|
+
*/
|
|
20
|
+
declare const MapGet: {
|
|
21
|
+
new ({ organizations, cacheControl, logger, sink, etag }?: MapGetOptions): {
|
|
22
|
+
_organizations: [string, string][];
|
|
23
|
+
_cacheControl: string;
|
|
24
|
+
_sink: import("@eik/sink").default;
|
|
25
|
+
_etag: boolean;
|
|
26
|
+
_log: abslog.ValidLogger;
|
|
27
|
+
_metrics: Metrics;
|
|
28
|
+
_histogram: Metrics.MetricsHistogram;
|
|
29
|
+
_orgRegistry: Map<string, string>;
|
|
30
|
+
readonly metrics: Metrics;
|
|
31
|
+
handler(req: any, name: any, version: any): Promise<{
|
|
32
|
+
_cacheControl: string;
|
|
33
|
+
_statusCode: number;
|
|
34
|
+
_mimeType: string;
|
|
35
|
+
_location: string;
|
|
36
|
+
_stream: any;
|
|
37
|
+
_body: any;
|
|
38
|
+
_etag: string;
|
|
39
|
+
cacheControl: string;
|
|
40
|
+
statusCode: number;
|
|
41
|
+
location: string;
|
|
42
|
+
mimeType: string;
|
|
43
|
+
stream: any;
|
|
44
|
+
body: any;
|
|
45
|
+
etag: string;
|
|
46
|
+
readonly [Symbol.toStringTag]: string;
|
|
47
|
+
}>;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
import abslog from "abslog";
|
|
51
|
+
import Metrics from "@metrics/client";
|