@milaboratories/pl-model-middle-layer 1.32.0 → 1.32.2
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/block_meta/block_components.d.ts +8 -10
- package/dist/block_meta/block_components.d.ts.map +1 -1
- package/dist/block_meta/block_description.d.ts +80 -82
- package/dist/block_meta/block_description.d.ts.map +1 -1
- package/dist/block_meta/block_id.d.ts +10 -12
- package/dist/block_meta/block_id.d.ts.map +1 -1
- package/dist/block_meta/block_manifest.d.ts +13 -15
- package/dist/block_meta/block_manifest.d.ts.map +1 -1
- package/dist/block_meta/block_meta.d.ts +10 -12
- package/dist/block_meta/block_meta.d.ts.map +1 -1
- package/dist/block_meta/common.d.ts +2 -3
- package/dist/block_meta/common.d.ts.map +1 -1
- package/dist/block_meta/content_conversion.d.ts +2 -4
- package/dist/block_meta/content_conversion.d.ts.map +1 -1
- package/dist/block_meta/content_types.d.ts +29 -28
- package/dist/block_meta/content_types.d.ts.map +1 -1
- package/dist/block_meta/semver.d.ts +1 -3
- package/dist/block_meta/semver.d.ts.map +1 -1
- package/dist/block_registry/block_pack_spec.d.ts +16 -18
- package/dist/block_registry/block_pack_spec.d.ts.map +1 -1
- package/dist/block_registry/overview.d.ts +137 -139
- package/dist/block_registry/overview.d.ts.map +1 -1
- package/dist/block_registry/registry_spec.d.ts +16 -18
- package/dist/block_registry/registry_spec.d.ts.map +1 -1
- package/dist/block_settings.d.ts +5 -5
- package/dist/block_settings.d.ts.map +1 -1
- package/dist/block_state.d.ts +9 -7
- package/dist/block_state.d.ts.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/json.d.ts +5 -7
- package/dist/json.d.ts.map +1 -1
- package/dist/pframe/internal_api/api_factory.d.ts +10 -12
- package/dist/pframe/internal_api/api_factory.d.ts.map +1 -1
- package/dist/pframe/internal_api/api_read.d.ts +2 -4
- package/dist/pframe/internal_api/api_read.d.ts.map +1 -1
- package/dist/pframe/internal_api/common.d.ts +6 -8
- package/dist/pframe/internal_api/common.d.ts.map +1 -1
- package/dist/pframe/internal_api/create_table.d.ts +9 -11
- package/dist/pframe/internal_api/create_table.d.ts.map +1 -1
- package/dist/pframe/internal_api/delete_column.d.ts +2 -4
- package/dist/pframe/internal_api/delete_column.d.ts.map +1 -1
- package/dist/pframe/internal_api/discover_columns.d.ts +11 -12
- package/dist/pframe/internal_api/discover_columns.d.ts.map +1 -1
- package/dist/pframe/internal_api/find_columns.d.ts +5 -7
- package/dist/pframe/internal_api/find_columns.d.ts.map +1 -1
- package/dist/pframe/internal_api/http_helpers.d.ts +87 -53
- package/dist/pframe/internal_api/http_helpers.d.ts.map +1 -1
- package/dist/pframe/internal_api/index.d.ts +0 -2
- package/dist/pframe/internal_api/pframe.d.ts +8 -7
- package/dist/pframe/internal_api/pframe.d.ts.map +1 -1
- package/dist/pframe/internal_api/table.d.ts +1 -3
- package/dist/pframe/internal_api/table.d.ts.map +1 -1
- package/dist/project.d.ts +1 -2
- package/dist/project.d.ts.map +1 -1
- package/dist/project_list.d.ts +1 -3
- package/dist/project_list.d.ts.map +1 -1
- package/dist/project_overview.d.ts +25 -15
- package/dist/project_overview.d.ts.map +1 -1
- package/dist/storage_debug_view.d.ts +1 -2
- package/dist/storage_debug_view.d.ts.map +1 -1
- package/dist/update_info.d.ts +3 -3
- package/dist/update_info.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { AxisQualification, ColumnAxesWithQualifications } from "./common.js";
|
|
2
2
|
import { AxisValueType, ColumnValueType, DiscoverColumnsStepInfo, PColumnIdAndSpec } from "@milaboratories/pl-model-common";
|
|
3
|
-
|
|
4
3
|
//#region src/pframe/internal_api/discover_columns.d.ts
|
|
5
4
|
/** Matches a string value either exactly or by regex pattern */
|
|
6
|
-
type StringMatcher = {
|
|
5
|
+
export type StringMatcher = {
|
|
7
6
|
type: "exact";
|
|
8
7
|
value: string;
|
|
9
8
|
} | {
|
|
@@ -11,9 +10,9 @@ type StringMatcher = {
|
|
|
11
10
|
value: string;
|
|
12
11
|
};
|
|
13
12
|
/** Map of key to array of string matchers (OR-ed per key, AND-ed across keys) */
|
|
14
|
-
type MatcherMap = Record<string, StringMatcher[]>;
|
|
13
|
+
export type MatcherMap = Record<string, StringMatcher[]>;
|
|
15
14
|
/** Selector for matching axes by various criteria */
|
|
16
|
-
interface MultiAxisSelector {
|
|
15
|
+
export interface MultiAxisSelector {
|
|
17
16
|
/** Match any of the axis types listed here */
|
|
18
17
|
readonly type?: AxisValueType[];
|
|
19
18
|
/** Match any of the axis names listed here */
|
|
@@ -27,7 +26,7 @@ interface MultiAxisSelector {
|
|
|
27
26
|
}
|
|
28
27
|
/** Column selector for discover columns request, matching columns by various criteria.
|
|
29
28
|
* Multiple selectors are OR-ed: a column matches if it satisfies any selector. */
|
|
30
|
-
interface MultiColumnSelector {
|
|
29
|
+
export interface MultiColumnSelector {
|
|
31
30
|
/** Match any of the value types listed here */
|
|
32
31
|
readonly type?: ColumnValueType[];
|
|
33
32
|
/** Match any of the names listed here */
|
|
@@ -44,7 +43,7 @@ interface MultiColumnSelector {
|
|
|
44
43
|
readonly partialAxesMatch?: boolean;
|
|
45
44
|
}
|
|
46
45
|
/** Fine-grained constraints controlling axes matching and qualification behavior */
|
|
47
|
-
interface DiscoverColumnsConstraints {
|
|
46
|
+
export interface DiscoverColumnsConstraints {
|
|
48
47
|
/** Allow source (query) axes that have no match in the hit column */
|
|
49
48
|
allowFloatingSourceAxes: boolean;
|
|
50
49
|
/** Allow hit column axes that have no match in the source (query) */
|
|
@@ -55,7 +54,7 @@ interface DiscoverColumnsConstraints {
|
|
|
55
54
|
allowHitQualifications: boolean;
|
|
56
55
|
}
|
|
57
56
|
/** V2 request with separate include/exclude filters */
|
|
58
|
-
interface DiscoverColumnsRequestV2 {
|
|
57
|
+
export interface DiscoverColumnsRequestV2 {
|
|
59
58
|
/** Include columns matching these selectors (OR-ed); empty or omitted matches all columns */
|
|
60
59
|
includeColumns?: MultiColumnSelector[];
|
|
61
60
|
/** Exclude columns matching these selectors (OR-ed); applied after include filter */
|
|
@@ -68,14 +67,14 @@ interface DiscoverColumnsRequestV2 {
|
|
|
68
67
|
constraints: DiscoverColumnsConstraints;
|
|
69
68
|
}
|
|
70
69
|
/** Qualifications info for a discover columns response mapping variant */
|
|
71
|
-
interface DiscoverColumnsResponseQualifications {
|
|
70
|
+
export interface DiscoverColumnsResponseQualifications {
|
|
72
71
|
/** Qualifications for each query (already-integrated) column set */
|
|
73
72
|
forQueries: AxisQualification[][];
|
|
74
73
|
/** Qualifications for the hit column */
|
|
75
74
|
forHit: AxisQualification[];
|
|
76
75
|
}
|
|
77
76
|
/** A single mapping variant describing how a hit column can be integrated */
|
|
78
|
-
interface DiscoverColumnsMappingVariant {
|
|
77
|
+
export interface DiscoverColumnsMappingVariant {
|
|
79
78
|
/** Full qualifications needed for integration */
|
|
80
79
|
qualifications: DiscoverColumnsResponseQualifications;
|
|
81
80
|
/** Distinctive (minimal) qualifications needed for integration */
|
|
@@ -87,7 +86,7 @@ interface DiscoverColumnsMappingVariant {
|
|
|
87
86
|
* To materialize the hit as an executable query, feed `hit.columnId` and
|
|
88
87
|
* `path` into the PFrame's `buildQuery`.
|
|
89
88
|
*/
|
|
90
|
-
interface DiscoverColumnsResponseHit {
|
|
89
|
+
export interface DiscoverColumnsResponseHit {
|
|
91
90
|
/** The column that was found compatible */
|
|
92
91
|
hit: PColumnIdAndSpec;
|
|
93
92
|
/** Possible ways to integrate this column with the existing set */
|
|
@@ -96,10 +95,10 @@ interface DiscoverColumnsResponseHit {
|
|
|
96
95
|
path: DiscoverColumnsStepInfo[];
|
|
97
96
|
}
|
|
98
97
|
/** Response from discover columns. */
|
|
99
|
-
interface DiscoverColumnsResponse {
|
|
98
|
+
export interface DiscoverColumnsResponse {
|
|
100
99
|
/** Columns that could be integrated and possible ways to integrate them */
|
|
101
100
|
hits: DiscoverColumnsResponseHit[];
|
|
102
101
|
}
|
|
103
102
|
//#endregion
|
|
104
|
-
export {
|
|
103
|
+
export type { DiscoverColumnsStepInfo };
|
|
105
104
|
//# sourceMappingURL=discover_columns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover_columns.d.ts","names":[],"sources":["../../../src/pframe/internal_api/discover_columns.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"discover_columns.d.ts","names":[],"sources":["../../../src/pframe/internal_api/discover_columns.ts"],"mappings":";;;;YAWY;EAAkB;EAAe;;EAAoB;EAAe;;;YAGpE,aAAa,eAAe;;iBAGvB;;WAEN,OAAO;;WAEP,OAAO;;WAEP,SAAS;;WAET,gBAAgB;;WAEhB,cAAc;;;;iBAKR;;WAEN,OAAO;;WAEP,OAAO;;WAEP,SAAS;;WAET,gBAAgB;;WAEhB,cAAc;;WAEd,OAAO;;WAEP;;;iBAIM;;EAEf;;EAEA;;EAEA;;EAEA;;;iBAIe;;EAEf,iBAAiB;;EAEjB,iBAAiB;;EAEjB,MAAM;;EAEN;;EAEA,aAAa;;;iBAIE;;EAEf,YAAY;;EAEZ,QAAQ;;;iBAIO;;EAEf,gBAAgB;;EAEhB,2BAA2B;;;;;;;;iBASZ;;EAEf,KAAK;;EAEL,iBAAiB;;EAEjB,MAAM;;;iBAIS;;EAEf,MAAM"}
|
|
@@ -1,27 +1,25 @@
|
|
|
1
1
|
import { AxisQualification, ColumnAxesWithQualifications } from "./common.js";
|
|
2
2
|
import { ColumnFilter, PColumnIdAndSpec } from "@milaboratories/pl-model-common";
|
|
3
|
-
|
|
4
3
|
//#region src/pframe/internal_api/find_columns.d.ts
|
|
5
|
-
interface FindColumnsRequest {
|
|
4
|
+
export interface FindColumnsRequest {
|
|
6
5
|
columnFilter: ColumnFilter;
|
|
7
6
|
compatibleWith: ColumnAxesWithQualifications[];
|
|
8
7
|
strictlyCompatible: boolean;
|
|
9
8
|
}
|
|
10
|
-
interface FindColumnResponseQualifications {
|
|
9
|
+
export interface FindColumnResponseQualifications {
|
|
11
10
|
forQueries: AxisQualification[][];
|
|
12
11
|
forHit: AxisQualification[];
|
|
13
12
|
}
|
|
14
|
-
interface FindColumnsMappingVariant {
|
|
13
|
+
export interface FindColumnsMappingVariant {
|
|
15
14
|
qualifications: FindColumnResponseQualifications;
|
|
16
15
|
distinctiveQualifications: FindColumnResponseQualifications;
|
|
17
16
|
}
|
|
18
|
-
interface FindColumnsResponseHit {
|
|
17
|
+
export interface FindColumnsResponseHit {
|
|
19
18
|
hit: PColumnIdAndSpec;
|
|
20
19
|
mappingVariants: FindColumnsMappingVariant[];
|
|
21
20
|
}
|
|
22
|
-
interface FindColumnsResponse {
|
|
21
|
+
export interface FindColumnsResponse {
|
|
23
22
|
hits: FindColumnsResponseHit[];
|
|
24
23
|
}
|
|
25
24
|
//#endregion
|
|
26
|
-
export { FindColumnResponseQualifications, FindColumnsMappingVariant, FindColumnsRequest, FindColumnsResponse, FindColumnsResponseHit };
|
|
27
25
|
//# sourceMappingURL=find_columns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find_columns.d.ts","names":[],"sources":["../../../src/pframe/internal_api/find_columns.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"find_columns.d.ts","names":[],"sources":["../../../src/pframe/internal_api/find_columns.ts"],"mappings":";;;iBAGiB;EACf,cAAc;EACd,gBAAgB;EAChB;;iBAGe;EACf,YAAY;EACZ,QAAQ;;iBAGO;EACf,gBAAgB;EAChB,2BAA2B;;iBAGZ;EACf,KAAK;EACL,iBAAiB;;iBAGF;EACf,MAAM"}
|
|
@@ -2,18 +2,19 @@ import { Logger } from "./common.js";
|
|
|
2
2
|
import { Base64Encoded, Branded } from "@milaboratories/pl-model-common";
|
|
3
3
|
import { Readable } from "node:stream";
|
|
4
4
|
import { RequestListener } from "node:http";
|
|
5
|
-
|
|
6
5
|
//#region src/pframe/internal_api/http_helpers.d.ts
|
|
7
6
|
/** Parquet file extension */
|
|
8
|
-
declare const ParquetExtension: ".parquet";
|
|
7
|
+
export declare const ParquetExtension: ".parquet";
|
|
9
8
|
/** Parquet file name */
|
|
10
|
-
type ParquetFileName = Branded<`${string}.parquet`, "PFrameInternal.ParquetFileName">;
|
|
11
|
-
type FileRange = {
|
|
12
|
-
/** Start byte position (inclusive) */
|
|
9
|
+
export type ParquetFileName = Branded<`${string}.parquet`, "PFrameInternal.ParquetFileName">;
|
|
10
|
+
export type FileRange = {
|
|
11
|
+
/** Start byte position (inclusive) */
|
|
12
|
+
start: number;
|
|
13
|
+
/** End byte position (inclusive) */
|
|
13
14
|
end: number;
|
|
14
15
|
};
|
|
15
16
|
/** HTTP range as of RFC 9110 <https://datatracker.ietf.org/doc/html/rfc9110#name-range> */
|
|
16
|
-
type HttpRange = {
|
|
17
|
+
export type HttpRange = {
|
|
17
18
|
/**
|
|
18
19
|
* Get file content in the specified byte range
|
|
19
20
|
*
|
|
@@ -23,8 +24,10 @@ type HttpRange = {
|
|
|
23
24
|
* Range: bytes=0-1023
|
|
24
25
|
* ```
|
|
25
26
|
*/
|
|
26
|
-
type: "bounded";
|
|
27
|
-
|
|
27
|
+
type: "bounded";
|
|
28
|
+
/** Start byte position (inclusive) */
|
|
29
|
+
start: number;
|
|
30
|
+
/** End byte position (inclusive) */
|
|
28
31
|
end: number;
|
|
29
32
|
} | {
|
|
30
33
|
/**
|
|
@@ -36,7 +39,8 @@ type HttpRange = {
|
|
|
36
39
|
* Range: bytes=1024-
|
|
37
40
|
* ```
|
|
38
41
|
*/
|
|
39
|
-
type: "offset";
|
|
42
|
+
type: "offset";
|
|
43
|
+
/** Start byte position (inclusive) */
|
|
40
44
|
offset: number;
|
|
41
45
|
} | {
|
|
42
46
|
/**
|
|
@@ -48,40 +52,48 @@ type HttpRange = {
|
|
|
48
52
|
* Range: bytes=-1024
|
|
49
53
|
* ```
|
|
50
54
|
*/
|
|
51
|
-
type: "suffix";
|
|
55
|
+
type: "suffix";
|
|
56
|
+
/** End byte position (inclusive) */
|
|
52
57
|
suffix: number;
|
|
53
58
|
};
|
|
54
59
|
/** HTTP method passed to object store */
|
|
55
|
-
type HttpMethod = "GET" | "HEAD";
|
|
60
|
+
export type HttpMethod = "GET" | "HEAD";
|
|
56
61
|
/** HTTP response from object store */
|
|
57
|
-
type ObjectStoreResponse = {
|
|
62
|
+
export type ObjectStoreResponse = {
|
|
58
63
|
/**
|
|
59
64
|
* Will be translated to 500 Internal Server Error by the handler
|
|
60
65
|
* or 408 Request Timeout if the request was aborted
|
|
61
66
|
*/
|
|
62
67
|
type: "InternalError";
|
|
63
68
|
} | {
|
|
64
|
-
/** Will be translated to 404 Not Found by the handler */
|
|
69
|
+
/** Will be translated to 404 Not Found by the handler */
|
|
70
|
+
type: "NotFound";
|
|
65
71
|
} | {
|
|
66
|
-
/** Will be translated to 416 Range Not Satisfiable by the handler */
|
|
72
|
+
/** Will be translated to 416 Range Not Satisfiable by the handler */
|
|
73
|
+
type: "RangeNotSatisfiable";
|
|
74
|
+
/** Total file size in bytes */
|
|
67
75
|
size: number;
|
|
68
76
|
} | {
|
|
69
|
-
/** Will be translated to 200 OK or 206 Partial Content by the handler */
|
|
70
|
-
|
|
71
|
-
|
|
77
|
+
/** Will be translated to 200 OK or 206 Partial Content by the handler */
|
|
78
|
+
type: "Ok";
|
|
79
|
+
/** Total file size in bytes */
|
|
80
|
+
size: number;
|
|
81
|
+
/** File range translated from HTTP range */
|
|
82
|
+
range: FileRange;
|
|
83
|
+
/** Stream of file content, undefined for HEAD requests */
|
|
72
84
|
data?: Readable;
|
|
73
85
|
};
|
|
74
86
|
/** Common options for object store creation */
|
|
75
|
-
interface ObjectStoreOptions {
|
|
87
|
+
export interface ObjectStoreOptions {
|
|
76
88
|
/** Logger instance, no logging is performed when not provided */
|
|
77
89
|
logger?: Logger;
|
|
78
90
|
}
|
|
79
91
|
/** Options for file system object store creation */
|
|
80
|
-
interface FsStoreOptions extends ObjectStoreOptions {
|
|
92
|
+
export interface FsStoreOptions extends ObjectStoreOptions {
|
|
81
93
|
/** Local directory to serve files from */
|
|
82
94
|
rootDir: string;
|
|
83
95
|
}
|
|
84
|
-
interface ObjectStore {
|
|
96
|
+
export interface ObjectStore {
|
|
85
97
|
/**
|
|
86
98
|
* Proxy HTTP(S) request for parquet file to object store.
|
|
87
99
|
* Callback promise resolves when stream is closed by handler @see HttpHelpers.createRequestHandler
|
|
@@ -95,7 +107,7 @@ interface ObjectStore {
|
|
|
95
107
|
}): void;
|
|
96
108
|
}
|
|
97
109
|
/** File system abstraction for request handler factory, @see HttpHelpers.createRequestHandler */
|
|
98
|
-
declare abstract class BaseObjectStore implements ObjectStore {
|
|
110
|
+
export declare abstract class BaseObjectStore implements ObjectStore {
|
|
99
111
|
protected readonly logger: Logger;
|
|
100
112
|
constructor(options: ObjectStoreOptions);
|
|
101
113
|
/** Translate HTTP range to file range, @returns null if the range is not satisfiable */
|
|
@@ -113,41 +125,57 @@ declare abstract class BaseObjectStore implements ObjectStore {
|
|
|
113
125
|
}): Promise<void>;
|
|
114
126
|
}
|
|
115
127
|
/** Configuration for {@link HttpHelpers.createCachingObjectStore} */
|
|
116
|
-
type CacheConfig = {
|
|
117
|
-
/** Filesystem path where the cache persists its data */
|
|
128
|
+
export type CacheConfig = {
|
|
129
|
+
/** Filesystem path where the cache persists its data */
|
|
130
|
+
cachePath: string;
|
|
131
|
+
/** Hard total size budget in bytes; the cache self-stabilizes near this size */
|
|
118
132
|
maxSizeBytes: number;
|
|
119
133
|
/**
|
|
120
134
|
* Max share of the budget a single file may occupy (0..1); when a file exceeds it, that
|
|
121
135
|
* file's oldest ranges are evicted first. Stops one large scan from flushing the working set.
|
|
122
136
|
*/
|
|
123
|
-
admissionFraction: number;
|
|
137
|
+
admissionFraction: number;
|
|
138
|
+
/** Upper bound on previously-evicted (ghost) files remembered to guide readmission; resident files are already byte-bounded */
|
|
124
139
|
maxFilesTracked: number;
|
|
125
140
|
};
|
|
126
141
|
/**
|
|
127
142
|
* Cumulative cache event counters. Surfaced both as lifetime totals (persisted across restarts)
|
|
128
143
|
* and as a per-process session view, @see CacheMetrics.
|
|
129
144
|
*/
|
|
130
|
-
type CacheCounters = {
|
|
131
|
-
/** Requests fully served from cache */
|
|
132
|
-
|
|
145
|
+
export type CacheCounters = {
|
|
146
|
+
/** Requests fully served from cache */
|
|
147
|
+
hits: number;
|
|
148
|
+
/** Requests that fell through to upstream */
|
|
149
|
+
misses: number;
|
|
150
|
+
/** Bytes served from cache */
|
|
133
151
|
bytesServed: number;
|
|
134
152
|
/**
|
|
135
153
|
* Bytes requested by clients that were not cached; compare with {@link bytesFetched} for read-ahead
|
|
136
154
|
* amplification.
|
|
137
155
|
*/
|
|
138
|
-
bytesMissed: number;
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
156
|
+
bytesMissed: number;
|
|
157
|
+
/** Bytes downloaded from upstream on misses, including read-ahead and read-behind */
|
|
158
|
+
bytesFetched: number;
|
|
159
|
+
/** Bytes evicted to keep the cache within its total size budget, @see CacheConfig.maxSizeBytes */
|
|
160
|
+
bytesEvictedByBudget: number;
|
|
161
|
+
/** Bytes evicted because a single file exceeded its allowed share of the budget, @see CacheConfig.admissionFraction */
|
|
162
|
+
bytesEvictedByFileCap: number;
|
|
163
|
+
/** Files promoted on observed reuse, so they are retained longer than first-time entries */
|
|
164
|
+
promotions: number;
|
|
165
|
+
/** Previously evicted files that were re-requested and readmitted */
|
|
143
166
|
ghostReadmissions: number;
|
|
144
167
|
};
|
|
145
168
|
/** Snapshot of cache state and counters, @see CachingObjectStore.getMetrics */
|
|
146
|
-
type CacheMetrics = {
|
|
147
|
-
/** Current resident bytes */
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
169
|
+
export type CacheMetrics = {
|
|
170
|
+
/** Current resident bytes */
|
|
171
|
+
sizeBytes: number;
|
|
172
|
+
/** Number of files with resident (cached) bytes */
|
|
173
|
+
residentFiles: number;
|
|
174
|
+
/** Number of previously-evicted (ghost) files remembered, <= @see CacheConfig.maxFilesTracked */
|
|
175
|
+
ghostFiles: number;
|
|
176
|
+
/** Counters cumulative across all sessions (persisted) */
|
|
177
|
+
lifetime: CacheCounters;
|
|
178
|
+
/** The same counters scoped to the current process */
|
|
151
179
|
session: CacheCounters;
|
|
152
180
|
};
|
|
153
181
|
/**
|
|
@@ -155,7 +183,7 @@ type CacheMetrics = {
|
|
|
155
183
|
* Standalone (not extending {@link ObjectStoreOptions}): a caching store is a decorator over
|
|
156
184
|
* `upstream`, so source-store options do not apply to it.
|
|
157
185
|
*/
|
|
158
|
-
interface CachingObjectStoreOptions {
|
|
186
|
+
export interface CachingObjectStoreOptions {
|
|
159
187
|
/** Upstream store consulted on cache misses */
|
|
160
188
|
upstream: ObjectStore;
|
|
161
189
|
/** Cache configuration */
|
|
@@ -169,16 +197,16 @@ interface CachingObjectStoreOptions {
|
|
|
169
197
|
* {@link RequestHandlerOptions.store}, read {@link CachingObjectStore.getMetrics}, and dispose it
|
|
170
198
|
* to release the cache, @see HttpHelpers.createCachingObjectStore.
|
|
171
199
|
*/
|
|
172
|
-
interface CachingObjectStore extends ObjectStore, AsyncDisposable {
|
|
200
|
+
export interface CachingObjectStore extends ObjectStore, AsyncDisposable {
|
|
173
201
|
/** Instantaneous cache state plus lifetime/session counters */
|
|
174
202
|
getMetrics(): CacheMetrics;
|
|
175
203
|
/** Drop all cached data and zero the counters (test/benchmark use) */
|
|
176
204
|
reset(): Promise<void>;
|
|
177
205
|
}
|
|
178
206
|
/** Object store base URL in format accepted by Apache DataFusion and DuckDB */
|
|
179
|
-
type ObjectStoreUrl = Branded<string, "PFrameInternal.ObjectStoreUrl">;
|
|
207
|
+
export type ObjectStoreUrl = Branded<string, "PFrameInternal.ObjectStoreUrl">;
|
|
180
208
|
/** HTTP(S) request handler creation options */
|
|
181
|
-
type RequestHandlerOptions = {
|
|
209
|
+
export type RequestHandlerOptions = {
|
|
182
210
|
/**
|
|
183
211
|
* Object store to serve files from. Compose caching by wrapping the upstream store with
|
|
184
212
|
* {@link HttpHelpers.createCachingObjectStore} and passing the result here,
|
|
@@ -187,10 +215,14 @@ type RequestHandlerOptions = {
|
|
|
187
215
|
store: ObjectStore;
|
|
188
216
|
};
|
|
189
217
|
/** Server configuration options */
|
|
190
|
-
type HttpServerOptions = {
|
|
191
|
-
/** HTTP(S) request handler function, @see HttpHelpers.createRequestHandler */
|
|
192
|
-
|
|
193
|
-
|
|
218
|
+
export type HttpServerOptions = {
|
|
219
|
+
/** HTTP(S) request handler function, @see HttpHelpers.createRequestHandler */
|
|
220
|
+
handler: RequestListener;
|
|
221
|
+
/** Port to bind to, @default 0 for auto-assignment */
|
|
222
|
+
port?: number;
|
|
223
|
+
/** Do not apply authorization middleware to @param handler */
|
|
224
|
+
noAuth?: true;
|
|
225
|
+
/** Downgrade default HTTPS server to plain HTTP, @warning use only for testing */
|
|
194
226
|
noHttps?: true;
|
|
195
227
|
};
|
|
196
228
|
/**
|
|
@@ -201,7 +233,7 @@ type HttpServerOptions = {
|
|
|
201
233
|
* request.setHeader('Authorization', `Bearer ${authToken}`);
|
|
202
234
|
* ```
|
|
203
235
|
*/
|
|
204
|
-
type HttpAuthorizationToken = Branded<string, "PFrameInternal.HttpAuthorizationToken">;
|
|
236
|
+
export type HttpAuthorizationToken = Branded<string, "PFrameInternal.HttpAuthorizationToken">;
|
|
205
237
|
/**
|
|
206
238
|
* TLS certificate in PEM format
|
|
207
239
|
*
|
|
@@ -214,15 +246,18 @@ type HttpAuthorizationToken = Branded<string, "PFrameInternal.HttpAuthorizationT
|
|
|
214
246
|
* -----END CERTIFICATE-----
|
|
215
247
|
* ```
|
|
216
248
|
*/
|
|
217
|
-
type PemCertificate = Branded<string, "PFrameInternal.PemCertificate">;
|
|
249
|
+
export type PemCertificate = Branded<string, "PFrameInternal.PemCertificate">;
|
|
218
250
|
/** HTTP(S) server connection settings, {@link HttpHelpers.createHttpServer} */
|
|
219
|
-
type HttpServerInfo = {
|
|
220
|
-
/** URL of the HTTP(S) server formatted as `http{s}://<host>:<port>/` */
|
|
221
|
-
|
|
251
|
+
export type HttpServerInfo = {
|
|
252
|
+
/** URL of the HTTP(S) server formatted as `http{s}://<host>:<port>/` */
|
|
253
|
+
url: ObjectStoreUrl;
|
|
254
|
+
/** Authorization token for Bearer scheme, undefined when @see HttpServerOptions.noAuth flag is set */
|
|
255
|
+
authToken?: HttpAuthorizationToken;
|
|
256
|
+
/** Encoded CA certificate of HTTPS server, undefined when @see HttpServerOptions.noHttps flag is set */
|
|
222
257
|
encodedCaCert?: Base64Encoded<PemCertificate>;
|
|
223
258
|
};
|
|
224
259
|
/** HTTP(S) server information and controls, @see HttpHelpers.createHttpServer */
|
|
225
|
-
interface HttpServer {
|
|
260
|
+
export interface HttpServer {
|
|
226
261
|
/** Server configuration information for initiating connections from clients */
|
|
227
262
|
get info(): HttpServerInfo;
|
|
228
263
|
/** Promise that resolves when the server is stopped */
|
|
@@ -231,7 +266,7 @@ interface HttpServer {
|
|
|
231
266
|
stop(): Promise<void>;
|
|
232
267
|
}
|
|
233
268
|
/** List of HTTP(S) related helper functions exposed by PFrame module */
|
|
234
|
-
interface HttpHelpers {
|
|
269
|
+
export interface HttpHelpers {
|
|
235
270
|
/**
|
|
236
271
|
* Create an object store for serving files from a local directory.
|
|
237
272
|
* Rejects if the provided path does not exist or is not a directory.
|
|
@@ -275,5 +310,4 @@ interface HttpHelpers {
|
|
|
275
310
|
createHttpServer(options: HttpServerOptions): Promise<HttpServer>;
|
|
276
311
|
}
|
|
277
312
|
//#endregion
|
|
278
|
-
export { BaseObjectStore, CacheConfig, CacheCounters, CacheMetrics, CachingObjectStore, CachingObjectStoreOptions, FileRange, FsStoreOptions, HttpAuthorizationToken, HttpHelpers, HttpMethod, HttpRange, HttpServer, HttpServerInfo, HttpServerOptions, ObjectStore, ObjectStoreOptions, ObjectStoreResponse, ObjectStoreUrl, ParquetExtension, ParquetFileName, PemCertificate, RequestHandlerOptions };
|
|
279
313
|
//# sourceMappingURL=http_helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http_helpers.d.ts","names":[],"sources":["../../../src/pframe/internal_api/http_helpers.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"http_helpers.d.ts","names":[],"sources":["../../../src/pframe/internal_api/http_helpers.ts"],"mappings":";;;;;;qBAMa;;YAGD,kBAAkB;YAElB;;EAEV;;EAEA;;;YAIU;;;;;;;;;;EAWN;;EAEA;;EAEA;;;;;;;;;;;EAYA;;EAEA;;;;;;;;;;;EAYA;;EAEA;;;YAIM;;YAGA;;;;;EAMN;;;EAIA;;;EAIA;;EAEA;;;EAIA;;EAEA;;EAEA,OAAO;;EAEP,OAAO;;;iBAII;;EAEf,SAAS;;;iBAIM,uBAAuB;;EAEtC;;iBAGe;;;;;;EAMf,QACE,UAAU,iBACV;IACE,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,WAAW,UAAU,wBAAwB;;;;8BAM7B,2BAA2B;qBAC5B,QAAQ;EAE3B,YAAY,SAAS;;YAKX,UAAU,kBAAkB,QAAQ,YAAY;;;;;;WAoBjD,QACP,UAAU,iBACV;IACE,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,WAAW,UAAU,wBAAwB;MAE9C;;;YAIO;;EAEV;;EAEA;;;;;EAKA;;EAEA;;;;;;YAOU;;EAEV;;EAEA;;EAEA;;;;;EAKA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;YAIU;;EAEV;;EAEA;;EAEA;;EAEA,UAAU;;EAEV,SAAS;;;;;;;iBAQM;;EAEf,UAAU;;EAEV,QAAQ;;EAER,SAAS;;;;;;;;iBASM,2BAA2B,aAAa;;EAEvD,cAAc;;EAEd,SAAS;;;YAIC,iBAAiB;;YAGjB;;;;;;EAMV,OAAO;;;YAIG;;EAEV,SAAS;;EAET;;EAEA;;EAEA;;;;;;;;;;YAWU,yBAAyB;;;;;;;;;;;;;YAczB,iBAAiB;;YAGjB;;EAEV,KAAK;;EAEL,YAAY;;EAEZ,gBAAgB,cAAc;;;iBAIf;;MAEX,QAAQ;;MAER,WAAW;;EAEf,QAAQ;;;iBAIO;;;;;EAKf,cAAc,SAAS,iBAAiB,QAAQ;;;;;;EAOhD,yBAAyB,SAAS,4BAA4B,QAAQ;;;;;;EAOtE,qBAAqB,SAAS,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;EAyBtD,iBAAiB,SAAS,oBAAoB,QAAQ"}
|
|
@@ -9,8 +9,6 @@ import { DiscoverColumnsConstraints, DiscoverColumnsMappingVariant, DiscoverColu
|
|
|
9
9
|
import { FindColumnResponseQualifications, FindColumnsMappingVariant, FindColumnsRequest, FindColumnsResponse, FindColumnsResponseHit } from "./find_columns.js";
|
|
10
10
|
import { PFrameFactoryV9, PFrameOptionsV2, PFrameV18 } from "./pframe.js";
|
|
11
11
|
import { SingleAxisSelector as SingleAxisSelector$1 } from "@milaboratories/pl-model-common";
|
|
12
|
-
|
|
13
|
-
//#region src/pframe/internal_api/index.d.ts
|
|
14
12
|
declare namespace index_d_exports {
|
|
15
13
|
export { AddColumnEntryV2, ArtificialColumnJoinEntry, AxisQualification, BaseObjectStore, CacheConfig, CacheCounters, CacheMetrics, CachingObjectStore, CachingObjectStoreOptions, ColumnAxesWithQualifications, ColumnJoinEntry, ConstantAxisFilter, CreateTableRequestV4, DataInfo, DataInfoExtension, DataInfoV2, DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse, DiscoverColumnsConstraints, DiscoverColumnsMappingVariant, DiscoverColumnsRequestV2, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, DiscoverColumnsStepInfo, FilePath, FileRange, FindColumnResponseQualifications, FindColumnsMappingVariant, FindColumnsRequest, FindColumnsResponse, FindColumnsResponseHit, FsStoreOptions, FullJoinV4, HttpAuthorizationToken, HttpHelpers, HttpMethod, HttpRange, HttpServer, HttpServerInfo, HttpServerOptions, InlineColumnJoinEntry, InnerJoinV4, JoinEntryV4, Logger, MatcherMap, MultiAxisSelector, MultiColumnSelector, ObjectStore, ObjectStoreOptions, ObjectStoreResponse, ObjectStoreUrl, OuterJoinV4, PColumnValueTypeSpec, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV6, PFrameFactoryV9, PFrameId, PFrameOptionsV2, PFrameReadAPIV15, PFrameV18, PTableId, PTableV12, ParquetExtension, ParquetFileName, PemCertificate, RequestHandlerOptions, SingleAxisSelector$1 as SingleAxisSelector, SlicedColumnJoinEntry, SpecExtension, StringMatcher, UniqueValuesRequestV2 };
|
|
16
14
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Logger, PFrameId } from "./common.js";
|
|
2
2
|
import { PFrameReadAPIV15 } from "./api_read.js";
|
|
3
3
|
import { PFrameFactoryAPIV6 } from "./api_factory.js";
|
|
4
|
-
|
|
5
4
|
//#region src/pframe/internal_api/pframe.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* Full PFrame surface — factory operations plus data-side reads. Exposes
|
|
@@ -9,10 +8,13 @@ import { PFrameFactoryAPIV6 } from "./api_factory.js";
|
|
|
9
8
|
* `data`) plus {@link PFrameReadAPIV15}, whose tables' `export` takes an
|
|
10
9
|
* `ops.headers` list of `[column index, header name]` pairs.
|
|
11
10
|
*/
|
|
12
|
-
interface PFrameV18 extends PFrameFactoryAPIV6, PFrameReadAPIV15 {}
|
|
13
|
-
type PFrameOptionsV2 = {
|
|
14
|
-
/** PFrame ID for logging purposes */
|
|
15
|
-
|
|
11
|
+
export interface PFrameV18 extends PFrameFactoryAPIV6, PFrameReadAPIV15 {}
|
|
12
|
+
export type PFrameOptionsV2 = {
|
|
13
|
+
/** PFrame ID for logging purposes */
|
|
14
|
+
frameId: PFrameId;
|
|
15
|
+
/** Path to directory where PFrame can create temporary files */
|
|
16
|
+
spillPath: string;
|
|
17
|
+
/** Logger instance, no logging is performed when not provided */
|
|
16
18
|
logger?: Logger;
|
|
17
19
|
};
|
|
18
20
|
/**
|
|
@@ -20,7 +22,7 @@ type PFrameOptionsV2 = {
|
|
|
20
22
|
* {@link PFrameV18} instances (self-contained column data info), whose tables'
|
|
21
23
|
* `export` takes an `ops.headers` list of `[column index, header name]` pairs.
|
|
22
24
|
*/
|
|
23
|
-
interface PFrameFactoryV9 {
|
|
25
|
+
export interface PFrameFactoryV9 {
|
|
24
26
|
/**
|
|
25
27
|
* Create a new PFrame instance.
|
|
26
28
|
* @warning Use concurrency limiting to avoid OOM crashes when multiple instances are simultaneously in use.
|
|
@@ -36,5 +38,4 @@ interface PFrameFactoryV9 {
|
|
|
36
38
|
pprofDump: () => Promise<Uint8Array>;
|
|
37
39
|
}
|
|
38
40
|
//#endregion
|
|
39
|
-
export { PFrameFactoryV9, PFrameOptionsV2, PFrameV18 };
|
|
40
41
|
//# sourceMappingURL=pframe.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pframe.d.ts","names":[],"sources":["../../../src/pframe/internal_api/pframe.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"pframe.d.ts","names":[],"sources":["../../../src/pframe/internal_api/pframe.ts"],"mappings":";;;;;;;;;;iBAWiB,kBAAkB,oBAAoB;YAE3C;;EAEV,SAAS;;EAET;;EAEA,SAAS;;;;;;;iBAQM;;;;;EAKf,aAAa,SAAS,kBAAkB;;;;;;;;EASxC,iBAAiB,QAAQ"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PTableShape, PTableVector, TableRange } from "@milaboratories/pl-model-common";
|
|
2
|
-
|
|
3
2
|
//#region src/pframe/internal_api/table.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Table view returned by `createTable`.
|
|
@@ -18,7 +17,7 @@ import { PTableShape, PTableVector, TableRange } from "@milaboratories/pl-model-
|
|
|
18
17
|
* The table's column spec is owned by the caller — selector → index
|
|
19
18
|
* resolution runs on the caller side via WASM-spec.
|
|
20
19
|
*/
|
|
21
|
-
interface PTableV12 extends Disposable {
|
|
20
|
+
export interface PTableV12 extends Disposable {
|
|
22
21
|
/**
|
|
23
22
|
* Get PTable disk footprint in bytes.
|
|
24
23
|
*
|
|
@@ -77,5 +76,4 @@ interface PTableV12 extends Disposable {
|
|
|
77
76
|
dispose(): void;
|
|
78
77
|
}
|
|
79
78
|
//#endregion
|
|
80
|
-
export { PTableV12 };
|
|
81
79
|
//# sourceMappingURL=table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","names":[],"sources":["../../../src/pframe/internal_api/table.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"table.d.ts","names":[],"sources":["../../../src/pframe/internal_api/table.ts"],"mappings":";;;;;;;;;;;;;;;;;;;iBAmBiB,kBAAkB;;;;;;;;;;;EAWjC,aAAa;IAAQ;IAA4B,SAAS;MAAgB;;;;;EAM1E,SAAS;IAAQ,SAAS;MAAgB,QAAQ;;;;;;;;;;EAWlD,QACE,yBACA;IACE,QAAQ;IACR,SAAS;MAEV,QAAQ;;;;;;;;;;;;;;;;;EAkBX,OACE,cACA;IACE;IACA,SAAS;MAEV;;EAGH"}
|
package/dist/project.d.ts
CHANGED
package/dist/project.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.d.ts","names":[],"sources":["../src/project.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"project.d.ts","names":[],"sources":["../src/project.ts"],"mappings":";iBAAiB;;WAEN"}
|
package/dist/project_list.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ProjectMeta } from "./project.js";
|
|
2
2
|
import { ProjectId } from "@milaboratories/pl-model-common";
|
|
3
|
-
|
|
4
3
|
//#region src/project_list.d.ts
|
|
5
4
|
/** Represents single entry in the list of projects owned by current user */
|
|
6
|
-
interface ProjectListEntry {
|
|
5
|
+
export interface ProjectListEntry {
|
|
7
6
|
/** Unique project identifier in middle layer. Use to operate with given project. */
|
|
8
7
|
id: ProjectId;
|
|
9
8
|
/** Creation timestamp. */
|
|
@@ -16,5 +15,4 @@ interface ProjectListEntry {
|
|
|
16
15
|
meta: ProjectMeta;
|
|
17
16
|
}
|
|
18
17
|
//#endregion
|
|
19
|
-
export { ProjectListEntry };
|
|
20
18
|
//# sourceMappingURL=project_list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project_list.d.ts","names":[],"sources":["../src/project_list.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"project_list.d.ts","names":[],"sources":["../src/project_list.ts"],"mappings":";;;;iBAIiB;;EAEf,IAAI;;EAEJ,SAAS;;EAET,cAAc;;EAEd;;EAEA,MAAM"}
|