@milaboratories/pl-model-middle-layer 1.11.3 → 1.11.5
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/author_marker.d.ts +1 -1
- package/dist/block_meta/block_components.cjs +4 -4
- package/dist/block_meta/block_components.cjs.map +1 -1
- package/dist/block_meta/block_components.d.ts +1 -1
- package/dist/block_meta/block_components.js +4 -4
- package/dist/block_meta/block_components.js.map +1 -1
- package/dist/block_meta/block_description.cjs +6 -3
- package/dist/block_meta/block_description.cjs.map +1 -1
- package/dist/block_meta/block_description.d.ts +4 -4
- package/dist/block_meta/block_description.d.ts.map +1 -1
- package/dist/block_meta/block_description.js +6 -3
- package/dist/block_meta/block_description.js.map +1 -1
- package/dist/block_meta/block_id.cjs.map +1 -1
- package/dist/block_meta/block_id.d.ts +1 -1
- package/dist/block_meta/block_id.js.map +1 -1
- package/dist/block_meta/block_manifest.cjs +6 -4
- package/dist/block_meta/block_manifest.cjs.map +1 -1
- package/dist/block_meta/block_manifest.d.ts +2 -2
- package/dist/block_meta/block_manifest.d.ts.map +1 -1
- package/dist/block_meta/block_manifest.js +6 -4
- package/dist/block_meta/block_manifest.js.map +1 -1
- package/dist/block_meta/block_meta.cjs +10 -8
- package/dist/block_meta/block_meta.cjs.map +1 -1
- package/dist/block_meta/block_meta.d.ts +1 -1
- package/dist/block_meta/block_meta.d.ts.map +1 -1
- package/dist/block_meta/block_meta.js +10 -8
- package/dist/block_meta/block_meta.js.map +1 -1
- package/dist/block_meta/common.d.ts +2 -2
- package/dist/block_meta/content_conversion.cjs +6 -6
- package/dist/block_meta/content_conversion.cjs.map +1 -1
- package/dist/block_meta/content_conversion.d.ts +1 -1
- package/dist/block_meta/content_conversion.js +6 -6
- package/dist/block_meta/content_conversion.js.map +1 -1
- package/dist/block_meta/content_types.cjs +35 -35
- package/dist/block_meta/content_types.cjs.map +1 -1
- package/dist/block_meta/content_types.d.ts +1 -1
- package/dist/block_meta/content_types.js +35 -35
- package/dist/block_meta/content_types.js.map +1 -1
- package/dist/block_meta/index.d.ts +9 -9
- package/dist/block_meta/semver.cjs +1 -1
- package/dist/block_meta/semver.cjs.map +1 -1
- package/dist/block_meta/semver.d.ts +1 -1
- package/dist/block_meta/semver.js +1 -1
- package/dist/block_meta/semver.js.map +1 -1
- package/dist/block_registry/block_pack_spec.cjs +5 -5
- package/dist/block_registry/block_pack_spec.cjs.map +1 -1
- package/dist/block_registry/block_pack_spec.d.ts +1 -1
- package/dist/block_registry/block_pack_spec.js +5 -5
- package/dist/block_registry/block_pack_spec.js.map +1 -1
- package/dist/block_registry/index.d.ts +3 -3
- package/dist/block_registry/overview.cjs +18 -10
- package/dist/block_registry/overview.cjs.map +1 -1
- package/dist/block_registry/overview.d.ts +1 -1
- package/dist/block_registry/overview.d.ts.map +1 -1
- package/dist/block_registry/overview.js +18 -10
- package/dist/block_registry/overview.js.map +1 -1
- package/dist/block_registry/registry_spec.cjs +4 -4
- package/dist/block_registry/registry_spec.cjs.map +1 -1
- package/dist/block_registry/registry_spec.d.ts +1 -1
- package/dist/block_registry/registry_spec.js +4 -4
- package/dist/block_registry/registry_spec.js.map +1 -1
- package/dist/block_settings.cjs.map +1 -1
- package/dist/block_settings.d.ts +1 -1
- package/dist/block_settings.js.map +1 -1
- package/dist/block_state.d.ts +4 -4
- package/dist/block_state.d.ts.map +1 -1
- package/dist/index.d.ts +11 -11
- package/dist/json.cjs +4 -4
- package/dist/json.cjs.map +1 -1
- package/dist/json.d.ts +1 -1
- package/dist/json.d.ts.map +1 -1
- package/dist/json.js +4 -4
- package/dist/json.js.map +1 -1
- package/dist/pframe/index.d.ts +1 -1
- package/dist/pframe/internal_api/api_factory.cjs +2 -2
- package/dist/pframe/internal_api/api_factory.cjs.map +1 -1
- package/dist/pframe/internal_api/api_factory.d.ts +3 -3
- package/dist/pframe/internal_api/api_factory.js +2 -2
- package/dist/pframe/internal_api/api_factory.js.map +1 -1
- package/dist/pframe/internal_api/api_read.d.ts +6 -6
- package/dist/pframe/internal_api/api_read.d.ts.map +1 -1
- package/dist/pframe/internal_api/api_wasm.d.ts +4 -4
- package/dist/pframe/internal_api/api_wasm.d.ts.map +1 -1
- package/dist/pframe/internal_api/common.d.ts +3 -3
- package/dist/pframe/internal_api/common.d.ts.map +1 -1
- package/dist/pframe/internal_api/create_table.d.ts +9 -9
- package/dist/pframe/internal_api/create_table.d.ts.map +1 -1
- package/dist/pframe/internal_api/delete_column.d.ts +1 -1
- package/dist/pframe/internal_api/find_columns.d.ts +2 -2
- package/dist/pframe/internal_api/http_helpers.cjs +4 -4
- package/dist/pframe/internal_api/http_helpers.cjs.map +1 -1
- package/dist/pframe/internal_api/http_helpers.d.ts +43 -43
- package/dist/pframe/internal_api/http_helpers.d.ts.map +1 -1
- package/dist/pframe/internal_api/http_helpers.js +4 -4
- package/dist/pframe/internal_api/http_helpers.js.map +1 -1
- package/dist/pframe/internal_api/index.d.ts +11 -11
- package/dist/pframe/internal_api/pframe.d.ts +4 -4
- package/dist/pframe/internal_api/table.d.ts +2 -2
- package/dist/pframe/internal_api/table.d.ts.map +1 -1
- package/dist/project_list.d.ts +1 -1
- package/dist/project_overview.d.ts +7 -7
- package/dist/project_overview.d.ts.map +1 -1
- package/dist/update_info.d.ts +2 -2
- package/package.json +18 -17
- package/src/author_marker.ts +1 -1
- package/src/block_meta/block_components.ts +7 -7
- package/src/block_meta/block_description.ts +17 -14
- package/src/block_meta/block_id.ts +3 -3
- package/src/block_meta/block_manifest.ts +16 -14
- package/src/block_meta/block_meta.ts +17 -21
- package/src/block_meta/common.ts +2 -2
- package/src/block_meta/content_conversion.ts +7 -7
- package/src/block_meta/content_types.ts +35 -35
- package/src/block_meta/index.ts +9 -9
- package/src/block_meta/semver.ts +2 -2
- package/src/block_registry/block_pack_spec.ts +7 -7
- package/src/block_registry/index.ts +3 -3
- package/src/block_registry/overview.ts +34 -26
- package/src/block_registry/registry_spec.ts +5 -5
- package/src/block_settings.ts +1 -1
- package/src/block_state.ts +10 -4
- package/src/index.ts +11 -11
- package/src/json.ts +17 -11
- package/src/pframe/index.ts +1 -1
- package/src/pframe/internal_api/api_factory.ts +6 -6
- package/src/pframe/internal_api/api_read.ts +20 -14
- package/src/pframe/internal_api/api_wasm.ts +9 -20
- package/src/pframe/internal_api/common.ts +5 -7
- package/src/pframe/internal_api/create_table.ts +14 -9
- package/src/pframe/internal_api/delete_column.ts +1 -1
- package/src/pframe/internal_api/find_columns.ts +2 -2
- package/src/pframe/internal_api/http_helpers.ts +52 -52
- package/src/pframe/internal_api/index.ts +11 -11
- package/src/pframe/internal_api/pframe.ts +5 -5
- package/src/pframe/internal_api/table.ts +4 -8
- package/src/project_list.ts +1 -1
- package/src/project_overview.ts +14 -7
- package/src/update_info.ts +2 -2
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { Readable } from
|
|
2
|
-
import type { RequestListener } from
|
|
3
|
-
import type { Branded, Base64Encoded } from
|
|
4
|
-
import type { Logger } from
|
|
1
|
+
import type { Readable } from "node:stream";
|
|
2
|
+
import type { RequestListener } from "node:http";
|
|
3
|
+
import type { Branded, Base64Encoded } from "@milaboratories/pl-model-common";
|
|
4
|
+
import type { Logger } from "./common";
|
|
5
5
|
|
|
6
6
|
/** Parquet file extension */
|
|
7
|
-
export const ParquetExtension =
|
|
7
|
+
export const ParquetExtension = ".parquet" as const;
|
|
8
8
|
|
|
9
9
|
/** Parquet file name */
|
|
10
|
-
export type ParquetFileName = Branded<`${string}.parquet`,
|
|
10
|
+
export type ParquetFileName = Branded<`${string}.parquet`, "PFrameInternal.ParquetFileName">;
|
|
11
11
|
|
|
12
12
|
export type FileRange = {
|
|
13
13
|
/** Start byte position (inclusive) */
|
|
@@ -19,7 +19,7 @@ export type FileRange = {
|
|
|
19
19
|
/** HTTP range as of RFC 9110 <https://datatracker.ietf.org/doc/html/rfc9110#name-range> */
|
|
20
20
|
export type HttpRange =
|
|
21
21
|
| {
|
|
22
|
-
|
|
22
|
+
/**
|
|
23
23
|
* Get file content in the specified byte range
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
@@ -28,14 +28,14 @@ export type HttpRange =
|
|
|
28
28
|
* Range: bytes=0-1023
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
type: "bounded";
|
|
32
|
+
/** Start byte position (inclusive) */
|
|
33
|
+
start: number;
|
|
34
|
+
/** End byte position (inclusive) */
|
|
35
|
+
end: number;
|
|
36
|
+
}
|
|
37
37
|
| {
|
|
38
|
-
|
|
38
|
+
/**
|
|
39
39
|
* Get byte range starting from the specified offset
|
|
40
40
|
*
|
|
41
41
|
* @example
|
|
@@ -44,12 +44,12 @@ export type HttpRange =
|
|
|
44
44
|
* Range: bytes=1024-
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
type: "offset";
|
|
48
|
+
/** Start byte position (inclusive) */
|
|
49
|
+
offset: number;
|
|
50
|
+
}
|
|
51
51
|
| {
|
|
52
|
-
|
|
52
|
+
/**
|
|
53
53
|
* Get byte range starting from the specified suffix
|
|
54
54
|
*
|
|
55
55
|
* @example
|
|
@@ -58,43 +58,43 @@ export type HttpRange =
|
|
|
58
58
|
* Range: bytes=-1024
|
|
59
59
|
* ```
|
|
60
60
|
*/
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
type: "suffix";
|
|
62
|
+
/** End byte position (inclusive) */
|
|
63
|
+
suffix: number;
|
|
64
|
+
};
|
|
65
65
|
|
|
66
66
|
/** HTTP method passed to object store */
|
|
67
|
-
export type HttpMethod =
|
|
67
|
+
export type HttpMethod = "GET" | "HEAD";
|
|
68
68
|
|
|
69
69
|
/** HTTP response from object store */
|
|
70
70
|
export type ObjectStoreResponse =
|
|
71
71
|
| {
|
|
72
|
-
|
|
72
|
+
/**
|
|
73
73
|
* Will be translated to 500 Internal Server Error by the handler
|
|
74
74
|
* or 408 Request Timeout if the request was aborted
|
|
75
75
|
*/
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
type: "InternalError";
|
|
77
|
+
}
|
|
78
78
|
| {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
/** Will be translated to 404 Not Found by the handler */
|
|
80
|
+
type: "NotFound";
|
|
81
|
+
}
|
|
82
82
|
| {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
/** Will be translated to 416 Range Not Satisfiable by the handler */
|
|
84
|
+
type: "RangeNotSatisfiable";
|
|
85
|
+
/** Total file size in bytes */
|
|
86
|
+
size: number;
|
|
87
|
+
}
|
|
88
88
|
| {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
89
|
+
/** Will be translated to 200 OK or 206 Partial Content by the handler */
|
|
90
|
+
type: "Ok";
|
|
91
|
+
/** Total file size in bytes */
|
|
92
|
+
size: number;
|
|
93
|
+
/** File range translated from HTTP range */
|
|
94
|
+
range: FileRange;
|
|
95
|
+
/** Stream of file content, undefined for HEAD requests */
|
|
96
|
+
data?: Readable;
|
|
97
|
+
};
|
|
98
98
|
|
|
99
99
|
/** Common options for object store creation */
|
|
100
100
|
export interface ObjectStoreOptions {
|
|
@@ -121,7 +121,7 @@ export interface ObjectStore {
|
|
|
121
121
|
range?: HttpRange;
|
|
122
122
|
signal: AbortSignal;
|
|
123
123
|
callback: (response: ObjectStoreResponse) => Promise<void>;
|
|
124
|
-
}
|
|
124
|
+
},
|
|
125
125
|
): void;
|
|
126
126
|
}
|
|
127
127
|
|
|
@@ -137,13 +137,13 @@ export abstract class BaseObjectStore implements ObjectStore {
|
|
|
137
137
|
protected translate(fileSize: number, range?: HttpRange): FileRange | null {
|
|
138
138
|
if (!range) return { start: 0, end: fileSize - 1 };
|
|
139
139
|
switch (range.type) {
|
|
140
|
-
case
|
|
140
|
+
case "bounded":
|
|
141
141
|
if (range.end >= fileSize) return null;
|
|
142
142
|
return { start: range.start, end: range.end };
|
|
143
|
-
case
|
|
143
|
+
case "offset":
|
|
144
144
|
if (range.offset >= fileSize) return null;
|
|
145
145
|
return { start: range.offset, end: fileSize - 1 };
|
|
146
|
-
case
|
|
146
|
+
case "suffix":
|
|
147
147
|
if (range.suffix > fileSize) return null;
|
|
148
148
|
return { start: fileSize - range.suffix, end: fileSize - 1 };
|
|
149
149
|
}
|
|
@@ -161,12 +161,12 @@ export abstract class BaseObjectStore implements ObjectStore {
|
|
|
161
161
|
range?: HttpRange;
|
|
162
162
|
signal: AbortSignal;
|
|
163
163
|
callback: (response: ObjectStoreResponse) => Promise<void>;
|
|
164
|
-
}
|
|
164
|
+
},
|
|
165
165
|
): Promise<void>;
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
/** Object store base URL in format accepted by Apache DataFusion and DuckDB */
|
|
169
|
-
export type ObjectStoreUrl = Branded<string,
|
|
169
|
+
export type ObjectStoreUrl = Branded<string, "PFrameInternal.ObjectStoreUrl">;
|
|
170
170
|
|
|
171
171
|
/** HTTP(S) request handler creation options */
|
|
172
172
|
export type RequestHandlerOptions = {
|
|
@@ -195,7 +195,7 @@ export type HttpServerOptions = {
|
|
|
195
195
|
* request.setHeader('Authorization', `Bearer ${authToken}`);
|
|
196
196
|
* ```
|
|
197
197
|
*/
|
|
198
|
-
export type HttpAuthorizationToken = Branded<string,
|
|
198
|
+
export type HttpAuthorizationToken = Branded<string, "PFrameInternal.HttpAuthorizationToken">;
|
|
199
199
|
|
|
200
200
|
/**
|
|
201
201
|
* TLS certificate in PEM format
|
|
@@ -209,7 +209,7 @@ export type HttpAuthorizationToken = Branded<string, 'PFrameInternal.HttpAuthori
|
|
|
209
209
|
* -----END CERTIFICATE-----
|
|
210
210
|
* ```
|
|
211
211
|
*/
|
|
212
|
-
export type PemCertificate = Branded<string,
|
|
212
|
+
export type PemCertificate = Branded<string, "PFrameInternal.PemCertificate">;
|
|
213
213
|
|
|
214
214
|
/** HTTP(S) server connection settings, {@link HttpHelpers.createHttpServer} */
|
|
215
215
|
export type HttpServerInfo = {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
1
|
+
export * from "./api_read";
|
|
2
|
+
export * from "./api_factory";
|
|
3
|
+
export * from "./api_wasm";
|
|
4
|
+
export * from "./common";
|
|
5
|
+
export * from "./create_table";
|
|
6
|
+
export * from "./delete_column";
|
|
7
|
+
export * from "./find_columns";
|
|
8
|
+
export * from "./table";
|
|
9
9
|
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
10
|
+
export * from "./pframe";
|
|
11
|
+
export * from "./http_helpers";
|
|
12
12
|
|
|
13
|
-
export type { SingleAxisSelector } from
|
|
13
|
+
export type { SingleAxisSelector } from "@milaboratories/pl-model-common";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { PFrameFactoryAPIV4 } from
|
|
2
|
-
import type { PFrameReadAPIV11 } from
|
|
3
|
-
import type { Logger } from
|
|
4
|
-
import type { PFrameId } from
|
|
1
|
+
import type { PFrameFactoryAPIV4 } from "./api_factory";
|
|
2
|
+
import type { PFrameReadAPIV11 } from "./api_read";
|
|
3
|
+
import type { Logger } from "./common";
|
|
4
|
+
import type { PFrameId } from "./common";
|
|
5
5
|
|
|
6
6
|
export interface PFrameV13 extends PFrameFactoryAPIV4, PFrameReadAPIV11 {}
|
|
7
7
|
|
|
@@ -30,4 +30,4 @@ export interface PFrameFactoryV4 {
|
|
|
30
30
|
* @warning This method will always reject on Windows!
|
|
31
31
|
*/
|
|
32
32
|
pprofDump: () => Promise<Uint8Array>;
|
|
33
|
-
}
|
|
33
|
+
}
|
|
@@ -6,8 +6,8 @@ import type {
|
|
|
6
6
|
PTableSorting,
|
|
7
7
|
PTableVector,
|
|
8
8
|
TableRange,
|
|
9
|
-
} from
|
|
10
|
-
import type { PTableId } from
|
|
9
|
+
} from "@milaboratories/pl-model-common";
|
|
10
|
+
import type { PTableId } from "./common";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Table view returned as a result of create table operation.
|
|
@@ -34,17 +34,13 @@ export interface PTableV8 extends Disposable {
|
|
|
34
34
|
* Get PTable disk footprint in bytes
|
|
35
35
|
* Warning: This call materializes the join.
|
|
36
36
|
*/
|
|
37
|
-
getFootprint(ops?: {
|
|
38
|
-
signal?: AbortSignal;
|
|
39
|
-
}): Promise<number>;
|
|
37
|
+
getFootprint(ops?: { signal?: AbortSignal }): Promise<number>;
|
|
40
38
|
|
|
41
39
|
/**
|
|
42
40
|
* Unified table shape
|
|
43
41
|
* Warning: This call materializes the join.
|
|
44
42
|
*/
|
|
45
|
-
getShape(ops?: {
|
|
46
|
-
signal?: AbortSignal;
|
|
47
|
-
}): Promise<PTableShape>;
|
|
43
|
+
getShape(ops?: { signal?: AbortSignal }): Promise<PTableShape>;
|
|
48
44
|
|
|
49
45
|
/**
|
|
50
46
|
* Retrieve the data from the table. To retrieve only data required, it can be
|
package/src/project_list.ts
CHANGED
package/src/project_overview.ts
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
import type { ProjectMeta } from
|
|
2
|
-
import type { BlockPackSpec } from
|
|
3
|
-
import type {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import type { ProjectMeta } from "./project";
|
|
2
|
+
import type { BlockPackSpec } from "./block_registry/block_pack_spec";
|
|
3
|
+
import type {
|
|
4
|
+
BlockCodeFeatureFlags,
|
|
5
|
+
BlockRenderingMode,
|
|
6
|
+
BlockSection,
|
|
7
|
+
NavigationState,
|
|
8
|
+
AuthorMarker,
|
|
9
|
+
StringifiedJson,
|
|
10
|
+
} from "@milaboratories/pl-model-common";
|
|
11
|
+
import type { StorageDebugView } from "@platforma-sdk/model";
|
|
12
|
+
import type { UpdateSuggestions } from "./update_info";
|
|
13
|
+
import type { BlockSettings } from "./block_settings";
|
|
7
14
|
|
|
8
15
|
/** Generalized block status, to be used in block item "styling". */
|
|
9
|
-
export type BlockCalculationStatus =
|
|
16
|
+
export type BlockCalculationStatus = "NotCalculated" | "Running" | "Done" | "Limbo";
|
|
10
17
|
|
|
11
18
|
/** Overview of the whole project state, required to render a left panel. */
|
|
12
19
|
export type ProjectOverview = {
|
package/src/update_info.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { BlockPackSpec } from
|
|
1
|
+
import type { BlockPackSpec } from "./block_registry";
|
|
2
2
|
|
|
3
3
|
/** Communicates possible block update option */
|
|
4
4
|
export type UpdateSuggestion<V = BlockPackSpec> = {
|
|
5
|
-
type:
|
|
5
|
+
type: "major" | "minor" | "patch";
|
|
6
6
|
update: V;
|
|
7
7
|
};
|
|
8
8
|
|