@milaboratories/pl-model-middle-layer 1.29.1 → 1.30.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/dist/block_meta/block_description.d.ts +16 -16
- package/dist/block_registry/block_pack_spec.d.ts +8 -8
- package/dist/block_registry/overview.d.ts +176 -176
- package/dist/pframe/internal_api/api_factory.cjs.map +1 -1
- package/dist/pframe/internal_api/api_factory.d.ts +57 -3
- package/dist/pframe/internal_api/api_factory.d.ts.map +1 -1
- package/dist/pframe/internal_api/api_factory.js.map +1 -1
- package/dist/pframe/internal_api/index.d.ts +3 -3
- package/dist/pframe/internal_api/pframe.d.ts +27 -2
- package/dist/pframe/internal_api/pframe.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/pframe/internal_api/api_factory.ts +70 -2
- package/src/pframe/internal_api/pframe.ts +29 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api_factory.cjs","names":[],"sources":["../../../src/pframe/internal_api/api_factory.ts"],"sourcesContent":["import type {\n AxisValueType,\n BinaryPartitionedDataInfo,\n Branded,\n ColumnValueType,\n JsonDataInfo,\n JsonPartitionedDataInfo,\n ParquetChunk,\n ParquetPartitionedDataInfo,\n PObjectId,\n} from \"@milaboratories/pl-model-common\";\nimport type { HttpServerInfo } from \"./http_helpers\";\n\n/** PColumn spec file extension */\nexport const SpecExtension = \".spec\" as const;\n\n/** PColumn data info file extension */\nexport const DataInfoExtension = \".datainfo\" as const;\n\n/** Abstract identifier of a data blob that can be requested from the storage backend */\nexport type PFrameBlobId = Branded<string, \"PFrameInternal.PFrameBlobId\">;\n\n/** Path of the file containing requested data (blob). This path is returned by\n * {@link BlobPathResolver} as soon as blob materialized in the file system. */\nexport type FilePath = string;\n\n/** Data source allows PFrame to retrieve the data blobs for columns with assigned data info. */\nexport interface PFrameDataSourceV2 {\n /**\n * PFrame may notify storage backend about its plans to use particular blobs in the future.\n * Storage backend will do its best to preload specified blob so the subsequent\n * {@link resolveBlob} will quickly return preloaded file path.\n */\n preloadBlob(blobIds: PFrameBlobId[]): Promise<void>;\n\n /** Returns raw blob data given the blob id from {@link DataInfo}. */\n resolveBlobContent(blobId: PFrameBlobId): Promise<Uint8Array>;\n\n /**\n * Parquet HTTP(S) server connection settings, {@link HttpHelpers.createHttpServer}\n * When not provided, parquet BlobIds would be treated as local file paths.\n */\n parquetServer?: HttpServerInfo;\n}\n\n/**\n * Union type representing all possible data storage formats for PColumn data.\n * The specific format used depends on data size, access patterns, and performance requirements.\n *\n * @template Blob - Type parameter representing the storage reference type (could be ResourceInfo, PFrameBlobId, etc.)\n */\nexport type DataInfo<Blob> =\n | JsonDataInfo\n | JsonPartitionedDataInfo<Blob>\n | BinaryPartitionedDataInfo<Blob>\n | ParquetPartitionedDataInfo<ParquetChunk<Blob>>;\n\n/**\n * Structural type information needed by the data side: axis value\n * types and column value types, in their canonical order. Mirrors\n * the bridge-side `TypeSpec`.\n */\nexport interface
|
|
1
|
+
{"version":3,"file":"api_factory.cjs","names":[],"sources":["../../../src/pframe/internal_api/api_factory.ts"],"sourcesContent":["import type {\n AxisValueType,\n BinaryPartitionedDataInfo,\n Branded,\n ColumnValueType,\n JsonDataInfo,\n JsonPartitionedDataInfo,\n ParquetChunk,\n ParquetPartitionedDataInfo,\n PObjectId,\n} from \"@milaboratories/pl-model-common\";\nimport type { HttpServerInfo } from \"./http_helpers\";\n\n/** PColumn spec file extension */\nexport const SpecExtension = \".spec\" as const;\n\n/** PColumn data info file extension */\nexport const DataInfoExtension = \".datainfo\" as const;\n\n/** Abstract identifier of a data blob that can be requested from the storage backend */\nexport type PFrameBlobId = Branded<string, \"PFrameInternal.PFrameBlobId\">;\n\n/** Path of the file containing requested data (blob). This path is returned by\n * {@link BlobPathResolver} as soon as blob materialized in the file system. */\nexport type FilePath = string;\n\n/** Data source allows PFrame to retrieve the data blobs for columns with assigned data info. */\nexport interface PFrameDataSourceV2 {\n /**\n * PFrame may notify storage backend about its plans to use particular blobs in the future.\n * Storage backend will do its best to preload specified blob so the subsequent\n * {@link resolveBlob} will quickly return preloaded file path.\n */\n preloadBlob(blobIds: PFrameBlobId[]): Promise<void>;\n\n /** Returns raw blob data given the blob id from {@link DataInfo}. */\n resolveBlobContent(blobId: PFrameBlobId): Promise<Uint8Array>;\n\n /**\n * Parquet HTTP(S) server connection settings, {@link HttpHelpers.createHttpServer}\n * When not provided, parquet BlobIds would be treated as local file paths.\n */\n parquetServer?: HttpServerInfo;\n}\n\n/**\n * Structural type information for a single PColumn needed by the data side:\n * the axis value types (in canonical order) and the column value type. Mirrors\n * the on-disk `typeSpec` shape (`{ axes, column }`).\n */\nexport type PColumnValueTypeSpec = {\n readonly axes: AxisValueType[];\n readonly column: ColumnValueType;\n};\n\n/**\n * Union type representing all possible data storage formats for PColumn data.\n * The specific format used depends on data size, access patterns, and performance requirements.\n *\n * @template Blob - Type parameter representing the storage reference type (could be ResourceInfo, PFrameBlobId, etc.)\n */\nexport type DataInfo<Blob> =\n | JsonDataInfo\n | JsonPartitionedDataInfo<Blob>\n | BinaryPartitionedDataInfo<Blob>\n | ParquetPartitionedDataInfo<ParquetChunk<Blob>>;\n\n/**\n * Self-contained data info: a PColumn data storage format with an embedded\n * {@link PColumnValueTypeSpec}, so the data layer can interpret the values\n * without a separate spec. This is the on-disk `.datainfo` shape and the\n * payload accepted by {@link PFrameFactoryAPIV6.addColumns}.\n *\n * Declared independently of {@link DataInfo} (not as an intersection) so the\n * legacy v1 type can be removed without affecting this one.\n *\n * @template Blob - Type parameter representing the storage reference type (could be ResourceInfo, PFrameBlobId, etc.)\n */\nexport type DataInfoV2<Blob> = (\n | JsonDataInfo\n | JsonPartitionedDataInfo<Blob>\n | BinaryPartitionedDataInfo<Blob>\n | ParquetPartitionedDataInfo<ParquetChunk<Blob>>\n) & {\n readonly typeSpec: PColumnValueTypeSpec;\n};\n\n/**\n * Structural type information needed by the data side: axis value\n * types and column value types, in their canonical order. Mirrors\n * the bridge-side `TypeSpec`.\n */\nexport interface ValueTypeSpec {\n readonly axes: AxisValueType[];\n readonly columns: ColumnValueType[];\n}\n\n/** Single column entry for {@link PFrameFactoryAPIV5.addColumns}. */\nexport interface AddColumnEntry {\n /** Unique column identifier within the PFrame. */\n readonly id: PObjectId;\n /** Structural type info (axes / column value types). */\n readonly typeSpec: ValueTypeSpec;\n /** Data info for the column. */\n readonly data: DataInfo<PFrameBlobId>;\n}\n\n/**\n * Single column entry for {@link PFrameFactoryAPIV6.addColumns}. The structural\n * type info is carried inside {@link DataInfoV2.typeSpec} rather than as a\n * separate field, so `data` is self-describing.\n */\nexport interface AddColumnEntryV2 {\n /** Unique column identifier within the PFrame. */\n readonly id: PObjectId;\n /** Self-contained data info (carries its own `typeSpec`). */\n readonly data: DataInfoV2<PFrameBlobId>;\n}\n\n/** API for populating a PFrame with columns and a data source. */\nexport interface PFrameFactoryAPIV5 extends Disposable {\n /** Associates data source with this PFrame. */\n setDataSource(dataSource: PFrameDataSourceV2): void;\n\n /**\n * Registers all PColumns at once: specs are recorded and data info\n * is attached atomically. For parquet data info, schema resolution\n * via network is performed during this call.\n */\n addColumns(\n columns: AddColumnEntry[],\n options?: {\n signal?: AbortSignal;\n },\n ): Promise<void>;\n\n /** Releases all the data previously added to PFrame using methods above,\n * any interactions with disposed PFrame will result in exception */\n dispose(): void;\n}\n\n/**\n * API for populating a PFrame with columns and a data source. Unlike\n * {@link PFrameFactoryAPIV5}, each column's structural type info is embedded in\n * its self-contained {@link AddColumnEntryV2.data} instead of a separate field.\n */\nexport interface PFrameFactoryAPIV6 extends Disposable {\n /** Associates data source with this PFrame. */\n setDataSource(dataSource: PFrameDataSourceV2): void;\n\n /**\n * Registers all PColumns at once: data info (self-contained, carrying its own\n * `typeSpec`) is attached atomically. For parquet data info, schema resolution\n * via network is performed during this call.\n */\n addColumns(\n columns: AddColumnEntryV2[],\n options?: {\n signal?: AbortSignal;\n },\n ): Promise<void>;\n\n /** Releases all the data previously added to PFrame using methods above,\n * any interactions with disposed PFrame will result in exception */\n dispose(): void;\n}\n"],"mappings":";;AAcA,MAAa,gBAAgB;;AAG7B,MAAa,oBAAoB"}
|
|
@@ -27,6 +27,15 @@ interface PFrameDataSourceV2 {
|
|
|
27
27
|
*/
|
|
28
28
|
parquetServer?: HttpServerInfo;
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Structural type information for a single PColumn needed by the data side:
|
|
32
|
+
* the axis value types (in canonical order) and the column value type. Mirrors
|
|
33
|
+
* the on-disk `typeSpec` shape (`{ axes, column }`).
|
|
34
|
+
*/
|
|
35
|
+
type PColumnValueTypeSpec = {
|
|
36
|
+
readonly axes: AxisValueType[];
|
|
37
|
+
readonly column: ColumnValueType;
|
|
38
|
+
};
|
|
30
39
|
/**
|
|
31
40
|
* Union type representing all possible data storage formats for PColumn data.
|
|
32
41
|
* The specific format used depends on data size, access patterns, and performance requirements.
|
|
@@ -34,12 +43,26 @@ interface PFrameDataSourceV2 {
|
|
|
34
43
|
* @template Blob - Type parameter representing the storage reference type (could be ResourceInfo, PFrameBlobId, etc.)
|
|
35
44
|
*/
|
|
36
45
|
type DataInfo<Blob> = JsonDataInfo | JsonPartitionedDataInfo<Blob> | BinaryPartitionedDataInfo<Blob> | ParquetPartitionedDataInfo<ParquetChunk<Blob>>;
|
|
46
|
+
/**
|
|
47
|
+
* Self-contained data info: a PColumn data storage format with an embedded
|
|
48
|
+
* {@link PColumnValueTypeSpec}, so the data layer can interpret the values
|
|
49
|
+
* without a separate spec. This is the on-disk `.datainfo` shape and the
|
|
50
|
+
* payload accepted by {@link PFrameFactoryAPIV6.addColumns}.
|
|
51
|
+
*
|
|
52
|
+
* Declared independently of {@link DataInfo} (not as an intersection) so the
|
|
53
|
+
* legacy v1 type can be removed without affecting this one.
|
|
54
|
+
*
|
|
55
|
+
* @template Blob - Type parameter representing the storage reference type (could be ResourceInfo, PFrameBlobId, etc.)
|
|
56
|
+
*/
|
|
57
|
+
type DataInfoV2<Blob> = (JsonDataInfo | JsonPartitionedDataInfo<Blob> | BinaryPartitionedDataInfo<Blob> | ParquetPartitionedDataInfo<ParquetChunk<Blob>>) & {
|
|
58
|
+
readonly typeSpec: PColumnValueTypeSpec;
|
|
59
|
+
};
|
|
37
60
|
/**
|
|
38
61
|
* Structural type information needed by the data side: axis value
|
|
39
62
|
* types and column value types, in their canonical order. Mirrors
|
|
40
63
|
* the bridge-side `TypeSpec`.
|
|
41
64
|
*/
|
|
42
|
-
interface
|
|
65
|
+
interface ValueTypeSpec {
|
|
43
66
|
readonly axes: AxisValueType[];
|
|
44
67
|
readonly columns: ColumnValueType[];
|
|
45
68
|
}
|
|
@@ -48,10 +71,21 @@ interface AddColumnEntry {
|
|
|
48
71
|
/** Unique column identifier within the PFrame. */
|
|
49
72
|
readonly id: PObjectId;
|
|
50
73
|
/** Structural type info (axes / column value types). */
|
|
51
|
-
readonly typeSpec:
|
|
74
|
+
readonly typeSpec: ValueTypeSpec;
|
|
52
75
|
/** Data info for the column. */
|
|
53
76
|
readonly data: DataInfo<PFrameBlobId>;
|
|
54
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Single column entry for {@link PFrameFactoryAPIV6.addColumns}. The structural
|
|
80
|
+
* type info is carried inside {@link DataInfoV2.typeSpec} rather than as a
|
|
81
|
+
* separate field, so `data` is self-describing.
|
|
82
|
+
*/
|
|
83
|
+
interface AddColumnEntryV2 {
|
|
84
|
+
/** Unique column identifier within the PFrame. */
|
|
85
|
+
readonly id: PObjectId;
|
|
86
|
+
/** Self-contained data info (carries its own `typeSpec`). */
|
|
87
|
+
readonly data: DataInfoV2<PFrameBlobId>;
|
|
88
|
+
}
|
|
55
89
|
/** API for populating a PFrame with columns and a data source. */
|
|
56
90
|
interface PFrameFactoryAPIV5 extends Disposable {
|
|
57
91
|
/** Associates data source with this PFrame. */
|
|
@@ -68,6 +102,26 @@ interface PFrameFactoryAPIV5 extends Disposable {
|
|
|
68
102
|
* any interactions with disposed PFrame will result in exception */
|
|
69
103
|
dispose(): void;
|
|
70
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* API for populating a PFrame with columns and a data source. Unlike
|
|
107
|
+
* {@link PFrameFactoryAPIV5}, each column's structural type info is embedded in
|
|
108
|
+
* its self-contained {@link AddColumnEntryV2.data} instead of a separate field.
|
|
109
|
+
*/
|
|
110
|
+
interface PFrameFactoryAPIV6 extends Disposable {
|
|
111
|
+
/** Associates data source with this PFrame. */
|
|
112
|
+
setDataSource(dataSource: PFrameDataSourceV2): void;
|
|
113
|
+
/**
|
|
114
|
+
* Registers all PColumns at once: data info (self-contained, carrying its own
|
|
115
|
+
* `typeSpec`) is attached atomically. For parquet data info, schema resolution
|
|
116
|
+
* via network is performed during this call.
|
|
117
|
+
*/
|
|
118
|
+
addColumns(columns: AddColumnEntryV2[], options?: {
|
|
119
|
+
signal?: AbortSignal;
|
|
120
|
+
}): Promise<void>;
|
|
121
|
+
/** Releases all the data previously added to PFrame using methods above,
|
|
122
|
+
* any interactions with disposed PFrame will result in exception */
|
|
123
|
+
dispose(): void;
|
|
124
|
+
}
|
|
71
125
|
//#endregion
|
|
72
|
-
export { AddColumnEntry, DataInfo, DataInfoExtension, FilePath, PColumnValueTypeSpec, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV5, SpecExtension };
|
|
126
|
+
export { AddColumnEntry, AddColumnEntryV2, DataInfo, DataInfoExtension, DataInfoV2, FilePath, PColumnValueTypeSpec, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV5, PFrameFactoryAPIV6, SpecExtension, ValueTypeSpec };
|
|
73
127
|
//# sourceMappingURL=api_factory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api_factory.d.ts","names":[],"sources":["../../../src/pframe/internal_api/api_factory.ts"],"mappings":";;;;;cAca,aAAA;AAAb;AAAA,cAGa,iBAAA;;KAGD,YAAA,GAAe,OAAA;;AAH3B;KAOY,QAAA;;UAGK,kBAAA;EAVoC;AAGrD;;;;EAaE,WAAA,CAAY,OAAA,EAAS,YAAA,KAAiB,OAAA;EAT5B;EAYV,kBAAA,CAAmB,MAAA,EAAQ,YAAA,GAAe,OAAA,CAAQ,UAAA;;;;AATpD;EAeE,aAAA,GAAgB,cAAA;AAAA;;;;;;;
|
|
1
|
+
{"version":3,"file":"api_factory.d.ts","names":[],"sources":["../../../src/pframe/internal_api/api_factory.ts"],"mappings":";;;;;cAca,aAAA;AAAb;AAAA,cAGa,iBAAA;;KAGD,YAAA,GAAe,OAAA;;AAH3B;KAOY,QAAA;;UAGK,kBAAA;EAVoC;AAGrD;;;;EAaE,WAAA,CAAY,OAAA,EAAS,YAAA,KAAiB,OAAA;EAT5B;EAYV,kBAAA,CAAmB,MAAA,EAAQ,YAAA,GAAe,OAAA,CAAQ,UAAA;;;;AATpD;EAeE,aAAA,GAAgB,cAAA;AAAA;;;;;;KAQN,oBAAA;EAAA,SACD,IAAA,EAAM,aAAA;EAAA,SACN,MAAA,EAAQ,eAAA;AAAA;;;;;;;KASP,QAAA,SACR,YAAA,GACA,uBAAA,CAAwB,IAAA,IACxB,yBAAA,CAA0B,IAAA,IAC1B,0BAAA,CAA2B,YAAA,CAAa,IAAA;;;;;;AAf5C;;;;;;KA4BY,UAAA,UACR,YAAA,GACA,uBAAA,CAAwB,IAAA,IACxB,yBAAA,CAA0B,IAAA,IAC1B,0BAAA,CAA2B,YAAA,CAAa,IAAA;EAAA,SAEjC,QAAA,EAAU,oBAAA;AAAA;;AAvBrB;;;;UA+BiB,aAAA;EAAA,SACN,IAAA,EAAM,aAAA;EAAA,SACN,OAAA,EAAS,eAAA;AAAA;;UAIH,cAAA;EAjCb;EAAA,SAmCO,EAAA,EAAI,SAAA;EAnCe;EAAA,SAqCnB,QAAA,EAAU,aAAA;EAxCjB;EAAA,SA0CO,IAAA,EAAM,QAAA,CAAS,YAAA;AAAA;;;;;;UAQT,gBAAA;EA/C+B;EAAA,SAiDrC,EAAA,EAAI,SAAA;EApCO;EAAA,SAsCX,IAAA,EAAM,UAAA,CAAW,YAAA;AAAA;;UAIX,kBAAA,SAA2B,UAAA;EAvCd;EAyC5B,aAAA,CAAc,UAAA,EAAY,kBAAA;EAxCgB;;;;;EA+C1C,UAAA,CACE,OAAA,EAAS,cAAA,IACT,OAAA;IACE,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA;EAtDD;;EA0DF,OAAA;AAAA;;;;;;UAQe,kBAAA,SAA2B,UAAA;EA9DH;EAgEvC,aAAA,CAAc,UAAA,EAAY,kBAAA;EAxDE;;;;;EA+D5B,UAAA,CACE,OAAA,EAAS,gBAAA,IACT,OAAA;IACE,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA;EAlE8B;AAInC;EAkEE,OAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api_factory.js","names":[],"sources":["../../../src/pframe/internal_api/api_factory.ts"],"sourcesContent":["import type {\n AxisValueType,\n BinaryPartitionedDataInfo,\n Branded,\n ColumnValueType,\n JsonDataInfo,\n JsonPartitionedDataInfo,\n ParquetChunk,\n ParquetPartitionedDataInfo,\n PObjectId,\n} from \"@milaboratories/pl-model-common\";\nimport type { HttpServerInfo } from \"./http_helpers\";\n\n/** PColumn spec file extension */\nexport const SpecExtension = \".spec\" as const;\n\n/** PColumn data info file extension */\nexport const DataInfoExtension = \".datainfo\" as const;\n\n/** Abstract identifier of a data blob that can be requested from the storage backend */\nexport type PFrameBlobId = Branded<string, \"PFrameInternal.PFrameBlobId\">;\n\n/** Path of the file containing requested data (blob). This path is returned by\n * {@link BlobPathResolver} as soon as blob materialized in the file system. */\nexport type FilePath = string;\n\n/** Data source allows PFrame to retrieve the data blobs for columns with assigned data info. */\nexport interface PFrameDataSourceV2 {\n /**\n * PFrame may notify storage backend about its plans to use particular blobs in the future.\n * Storage backend will do its best to preload specified blob so the subsequent\n * {@link resolveBlob} will quickly return preloaded file path.\n */\n preloadBlob(blobIds: PFrameBlobId[]): Promise<void>;\n\n /** Returns raw blob data given the blob id from {@link DataInfo}. */\n resolveBlobContent(blobId: PFrameBlobId): Promise<Uint8Array>;\n\n /**\n * Parquet HTTP(S) server connection settings, {@link HttpHelpers.createHttpServer}\n * When not provided, parquet BlobIds would be treated as local file paths.\n */\n parquetServer?: HttpServerInfo;\n}\n\n/**\n * Union type representing all possible data storage formats for PColumn data.\n * The specific format used depends on data size, access patterns, and performance requirements.\n *\n * @template Blob - Type parameter representing the storage reference type (could be ResourceInfo, PFrameBlobId, etc.)\n */\nexport type DataInfo<Blob> =\n | JsonDataInfo\n | JsonPartitionedDataInfo<Blob>\n | BinaryPartitionedDataInfo<Blob>\n | ParquetPartitionedDataInfo<ParquetChunk<Blob>>;\n\n/**\n * Structural type information needed by the data side: axis value\n * types and column value types, in their canonical order. Mirrors\n * the bridge-side `TypeSpec`.\n */\nexport interface
|
|
1
|
+
{"version":3,"file":"api_factory.js","names":[],"sources":["../../../src/pframe/internal_api/api_factory.ts"],"sourcesContent":["import type {\n AxisValueType,\n BinaryPartitionedDataInfo,\n Branded,\n ColumnValueType,\n JsonDataInfo,\n JsonPartitionedDataInfo,\n ParquetChunk,\n ParquetPartitionedDataInfo,\n PObjectId,\n} from \"@milaboratories/pl-model-common\";\nimport type { HttpServerInfo } from \"./http_helpers\";\n\n/** PColumn spec file extension */\nexport const SpecExtension = \".spec\" as const;\n\n/** PColumn data info file extension */\nexport const DataInfoExtension = \".datainfo\" as const;\n\n/** Abstract identifier of a data blob that can be requested from the storage backend */\nexport type PFrameBlobId = Branded<string, \"PFrameInternal.PFrameBlobId\">;\n\n/** Path of the file containing requested data (blob). This path is returned by\n * {@link BlobPathResolver} as soon as blob materialized in the file system. */\nexport type FilePath = string;\n\n/** Data source allows PFrame to retrieve the data blobs for columns with assigned data info. */\nexport interface PFrameDataSourceV2 {\n /**\n * PFrame may notify storage backend about its plans to use particular blobs in the future.\n * Storage backend will do its best to preload specified blob so the subsequent\n * {@link resolveBlob} will quickly return preloaded file path.\n */\n preloadBlob(blobIds: PFrameBlobId[]): Promise<void>;\n\n /** Returns raw blob data given the blob id from {@link DataInfo}. */\n resolveBlobContent(blobId: PFrameBlobId): Promise<Uint8Array>;\n\n /**\n * Parquet HTTP(S) server connection settings, {@link HttpHelpers.createHttpServer}\n * When not provided, parquet BlobIds would be treated as local file paths.\n */\n parquetServer?: HttpServerInfo;\n}\n\n/**\n * Structural type information for a single PColumn needed by the data side:\n * the axis value types (in canonical order) and the column value type. Mirrors\n * the on-disk `typeSpec` shape (`{ axes, column }`).\n */\nexport type PColumnValueTypeSpec = {\n readonly axes: AxisValueType[];\n readonly column: ColumnValueType;\n};\n\n/**\n * Union type representing all possible data storage formats for PColumn data.\n * The specific format used depends on data size, access patterns, and performance requirements.\n *\n * @template Blob - Type parameter representing the storage reference type (could be ResourceInfo, PFrameBlobId, etc.)\n */\nexport type DataInfo<Blob> =\n | JsonDataInfo\n | JsonPartitionedDataInfo<Blob>\n | BinaryPartitionedDataInfo<Blob>\n | ParquetPartitionedDataInfo<ParquetChunk<Blob>>;\n\n/**\n * Self-contained data info: a PColumn data storage format with an embedded\n * {@link PColumnValueTypeSpec}, so the data layer can interpret the values\n * without a separate spec. This is the on-disk `.datainfo` shape and the\n * payload accepted by {@link PFrameFactoryAPIV6.addColumns}.\n *\n * Declared independently of {@link DataInfo} (not as an intersection) so the\n * legacy v1 type can be removed without affecting this one.\n *\n * @template Blob - Type parameter representing the storage reference type (could be ResourceInfo, PFrameBlobId, etc.)\n */\nexport type DataInfoV2<Blob> = (\n | JsonDataInfo\n | JsonPartitionedDataInfo<Blob>\n | BinaryPartitionedDataInfo<Blob>\n | ParquetPartitionedDataInfo<ParquetChunk<Blob>>\n) & {\n readonly typeSpec: PColumnValueTypeSpec;\n};\n\n/**\n * Structural type information needed by the data side: axis value\n * types and column value types, in their canonical order. Mirrors\n * the bridge-side `TypeSpec`.\n */\nexport interface ValueTypeSpec {\n readonly axes: AxisValueType[];\n readonly columns: ColumnValueType[];\n}\n\n/** Single column entry for {@link PFrameFactoryAPIV5.addColumns}. */\nexport interface AddColumnEntry {\n /** Unique column identifier within the PFrame. */\n readonly id: PObjectId;\n /** Structural type info (axes / column value types). */\n readonly typeSpec: ValueTypeSpec;\n /** Data info for the column. */\n readonly data: DataInfo<PFrameBlobId>;\n}\n\n/**\n * Single column entry for {@link PFrameFactoryAPIV6.addColumns}. The structural\n * type info is carried inside {@link DataInfoV2.typeSpec} rather than as a\n * separate field, so `data` is self-describing.\n */\nexport interface AddColumnEntryV2 {\n /** Unique column identifier within the PFrame. */\n readonly id: PObjectId;\n /** Self-contained data info (carries its own `typeSpec`). */\n readonly data: DataInfoV2<PFrameBlobId>;\n}\n\n/** API for populating a PFrame with columns and a data source. */\nexport interface PFrameFactoryAPIV5 extends Disposable {\n /** Associates data source with this PFrame. */\n setDataSource(dataSource: PFrameDataSourceV2): void;\n\n /**\n * Registers all PColumns at once: specs are recorded and data info\n * is attached atomically. For parquet data info, schema resolution\n * via network is performed during this call.\n */\n addColumns(\n columns: AddColumnEntry[],\n options?: {\n signal?: AbortSignal;\n },\n ): Promise<void>;\n\n /** Releases all the data previously added to PFrame using methods above,\n * any interactions with disposed PFrame will result in exception */\n dispose(): void;\n}\n\n/**\n * API for populating a PFrame with columns and a data source. Unlike\n * {@link PFrameFactoryAPIV5}, each column's structural type info is embedded in\n * its self-contained {@link AddColumnEntryV2.data} instead of a separate field.\n */\nexport interface PFrameFactoryAPIV6 extends Disposable {\n /** Associates data source with this PFrame. */\n setDataSource(dataSource: PFrameDataSourceV2): void;\n\n /**\n * Registers all PColumns at once: data info (self-contained, carrying its own\n * `typeSpec`) is attached atomically. For parquet data info, schema resolution\n * via network is performed during this call.\n */\n addColumns(\n columns: AddColumnEntryV2[],\n options?: {\n signal?: AbortSignal;\n },\n ): Promise<void>;\n\n /** Releases all the data previously added to PFrame using methods above,\n * any interactions with disposed PFrame will result in exception */\n dispose(): void;\n}\n"],"mappings":";;AAcA,MAAa,gBAAgB;;AAG7B,MAAa,oBAAoB"}
|
|
@@ -2,18 +2,18 @@ import { PTableV11 } from "./table.js";
|
|
|
2
2
|
import { AxisQualification, ColumnAxesWithQualifications, ConstantAxisFilter, Logger, PFrameId, PTableId } from "./common.js";
|
|
3
3
|
import { PFrameReadAPIV14, UniqueValuesRequestV2 } from "./api_read.js";
|
|
4
4
|
import { BaseObjectStore, FileRange, FsStoreOptions, HttpAuthorizationToken, HttpHelpers, HttpMethod, HttpRange, HttpServer, HttpServerInfo, HttpServerOptions, ObjectStore, ObjectStoreOptions, ObjectStoreResponse, ObjectStoreUrl, ParquetExtension, ParquetFileName, PemCertificate, RequestHandlerOptions } from "./http_helpers.js";
|
|
5
|
-
import { AddColumnEntry, DataInfo, DataInfoExtension, FilePath, PColumnValueTypeSpec, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV5, SpecExtension } from "./api_factory.js";
|
|
5
|
+
import { AddColumnEntry, AddColumnEntryV2, DataInfo, DataInfoExtension, DataInfoV2, FilePath, PColumnValueTypeSpec, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV5, PFrameFactoryAPIV6, SpecExtension, ValueTypeSpec } from "./api_factory.js";
|
|
6
6
|
import { DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse } from "./delete_column.js";
|
|
7
7
|
import { DiscoverColumnsConstraints, DiscoverColumnsMappingVariant, DiscoverColumnsRequestV2, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, DiscoverColumnsStepInfo, MatcherMap, MultiAxisSelector, MultiColumnSelector, StringMatcher } from "./discover_columns.js";
|
|
8
8
|
import { FindColumnResponseQualifications, FindColumnsMappingVariant, FindColumnsRequest, FindColumnsResponse, FindColumnsResponseHit } from "./find_columns.js";
|
|
9
9
|
import { EvaluateQueryResponse, LegacyQuery, PFrameWasmAPIV2, PFrameWasmAPIV3, PFrameWasmAPIV4, PFrameWasmV2, PFrameWasmV3 } from "./api_wasm.js";
|
|
10
10
|
import { ArtificialColumnJoinEntry, ColumnJoinEntry, CreateTableRequestV4, FullJoinV4, InlineColumnJoinEntry, InnerJoinV4, JoinEntryV4, OuterJoinV4, SlicedColumnJoinEntry } from "./create_table.js";
|
|
11
|
-
import { PFrameFactoryV7, PFrameOptionsV2, PFrameV16 } from "./pframe.js";
|
|
11
|
+
import { PFrameFactoryV7, PFrameFactoryV8, PFrameOptionsV2, PFrameV16, PFrameV17 } from "./pframe.js";
|
|
12
12
|
import { SingleAxisSelector as SingleAxisSelector$1 } from "@milaboratories/pl-model-common";
|
|
13
13
|
|
|
14
14
|
//#region src/pframe/internal_api/index.d.ts
|
|
15
15
|
declare namespace index_d_exports {
|
|
16
|
-
export { AddColumnEntry, ArtificialColumnJoinEntry, AxisQualification, BaseObjectStore, ColumnAxesWithQualifications, ColumnJoinEntry, ConstantAxisFilter, CreateTableRequestV4, DataInfo, DataInfoExtension, DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse, DiscoverColumnsConstraints, DiscoverColumnsMappingVariant, DiscoverColumnsRequestV2, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, DiscoverColumnsStepInfo, EvaluateQueryResponse, FilePath, FileRange, FindColumnResponseQualifications, FindColumnsMappingVariant, FindColumnsRequest, FindColumnsResponse, FindColumnsResponseHit, FsStoreOptions, FullJoinV4, HttpAuthorizationToken, HttpHelpers, HttpMethod, HttpRange, HttpServer, HttpServerInfo, HttpServerOptions, InlineColumnJoinEntry, InnerJoinV4, JoinEntryV4, LegacyQuery, Logger, MatcherMap, MultiAxisSelector, MultiColumnSelector, ObjectStore, ObjectStoreOptions, ObjectStoreResponse, ObjectStoreUrl, OuterJoinV4, PColumnValueTypeSpec, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV5, PFrameFactoryV7, PFrameId, PFrameOptionsV2, PFrameReadAPIV14, PFrameV16, PFrameWasmAPIV2, PFrameWasmAPIV3, PFrameWasmAPIV4, PFrameWasmV2, PFrameWasmV3, PTableId, PTableV11, ParquetExtension, ParquetFileName, PemCertificate, RequestHandlerOptions, SingleAxisSelector$1 as SingleAxisSelector, SlicedColumnJoinEntry, SpecExtension, StringMatcher, UniqueValuesRequestV2 };
|
|
16
|
+
export { AddColumnEntry, AddColumnEntryV2, ArtificialColumnJoinEntry, AxisQualification, BaseObjectStore, ColumnAxesWithQualifications, ColumnJoinEntry, ConstantAxisFilter, CreateTableRequestV4, DataInfo, DataInfoExtension, DataInfoV2, DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse, DiscoverColumnsConstraints, DiscoverColumnsMappingVariant, DiscoverColumnsRequestV2, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, DiscoverColumnsStepInfo, EvaluateQueryResponse, FilePath, FileRange, FindColumnResponseQualifications, FindColumnsMappingVariant, FindColumnsRequest, FindColumnsResponse, FindColumnsResponseHit, FsStoreOptions, FullJoinV4, HttpAuthorizationToken, HttpHelpers, HttpMethod, HttpRange, HttpServer, HttpServerInfo, HttpServerOptions, InlineColumnJoinEntry, InnerJoinV4, JoinEntryV4, LegacyQuery, Logger, MatcherMap, MultiAxisSelector, MultiColumnSelector, ObjectStore, ObjectStoreOptions, ObjectStoreResponse, ObjectStoreUrl, OuterJoinV4, PColumnValueTypeSpec, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV5, PFrameFactoryAPIV6, PFrameFactoryV7, PFrameFactoryV8, PFrameId, PFrameOptionsV2, PFrameReadAPIV14, PFrameV16, PFrameV17, PFrameWasmAPIV2, PFrameWasmAPIV3, PFrameWasmAPIV4, PFrameWasmV2, PFrameWasmV3, PTableId, PTableV11, ParquetExtension, ParquetFileName, PemCertificate, RequestHandlerOptions, SingleAxisSelector$1 as SingleAxisSelector, SlicedColumnJoinEntry, SpecExtension, StringMatcher, UniqueValuesRequestV2, ValueTypeSpec };
|
|
17
17
|
}
|
|
18
18
|
//#endregion
|
|
19
19
|
export { index_d_exports };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Logger, PFrameId } from "./common.js";
|
|
2
2
|
import { PFrameReadAPIV14 } from "./api_read.js";
|
|
3
|
-
import { PFrameFactoryAPIV5 } from "./api_factory.js";
|
|
3
|
+
import { PFrameFactoryAPIV5, PFrameFactoryAPIV6 } from "./api_factory.js";
|
|
4
4
|
|
|
5
5
|
//#region src/pframe/internal_api/pframe.d.ts
|
|
6
6
|
/**
|
|
@@ -9,6 +9,12 @@ import { PFrameFactoryAPIV5 } from "./api_factory.js";
|
|
|
9
9
|
* header map.
|
|
10
10
|
*/
|
|
11
11
|
interface PFrameV16 extends PFrameFactoryAPIV5, PFrameReadAPIV14 {}
|
|
12
|
+
/**
|
|
13
|
+
* Full PFrame surface — factory operations plus data-side reads. Like
|
|
14
|
+
* {@link PFrameV16} but with self-contained {@link PFrameFactoryAPIV6}
|
|
15
|
+
* (column `typeSpec` embedded in `data`).
|
|
16
|
+
*/
|
|
17
|
+
interface PFrameV17 extends PFrameFactoryAPIV6, PFrameReadAPIV14 {}
|
|
12
18
|
type PFrameOptionsV2 = {
|
|
13
19
|
/** PFrame ID for logging purposes */frameId: PFrameId; /** Path to directory where PFrame can create temporary files */
|
|
14
20
|
spillPath: string; /** Logger instance, no logging is performed when not provided */
|
|
@@ -34,6 +40,25 @@ interface PFrameFactoryV7 {
|
|
|
34
40
|
*/
|
|
35
41
|
pprofDump: () => Promise<Uint8Array>;
|
|
36
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* PFrame management functions exposed by the PFrame module. Creates
|
|
45
|
+
* {@link PFrameV17} instances (self-contained column data info).
|
|
46
|
+
*/
|
|
47
|
+
interface PFrameFactoryV8 {
|
|
48
|
+
/**
|
|
49
|
+
* Create a new PFrame instance.
|
|
50
|
+
* @warning Use concurrency limiting to avoid OOM crashes when multiple instances are simultaneously in use.
|
|
51
|
+
*/
|
|
52
|
+
createPFrame(options: PFrameOptionsV2): PFrameV17;
|
|
53
|
+
/**
|
|
54
|
+
* Dump active allocations from all PFrames instances in pprof format.
|
|
55
|
+
* The result of this function should be saved as `profile.pb.gz`.
|
|
56
|
+
* Use {@link https://pprof.me/} or {@link https://www.speedscope.app/}
|
|
57
|
+
* to view the allocation flamechart.
|
|
58
|
+
* @warning This method will always reject on Windows!
|
|
59
|
+
*/
|
|
60
|
+
pprofDump: () => Promise<Uint8Array>;
|
|
61
|
+
}
|
|
37
62
|
//#endregion
|
|
38
|
-
export { PFrameFactoryV7, PFrameOptionsV2, PFrameV16 };
|
|
63
|
+
export { PFrameFactoryV7, PFrameFactoryV8, PFrameOptionsV2, PFrameV16, PFrameV17 };
|
|
39
64
|
//# sourceMappingURL=pframe.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pframe.d.ts","names":[],"sources":["../../../src/pframe/internal_api/pframe.ts"],"mappings":";;;;;;AAUA;;;;UAAiB,SAAA,SAAkB,kBAAA,EAAoB,gBAAA;AAAA,KAE3C,eAAA;
|
|
1
|
+
{"version":3,"file":"pframe.d.ts","names":[],"sources":["../../../src/pframe/internal_api/pframe.ts"],"mappings":";;;;;;AAUA;;;;UAAiB,SAAA,SAAkB,kBAAA,EAAoB,gBAAA;;;;;AASvD;UAFiB,SAAA,SAAkB,kBAAA,EAAoB,gBAAA;AAAA,KAE3C,eAAA;EAEV,qCAAA,OAAA,EAAS,QAAA,EAET;EAAA,SAAA,UAES;EAAT,MAAA,GAAS,MAAA;AAAA;AAQX;;;;;AAAA,UAAiB,eAAA;EAcE;;;;EATjB,YAAA,CAAa,OAAA,EAAS,eAAA,GAAkB,SAAA;EAA3B;;;;;;;EASb,SAAA,QAAiB,OAAA,CAAQ,UAAA;AAAA;;;;;UAOV,eAAA;EAcS;;;;EATxB,YAAA,CAAa,OAAA,EAAS,eAAA,GAAkB,SAAA;EAAA;;;;;;;EASxC,SAAA,QAAiB,OAAA,CAAQ,UAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/pl-model-middle-layer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.30.0",
|
|
4
4
|
"description": "Common model between middle layer and non-block UI code",
|
|
5
5
|
"files": [
|
|
6
6
|
"./dist/**/*",
|
|
@@ -20,15 +20,15 @@
|
|
|
20
20
|
"es-toolkit": "^1.39.10",
|
|
21
21
|
"utility-types": "^3.11.0",
|
|
22
22
|
"zod": "~3.25.76",
|
|
23
|
-
"@milaboratories/
|
|
24
|
-
"@milaboratories/
|
|
23
|
+
"@milaboratories/pl-model-common": "1.46.0",
|
|
24
|
+
"@milaboratories/helpers": "1.14.2"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/node": "~24.5.2",
|
|
28
28
|
"typescript": "~5.9.3",
|
|
29
|
+
"@milaboratories/build-configs": "2.0.0",
|
|
29
30
|
"@milaboratories/ts-configs": "1.2.3",
|
|
30
|
-
"@milaboratories/ts-builder": "1.5.0"
|
|
31
|
-
"@milaboratories/build-configs": "2.0.0"
|
|
31
|
+
"@milaboratories/ts-builder": "1.5.0"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"build": "ts-builder build --target node",
|
|
@@ -43,6 +43,16 @@ export interface PFrameDataSourceV2 {
|
|
|
43
43
|
parquetServer?: HttpServerInfo;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
/**
|
|
47
|
+
* Structural type information for a single PColumn needed by the data side:
|
|
48
|
+
* the axis value types (in canonical order) and the column value type. Mirrors
|
|
49
|
+
* the on-disk `typeSpec` shape (`{ axes, column }`).
|
|
50
|
+
*/
|
|
51
|
+
export type PColumnValueTypeSpec = {
|
|
52
|
+
readonly axes: AxisValueType[];
|
|
53
|
+
readonly column: ColumnValueType;
|
|
54
|
+
};
|
|
55
|
+
|
|
46
56
|
/**
|
|
47
57
|
* Union type representing all possible data storage formats for PColumn data.
|
|
48
58
|
* The specific format used depends on data size, access patterns, and performance requirements.
|
|
@@ -55,12 +65,32 @@ export type DataInfo<Blob> =
|
|
|
55
65
|
| BinaryPartitionedDataInfo<Blob>
|
|
56
66
|
| ParquetPartitionedDataInfo<ParquetChunk<Blob>>;
|
|
57
67
|
|
|
68
|
+
/**
|
|
69
|
+
* Self-contained data info: a PColumn data storage format with an embedded
|
|
70
|
+
* {@link PColumnValueTypeSpec}, so the data layer can interpret the values
|
|
71
|
+
* without a separate spec. This is the on-disk `.datainfo` shape and the
|
|
72
|
+
* payload accepted by {@link PFrameFactoryAPIV6.addColumns}.
|
|
73
|
+
*
|
|
74
|
+
* Declared independently of {@link DataInfo} (not as an intersection) so the
|
|
75
|
+
* legacy v1 type can be removed without affecting this one.
|
|
76
|
+
*
|
|
77
|
+
* @template Blob - Type parameter representing the storage reference type (could be ResourceInfo, PFrameBlobId, etc.)
|
|
78
|
+
*/
|
|
79
|
+
export type DataInfoV2<Blob> = (
|
|
80
|
+
| JsonDataInfo
|
|
81
|
+
| JsonPartitionedDataInfo<Blob>
|
|
82
|
+
| BinaryPartitionedDataInfo<Blob>
|
|
83
|
+
| ParquetPartitionedDataInfo<ParquetChunk<Blob>>
|
|
84
|
+
) & {
|
|
85
|
+
readonly typeSpec: PColumnValueTypeSpec;
|
|
86
|
+
};
|
|
87
|
+
|
|
58
88
|
/**
|
|
59
89
|
* Structural type information needed by the data side: axis value
|
|
60
90
|
* types and column value types, in their canonical order. Mirrors
|
|
61
91
|
* the bridge-side `TypeSpec`.
|
|
62
92
|
*/
|
|
63
|
-
export interface
|
|
93
|
+
export interface ValueTypeSpec {
|
|
64
94
|
readonly axes: AxisValueType[];
|
|
65
95
|
readonly columns: ColumnValueType[];
|
|
66
96
|
}
|
|
@@ -70,11 +100,23 @@ export interface AddColumnEntry {
|
|
|
70
100
|
/** Unique column identifier within the PFrame. */
|
|
71
101
|
readonly id: PObjectId;
|
|
72
102
|
/** Structural type info (axes / column value types). */
|
|
73
|
-
readonly typeSpec:
|
|
103
|
+
readonly typeSpec: ValueTypeSpec;
|
|
74
104
|
/** Data info for the column. */
|
|
75
105
|
readonly data: DataInfo<PFrameBlobId>;
|
|
76
106
|
}
|
|
77
107
|
|
|
108
|
+
/**
|
|
109
|
+
* Single column entry for {@link PFrameFactoryAPIV6.addColumns}. The structural
|
|
110
|
+
* type info is carried inside {@link DataInfoV2.typeSpec} rather than as a
|
|
111
|
+
* separate field, so `data` is self-describing.
|
|
112
|
+
*/
|
|
113
|
+
export interface AddColumnEntryV2 {
|
|
114
|
+
/** Unique column identifier within the PFrame. */
|
|
115
|
+
readonly id: PObjectId;
|
|
116
|
+
/** Self-contained data info (carries its own `typeSpec`). */
|
|
117
|
+
readonly data: DataInfoV2<PFrameBlobId>;
|
|
118
|
+
}
|
|
119
|
+
|
|
78
120
|
/** API for populating a PFrame with columns and a data source. */
|
|
79
121
|
export interface PFrameFactoryAPIV5 extends Disposable {
|
|
80
122
|
/** Associates data source with this PFrame. */
|
|
@@ -96,3 +138,29 @@ export interface PFrameFactoryAPIV5 extends Disposable {
|
|
|
96
138
|
* any interactions with disposed PFrame will result in exception */
|
|
97
139
|
dispose(): void;
|
|
98
140
|
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* API for populating a PFrame with columns and a data source. Unlike
|
|
144
|
+
* {@link PFrameFactoryAPIV5}, each column's structural type info is embedded in
|
|
145
|
+
* its self-contained {@link AddColumnEntryV2.data} instead of a separate field.
|
|
146
|
+
*/
|
|
147
|
+
export interface PFrameFactoryAPIV6 extends Disposable {
|
|
148
|
+
/** Associates data source with this PFrame. */
|
|
149
|
+
setDataSource(dataSource: PFrameDataSourceV2): void;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Registers all PColumns at once: data info (self-contained, carrying its own
|
|
153
|
+
* `typeSpec`) is attached atomically. For parquet data info, schema resolution
|
|
154
|
+
* via network is performed during this call.
|
|
155
|
+
*/
|
|
156
|
+
addColumns(
|
|
157
|
+
columns: AddColumnEntryV2[],
|
|
158
|
+
options?: {
|
|
159
|
+
signal?: AbortSignal;
|
|
160
|
+
},
|
|
161
|
+
): Promise<void>;
|
|
162
|
+
|
|
163
|
+
/** Releases all the data previously added to PFrame using methods above,
|
|
164
|
+
* any interactions with disposed PFrame will result in exception */
|
|
165
|
+
dispose(): void;
|
|
166
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PFrameFactoryAPIV5 } from "./api_factory";
|
|
1
|
+
import type { PFrameFactoryAPIV5, PFrameFactoryAPIV6 } from "./api_factory";
|
|
2
2
|
import type { PFrameReadAPIV14 } from "./api_read";
|
|
3
3
|
import type { Logger } from "./common";
|
|
4
4
|
import type { PFrameId } from "./common";
|
|
@@ -10,6 +10,13 @@ import type { PFrameId } from "./common";
|
|
|
10
10
|
*/
|
|
11
11
|
export interface PFrameV16 extends PFrameFactoryAPIV5, PFrameReadAPIV14 {}
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Full PFrame surface — factory operations plus data-side reads. Like
|
|
15
|
+
* {@link PFrameV16} but with self-contained {@link PFrameFactoryAPIV6}
|
|
16
|
+
* (column `typeSpec` embedded in `data`).
|
|
17
|
+
*/
|
|
18
|
+
export interface PFrameV17 extends PFrameFactoryAPIV6, PFrameReadAPIV14 {}
|
|
19
|
+
|
|
13
20
|
export type PFrameOptionsV2 = {
|
|
14
21
|
/** PFrame ID for logging purposes */
|
|
15
22
|
frameId: PFrameId;
|
|
@@ -40,3 +47,24 @@ export interface PFrameFactoryV7 {
|
|
|
40
47
|
*/
|
|
41
48
|
pprofDump: () => Promise<Uint8Array>;
|
|
42
49
|
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* PFrame management functions exposed by the PFrame module. Creates
|
|
53
|
+
* {@link PFrameV17} instances (self-contained column data info).
|
|
54
|
+
*/
|
|
55
|
+
export interface PFrameFactoryV8 {
|
|
56
|
+
/**
|
|
57
|
+
* Create a new PFrame instance.
|
|
58
|
+
* @warning Use concurrency limiting to avoid OOM crashes when multiple instances are simultaneously in use.
|
|
59
|
+
*/
|
|
60
|
+
createPFrame(options: PFrameOptionsV2): PFrameV17;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Dump active allocations from all PFrames instances in pprof format.
|
|
64
|
+
* The result of this function should be saved as `profile.pb.gz`.
|
|
65
|
+
* Use {@link https://pprof.me/} or {@link https://www.speedscope.app/}
|
|
66
|
+
* to view the allocation flamechart.
|
|
67
|
+
* @warning This method will always reject on Windows!
|
|
68
|
+
*/
|
|
69
|
+
pprofDump: () => Promise<Uint8Array>;
|
|
70
|
+
}
|