@milaboratories/pl-model-common 1.31.0 → 1.31.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/_virtual/_rolldown/runtime.cjs +7 -13
- package/dist/author_marker.d.ts.map +1 -0
- package/dist/base32_encode.cjs +1 -2
- package/dist/base32_encode.cjs.map +1 -1
- package/dist/base32_encode.js +1 -1
- package/dist/base32_encode.js.map +1 -1
- package/dist/base64.cjs +1 -2
- package/dist/base64.cjs.map +1 -1
- package/dist/base64.d.ts.map +1 -0
- package/dist/base64.js +1 -1
- package/dist/block_state.d.ts.map +1 -0
- package/dist/bmodel/block_config.cjs +1 -2
- package/dist/bmodel/block_config.cjs.map +1 -1
- package/dist/bmodel/block_config.d.ts +0 -1
- package/dist/bmodel/block_config.d.ts.map +1 -0
- package/dist/bmodel/block_config.js +1 -1
- package/dist/bmodel/block_config.js.map +1 -1
- package/dist/bmodel/code.cjs +2 -3
- package/dist/bmodel/code.cjs.map +1 -1
- package/dist/bmodel/code.d.ts +0 -1
- package/dist/bmodel/code.d.ts.map +1 -0
- package/dist/bmodel/code.js +1 -2
- package/dist/bmodel/code.js.map +1 -1
- package/dist/bmodel/container.d.ts.map +1 -0
- package/dist/bmodel/index.cjs +3 -3
- package/dist/bmodel/index.js +3 -3
- package/dist/bmodel/normalization.cjs +2 -4
- package/dist/bmodel/normalization.cjs.map +1 -1
- package/dist/bmodel/normalization.d.ts.map +1 -0
- package/dist/bmodel/normalization.js +2 -3
- package/dist/bmodel/normalization.js.map +1 -1
- package/dist/bmodel/types.d.ts.map +1 -0
- package/dist/branding.d.ts.map +1 -0
- package/dist/common_types.d.ts.map +1 -0
- package/dist/driver_kit.d.ts +0 -1
- package/dist/driver_kit.d.ts.map +1 -0
- package/dist/drivers/ChunkedStreamReader.cjs +1 -2
- package/dist/drivers/ChunkedStreamReader.cjs.map +1 -1
- package/dist/drivers/ChunkedStreamReader.d.ts.map +1 -0
- package/dist/drivers/ChunkedStreamReader.js +1 -1
- package/dist/drivers/ChunkedStreamReader.js.map +1 -1
- package/dist/drivers/blob.cjs +2 -3
- package/dist/drivers/blob.cjs.map +1 -1
- package/dist/drivers/blob.d.ts.map +1 -0
- package/dist/drivers/blob.js +1 -2
- package/dist/drivers/blob.js.map +1 -1
- package/dist/drivers/index.cjs +18 -18
- package/dist/drivers/index.d.ts +1 -2
- package/dist/drivers/index.js +17 -17
- package/dist/drivers/interfaces.d.ts.map +1 -0
- package/dist/drivers/log.cjs +11 -4
- package/dist/drivers/log.cjs.map +1 -1
- package/dist/drivers/log.d.ts +14 -7
- package/dist/drivers/log.d.ts.map +1 -0
- package/dist/drivers/log.js +11 -4
- package/dist/drivers/log.js.map +1 -1
- package/dist/drivers/ls.cjs +2 -3
- package/dist/drivers/ls.cjs.map +1 -1
- package/dist/drivers/ls.d.ts +0 -2
- package/dist/drivers/ls.d.ts.map +1 -0
- package/dist/drivers/ls.js +1 -2
- package/dist/drivers/ls.js.map +1 -1
- package/dist/drivers/pframe/column_filter.d.ts.map +1 -0
- package/dist/drivers/pframe/data_info.cjs +2 -3
- package/dist/drivers/pframe/data_info.cjs.map +1 -1
- package/dist/drivers/pframe/data_info.d.ts.map +1 -0
- package/dist/drivers/pframe/data_info.js +1 -2
- package/dist/drivers/pframe/data_info.js.map +1 -1
- package/dist/drivers/pframe/data_types.cjs +4 -5
- package/dist/drivers/pframe/data_types.cjs.map +1 -1
- package/dist/drivers/pframe/data_types.d.ts.map +1 -0
- package/dist/drivers/pframe/data_types.js +3 -4
- package/dist/drivers/pframe/data_types.js.map +1 -1
- package/dist/drivers/pframe/driver.cjs +1 -2
- package/dist/drivers/pframe/driver.cjs.map +1 -1
- package/dist/drivers/pframe/driver.d.ts +0 -1
- package/dist/drivers/pframe/driver.d.ts.map +1 -0
- package/dist/drivers/pframe/driver.js +1 -1
- package/dist/drivers/pframe/filter_spec.d.ts.map +1 -0
- package/dist/drivers/pframe/find_columns.d.ts.map +1 -0
- package/dist/drivers/pframe/index.cjs +15 -15
- package/dist/drivers/pframe/index.d.ts +0 -2
- package/dist/drivers/pframe/index.js +12 -12
- package/dist/drivers/pframe/linker_columns.cjs +3 -4
- package/dist/drivers/pframe/linker_columns.cjs.map +1 -1
- package/dist/drivers/pframe/linker_columns.d.ts.map +1 -0
- package/dist/drivers/pframe/linker_columns.js +1 -2
- package/dist/drivers/pframe/linker_columns.js.map +1 -1
- package/dist/drivers/pframe/pframe.d.ts +0 -2
- package/dist/drivers/pframe/pframe.d.ts.map +1 -0
- package/dist/drivers/pframe/query/index.cjs +1 -1
- package/dist/drivers/pframe/query/index.js +1 -1
- package/dist/drivers/pframe/query/query_common.d.ts +0 -3
- package/dist/drivers/pframe/query/query_common.d.ts.map +1 -0
- package/dist/drivers/pframe/query/query_data.d.ts +0 -2
- package/dist/drivers/pframe/query/query_data.d.ts.map +1 -0
- package/dist/drivers/pframe/query/query_spec.d.ts +0 -3
- package/dist/drivers/pframe/query/query_spec.d.ts.map +1 -0
- package/dist/drivers/pframe/query/utils.cjs +3 -4
- package/dist/drivers/pframe/query/utils.cjs.map +1 -1
- package/dist/drivers/pframe/query/utils.d.ts.map +1 -0
- package/dist/drivers/pframe/query/utils.js +1 -2
- package/dist/drivers/pframe/query/utils.js.map +1 -1
- package/dist/drivers/pframe/spec/anchored.cjs +4 -5
- package/dist/drivers/pframe/spec/anchored.cjs.map +1 -1
- package/dist/drivers/pframe/spec/anchored.d.ts.map +1 -0
- package/dist/drivers/pframe/spec/anchored.js +1 -2
- package/dist/drivers/pframe/spec/anchored.js.map +1 -1
- package/dist/drivers/pframe/spec/filtered_column.cjs +1 -2
- package/dist/drivers/pframe/spec/filtered_column.cjs.map +1 -1
- package/dist/drivers/pframe/spec/filtered_column.d.ts.map +1 -0
- package/dist/drivers/pframe/spec/filtered_column.js +1 -1
- package/dist/drivers/pframe/spec/ids.cjs +2 -3
- package/dist/drivers/pframe/spec/ids.cjs.map +1 -1
- package/dist/drivers/pframe/spec/ids.d.ts +0 -2
- package/dist/drivers/pframe/spec/ids.d.ts.map +1 -0
- package/dist/drivers/pframe/spec/ids.js +1 -2
- package/dist/drivers/pframe/spec/ids.js.map +1 -1
- package/dist/drivers/pframe/spec/index.cjs +6 -6
- package/dist/drivers/pframe/spec/index.js +6 -6
- package/dist/drivers/pframe/spec/native_id.cjs +4 -5
- package/dist/drivers/pframe/spec/native_id.cjs.map +1 -1
- package/dist/drivers/pframe/spec/native_id.d.ts +0 -2
- package/dist/drivers/pframe/spec/native_id.d.ts.map +1 -0
- package/dist/drivers/pframe/spec/native_id.js +1 -2
- package/dist/drivers/pframe/spec/native_id.js.map +1 -1
- package/dist/drivers/pframe/spec/selectors.cjs +3 -4
- package/dist/drivers/pframe/spec/selectors.cjs.map +1 -1
- package/dist/drivers/pframe/spec/selectors.d.ts +0 -2
- package/dist/drivers/pframe/spec/selectors.d.ts.map +1 -0
- package/dist/drivers/pframe/spec/selectors.js +1 -2
- package/dist/drivers/pframe/spec/selectors.js.map +1 -1
- package/dist/drivers/pframe/spec/spec.cjs +4 -5
- package/dist/drivers/pframe/spec/spec.cjs.map +1 -1
- package/dist/drivers/pframe/spec/spec.d.ts +0 -1
- package/dist/drivers/pframe/spec/spec.d.ts.map +1 -0
- package/dist/drivers/pframe/spec/spec.js +1 -2
- package/dist/drivers/pframe/spec/spec.js.map +1 -1
- package/dist/drivers/pframe/spec_driver.d.ts +0 -2
- package/dist/drivers/pframe/spec_driver.d.ts.map +1 -0
- package/dist/drivers/pframe/table.d.ts.map +1 -0
- package/dist/drivers/pframe/table_calculate.cjs +6 -7
- package/dist/drivers/pframe/table_calculate.cjs.map +1 -1
- package/dist/drivers/pframe/table_calculate.d.ts +0 -2
- package/dist/drivers/pframe/table_calculate.d.ts.map +1 -0
- package/dist/drivers/pframe/table_calculate.js +1 -2
- package/dist/drivers/pframe/table_calculate.js.map +1 -1
- package/dist/drivers/pframe/table_common.cjs +1 -2
- package/dist/drivers/pframe/table_common.cjs.map +1 -1
- package/dist/drivers/pframe/table_common.d.ts +0 -2
- package/dist/drivers/pframe/table_common.d.ts.map +1 -0
- package/dist/drivers/pframe/table_common.js +1 -1
- package/dist/drivers/pframe/unique_values.d.ts +0 -2
- package/dist/drivers/pframe/unique_values.d.ts.map +1 -0
- package/dist/drivers/upload.d.ts.map +1 -0
- package/dist/drivers/urls.cjs +1 -2
- package/dist/drivers/urls.cjs.map +1 -1
- package/dist/drivers/urls.d.ts.map +1 -0
- package/dist/drivers/urls.js +1 -1
- package/dist/errors.cjs +1 -2
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/flags/block_flags.cjs +1 -2
- package/dist/flags/block_flags.cjs.map +1 -1
- package/dist/flags/block_flags.d.ts +0 -2
- package/dist/flags/block_flags.d.ts.map +1 -0
- package/dist/flags/block_flags.js +1 -1
- package/dist/flags/flag_utils.cjs +1 -2
- package/dist/flags/flag_utils.cjs.map +1 -1
- package/dist/flags/flag_utils.d.ts.map +1 -0
- package/dist/flags/flag_utils.js +1 -1
- package/dist/flags/flag_utils.js.map +1 -1
- package/dist/flags/type_utils.d.ts.map +1 -0
- package/dist/httpAuth.cjs +1 -2
- package/dist/httpAuth.cjs.map +1 -1
- package/dist/httpAuth.d.ts.map +1 -0
- package/dist/httpAuth.js +1 -1
- package/dist/index.cjs +47 -47
- package/dist/index.d.ts +2 -7
- package/dist/index.js +2 -3
- package/dist/json.cjs +2 -3
- package/dist/json.cjs.map +1 -1
- package/dist/json.d.ts.map +1 -0
- package/dist/json.js +1 -2
- package/dist/json.js.map +1 -1
- package/dist/navigation.cjs +1 -2
- package/dist/navigation.cjs.map +1 -1
- package/dist/navigation.d.ts.map +1 -0
- package/dist/navigation.js +1 -1
- package/dist/plid.cjs +6 -7
- package/dist/plid.cjs.map +1 -1
- package/dist/plid.d.ts.map +1 -0
- package/dist/plid.js +4 -5
- package/dist/plid.js.map +1 -1
- package/dist/pool/entry.d.ts.map +1 -0
- package/dist/pool/query.cjs +2 -3
- package/dist/pool/query.cjs.map +1 -1
- package/dist/pool/query.d.ts +0 -1
- package/dist/pool/query.d.ts.map +1 -0
- package/dist/pool/query.js +1 -2
- package/dist/pool/query.js.map +1 -1
- package/dist/pool/spec.cjs +2 -3
- package/dist/pool/spec.cjs.map +1 -1
- package/dist/pool/spec.d.ts +0 -2
- package/dist/pool/spec.d.ts.map +1 -0
- package/dist/pool/spec.js +1 -2
- package/dist/pool/spec.js.map +1 -1
- package/dist/pool_entry.cjs +1 -2
- package/dist/pool_entry.cjs.map +1 -1
- package/dist/pool_entry.d.ts.map +1 -0
- package/dist/pool_entry.js +1 -1
- package/dist/pool_entry.js.map +1 -1
- package/dist/ref.cjs +2 -3
- package/dist/ref.cjs.map +1 -1
- package/dist/ref.d.ts.map +1 -0
- package/dist/ref.js +1 -2
- package/dist/ref.js.map +1 -1
- package/dist/resource_types.cjs +1 -2
- package/dist/resource_types.cjs.map +1 -1
- package/dist/resource_types.d.ts.map +1 -0
- package/dist/resource_types.js +1 -1
- package/dist/services/index.cjs +6 -6
- package/dist/services/index.js +6 -6
- package/dist/services/service_capabilities.cjs +2 -3
- package/dist/services/service_capabilities.cjs.map +1 -1
- package/dist/services/service_capabilities.d.ts.map +1 -0
- package/dist/services/service_capabilities.js +1 -2
- package/dist/services/service_capabilities.js.map +1 -1
- package/dist/services/service_declarations.cjs +2 -3
- package/dist/services/service_declarations.cjs.map +1 -1
- package/dist/services/service_declarations.d.ts +0 -2
- package/dist/services/service_declarations.d.ts.map +1 -0
- package/dist/services/service_declarations.js +1 -2
- package/dist/services/service_declarations.js.map +1 -1
- package/dist/services/service_injector_factory.cjs +1 -2
- package/dist/services/service_injector_factory.cjs.map +1 -1
- package/dist/services/service_injector_factory.d.ts.map +1 -0
- package/dist/services/service_injector_factory.js +1 -1
- package/dist/services/service_injectors.cjs +4 -5
- package/dist/services/service_injectors.cjs.map +1 -1
- package/dist/services/service_injectors.d.ts.map +1 -0
- package/dist/services/service_injectors.js +1 -2
- package/dist/services/service_injectors.js.map +1 -1
- package/dist/services/service_registry.cjs +2 -3
- package/dist/services/service_registry.cjs.map +1 -1
- package/dist/services/service_registry.d.ts.map +1 -0
- package/dist/services/service_registry.js +1 -2
- package/dist/services/service_registry.js.map +1 -1
- package/dist/services/service_types.cjs +2 -3
- package/dist/services/service_types.cjs.map +1 -1
- package/dist/services/service_types.d.ts.map +1 -0
- package/dist/services/service_types.js +1 -2
- package/dist/services/service_types.js.map +1 -1
- package/dist/utag.d.ts.map +1 -0
- package/dist/util.cjs +1 -2
- package/dist/util.cjs.map +1 -1
- package/dist/util.d.ts.map +1 -0
- package/dist/util.js +1 -1
- package/dist/value_or_error.cjs +1 -2
- package/dist/value_or_error.cjs.map +1 -1
- package/dist/value_or_error.d.ts.map +1 -0
- package/dist/value_or_error.js +1 -1
- package/package.json +8 -8
- package/src/drivers/log.ts +21 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blob.cjs","names":["z"],"sources":["../../src/drivers/blob.ts"],"sourcesContent":["import type { Branded } from \"../branding\";\nimport { z } from \"zod\";\n\n/** Handle of locally downloaded blob. This handle is issued only after the\n * blob's content is downloaded locally, and ready for quick access. */\nexport type LocalBlobHandle = Branded<string, \"LocalBlobHandle\">;\n\n/** Handle of remote blob. This handle is issued as soon as the data becomes\n * available on the remote server. */\nexport type RemoteBlobHandle = Branded<string, \"RemoteBlobHandle\">;\n\n/** Being configured inside the output structure provides information about\n * blob's content and means to retrieve it when needed. */\nexport interface BlobHandleAndSize<\n H extends LocalBlobHandle | RemoteBlobHandle = LocalBlobHandle | RemoteBlobHandle,\n> {\n /** Handle to retrieve block content using {@link BlobDriver.getContent()} */\n readonly handle: H;\n\n /** Blob size in bytes. */\n readonly size: number;\n}\n\n/** Range in bytes, from should be less than to. */\nexport const RangeBytes = z.object({\n /** Included left border. */\n from: z.number().min(0),\n /** Excluded right border. */\n to: z.number().min(1),\n});\n\nexport type RangeBytes = z.infer<typeof RangeBytes>;\n\nexport function newRangeBytesOpt(from?: number, to?: number): RangeBytes | undefined {\n if (from == undefined || to == undefined) {\n return undefined;\n }\n\n const range = { from, to };\n validateRangeBytes(range, \"newRangeBytesOpt\");\n\n return range;\n}\n\nexport function validateRangeBytes(range: RangeBytes, errMsg: string) {\n if (range.from < 0 || range.from >= range.to) {\n throw new Error(`${errMsg}: invalid bytes range: ${range}`);\n }\n}\n\n/** Being configured inside the output structure provides information about\n * locally downloaded blob and means to retrieve it's content when needed. This\n * structure is created only after the blob's content is downloaded locally, and\n * ready for quick access. */\nexport type LocalBlobHandleAndSize = BlobHandleAndSize<LocalBlobHandle>;\n\n/** Being configured inside the output structure provides information about\n * remote blob and means to retrieve it's content when needed. This structure\n * is created as soon as remote blob becomes available. */\nexport type RemoteBlobHandleAndSize = BlobHandleAndSize<RemoteBlobHandle>;\n\nexport type GetContentOptions = {\n /** Byte range in [from, to) format. */\n range?: RangeBytes;\n /** Signal to abort the operation early. */\n signal?: AbortSignal;\n};\n\nexport type ContentHandler<T> = (content: ReadableStream, size: number) => Promise<T>;\n\n/** Defines API of blob driver as it is seen from the block UI code. */\nexport interface BlobDriver {\n /**\n * Given the blob handle returns its content.\n * Depending on the handle type, content will be served from locally downloaded file,\n * or directly from remote platforma storage.\n */\n getContent(handle: LocalBlobHandle | RemoteBlobHandle, range?: RangeBytes): Promise<Uint8Array>;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"blob.cjs","names":["z"],"sources":["../../src/drivers/blob.ts"],"sourcesContent":["import type { Branded } from \"../branding\";\nimport { z } from \"zod\";\n\n/** Handle of locally downloaded blob. This handle is issued only after the\n * blob's content is downloaded locally, and ready for quick access. */\nexport type LocalBlobHandle = Branded<string, \"LocalBlobHandle\">;\n\n/** Handle of remote blob. This handle is issued as soon as the data becomes\n * available on the remote server. */\nexport type RemoteBlobHandle = Branded<string, \"RemoteBlobHandle\">;\n\n/** Being configured inside the output structure provides information about\n * blob's content and means to retrieve it when needed. */\nexport interface BlobHandleAndSize<\n H extends LocalBlobHandle | RemoteBlobHandle = LocalBlobHandle | RemoteBlobHandle,\n> {\n /** Handle to retrieve block content using {@link BlobDriver.getContent()} */\n readonly handle: H;\n\n /** Blob size in bytes. */\n readonly size: number;\n}\n\n/** Range in bytes, from should be less than to. */\nexport const RangeBytes = z.object({\n /** Included left border. */\n from: z.number().min(0),\n /** Excluded right border. */\n to: z.number().min(1),\n});\n\nexport type RangeBytes = z.infer<typeof RangeBytes>;\n\nexport function newRangeBytesOpt(from?: number, to?: number): RangeBytes | undefined {\n if (from == undefined || to == undefined) {\n return undefined;\n }\n\n const range = { from, to };\n validateRangeBytes(range, \"newRangeBytesOpt\");\n\n return range;\n}\n\nexport function validateRangeBytes(range: RangeBytes, errMsg: string) {\n if (range.from < 0 || range.from >= range.to) {\n throw new Error(`${errMsg}: invalid bytes range: ${range}`);\n }\n}\n\n/** Being configured inside the output structure provides information about\n * locally downloaded blob and means to retrieve it's content when needed. This\n * structure is created only after the blob's content is downloaded locally, and\n * ready for quick access. */\nexport type LocalBlobHandleAndSize = BlobHandleAndSize<LocalBlobHandle>;\n\n/** Being configured inside the output structure provides information about\n * remote blob and means to retrieve it's content when needed. This structure\n * is created as soon as remote blob becomes available. */\nexport type RemoteBlobHandleAndSize = BlobHandleAndSize<RemoteBlobHandle>;\n\nexport type GetContentOptions = {\n /** Byte range in [from, to) format. */\n range?: RangeBytes;\n /** Signal to abort the operation early. */\n signal?: AbortSignal;\n};\n\nexport type ContentHandler<T> = (content: ReadableStream, size: number) => Promise<T>;\n\n/** Defines API of blob driver as it is seen from the block UI code. */\nexport interface BlobDriver {\n /**\n * Given the blob handle returns its content.\n * Depending on the handle type, content will be served from locally downloaded file,\n * or directly from remote platforma storage.\n */\n getContent(handle: LocalBlobHandle | RemoteBlobHandle, range?: RangeBytes): Promise<Uint8Array>;\n}\n"],"mappings":";;;;AAwBA,MAAa,aAAaA,IAAAA,EAAE,OAAO;CAEjC,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;;EAMf,UAAA,CAAW,MAAA,EAAQ,eAAA,GAAkB,gBAAA,EAAkB,KAAA,GAAQ,UAAA,GAAa,OAAA,CAAQ,UAAA;AAAA"}
|
package/dist/drivers/blob.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
3
2
|
//#region src/drivers/blob.ts
|
|
4
3
|
/** Range in bytes, from should be less than to. */
|
|
5
4
|
const RangeBytes = z.object({
|
|
@@ -18,7 +17,7 @@ function newRangeBytesOpt(from, to) {
|
|
|
18
17
|
function validateRangeBytes(range, errMsg) {
|
|
19
18
|
if (range.from < 0 || range.from >= range.to) throw new Error(`${errMsg}: invalid bytes range: ${range}`);
|
|
20
19
|
}
|
|
21
|
-
|
|
22
20
|
//#endregion
|
|
23
21
|
export { RangeBytes, newRangeBytesOpt, validateRangeBytes };
|
|
22
|
+
|
|
24
23
|
//# sourceMappingURL=blob.js.map
|
package/dist/drivers/blob.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blob.js","names":[],"sources":["../../src/drivers/blob.ts"],"sourcesContent":["import type { Branded } from \"../branding\";\nimport { z } from \"zod\";\n\n/** Handle of locally downloaded blob. This handle is issued only after the\n * blob's content is downloaded locally, and ready for quick access. */\nexport type LocalBlobHandle = Branded<string, \"LocalBlobHandle\">;\n\n/** Handle of remote blob. This handle is issued as soon as the data becomes\n * available on the remote server. */\nexport type RemoteBlobHandle = Branded<string, \"RemoteBlobHandle\">;\n\n/** Being configured inside the output structure provides information about\n * blob's content and means to retrieve it when needed. */\nexport interface BlobHandleAndSize<\n H extends LocalBlobHandle | RemoteBlobHandle = LocalBlobHandle | RemoteBlobHandle,\n> {\n /** Handle to retrieve block content using {@link BlobDriver.getContent()} */\n readonly handle: H;\n\n /** Blob size in bytes. */\n readonly size: number;\n}\n\n/** Range in bytes, from should be less than to. */\nexport const RangeBytes = z.object({\n /** Included left border. */\n from: z.number().min(0),\n /** Excluded right border. */\n to: z.number().min(1),\n});\n\nexport type RangeBytes = z.infer<typeof RangeBytes>;\n\nexport function newRangeBytesOpt(from?: number, to?: number): RangeBytes | undefined {\n if (from == undefined || to == undefined) {\n return undefined;\n }\n\n const range = { from, to };\n validateRangeBytes(range, \"newRangeBytesOpt\");\n\n return range;\n}\n\nexport function validateRangeBytes(range: RangeBytes, errMsg: string) {\n if (range.from < 0 || range.from >= range.to) {\n throw new Error(`${errMsg}: invalid bytes range: ${range}`);\n }\n}\n\n/** Being configured inside the output structure provides information about\n * locally downloaded blob and means to retrieve it's content when needed. This\n * structure is created only after the blob's content is downloaded locally, and\n * ready for quick access. */\nexport type LocalBlobHandleAndSize = BlobHandleAndSize<LocalBlobHandle>;\n\n/** Being configured inside the output structure provides information about\n * remote blob and means to retrieve it's content when needed. This structure\n * is created as soon as remote blob becomes available. */\nexport type RemoteBlobHandleAndSize = BlobHandleAndSize<RemoteBlobHandle>;\n\nexport type GetContentOptions = {\n /** Byte range in [from, to) format. */\n range?: RangeBytes;\n /** Signal to abort the operation early. */\n signal?: AbortSignal;\n};\n\nexport type ContentHandler<T> = (content: ReadableStream, size: number) => Promise<T>;\n\n/** Defines API of blob driver as it is seen from the block UI code. */\nexport interface BlobDriver {\n /**\n * Given the blob handle returns its content.\n * Depending on the handle type, content will be served from locally downloaded file,\n * or directly from remote platforma storage.\n */\n getContent(handle: LocalBlobHandle | RemoteBlobHandle, range?: RangeBytes): Promise<Uint8Array>;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"blob.js","names":[],"sources":["../../src/drivers/blob.ts"],"sourcesContent":["import type { Branded } from \"../branding\";\nimport { z } from \"zod\";\n\n/** Handle of locally downloaded blob. This handle is issued only after the\n * blob's content is downloaded locally, and ready for quick access. */\nexport type LocalBlobHandle = Branded<string, \"LocalBlobHandle\">;\n\n/** Handle of remote blob. This handle is issued as soon as the data becomes\n * available on the remote server. */\nexport type RemoteBlobHandle = Branded<string, \"RemoteBlobHandle\">;\n\n/** Being configured inside the output structure provides information about\n * blob's content and means to retrieve it when needed. */\nexport interface BlobHandleAndSize<\n H extends LocalBlobHandle | RemoteBlobHandle = LocalBlobHandle | RemoteBlobHandle,\n> {\n /** Handle to retrieve block content using {@link BlobDriver.getContent()} */\n readonly handle: H;\n\n /** Blob size in bytes. */\n readonly size: number;\n}\n\n/** Range in bytes, from should be less than to. */\nexport const RangeBytes = z.object({\n /** Included left border. */\n from: z.number().min(0),\n /** Excluded right border. */\n to: z.number().min(1),\n});\n\nexport type RangeBytes = z.infer<typeof RangeBytes>;\n\nexport function newRangeBytesOpt(from?: number, to?: number): RangeBytes | undefined {\n if (from == undefined || to == undefined) {\n return undefined;\n }\n\n const range = { from, to };\n validateRangeBytes(range, \"newRangeBytesOpt\");\n\n return range;\n}\n\nexport function validateRangeBytes(range: RangeBytes, errMsg: string) {\n if (range.from < 0 || range.from >= range.to) {\n throw new Error(`${errMsg}: invalid bytes range: ${range}`);\n }\n}\n\n/** Being configured inside the output structure provides information about\n * locally downloaded blob and means to retrieve it's content when needed. This\n * structure is created only after the blob's content is downloaded locally, and\n * ready for quick access. */\nexport type LocalBlobHandleAndSize = BlobHandleAndSize<LocalBlobHandle>;\n\n/** Being configured inside the output structure provides information about\n * remote blob and means to retrieve it's content when needed. This structure\n * is created as soon as remote blob becomes available. */\nexport type RemoteBlobHandleAndSize = BlobHandleAndSize<RemoteBlobHandle>;\n\nexport type GetContentOptions = {\n /** Byte range in [from, to) format. */\n range?: RangeBytes;\n /** Signal to abort the operation early. */\n signal?: AbortSignal;\n};\n\nexport type ContentHandler<T> = (content: ReadableStream, size: number) => Promise<T>;\n\n/** Defines API of blob driver as it is seen from the block UI code. */\nexport interface BlobDriver {\n /**\n * Given the blob handle returns its content.\n * Depending on the handle type, content will be served from locally downloaded file,\n * or directly from remote platforma storage.\n */\n getContent(handle: LocalBlobHandle | RemoteBlobHandle, range?: RangeBytes): Promise<Uint8Array>;\n}\n"],"mappings":";;;AAwBA,MAAa,aAAa,EAAE,OAAO;CAEjC,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE;CAEvB,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE;CACtB,CAAC;AAIF,SAAgB,iBAAiB,MAAe,IAAqC;AACnF,KAAI,QAAQ,KAAA,KAAa,MAAM,KAAA,EAC7B;CAGF,MAAM,QAAQ;EAAE;EAAM;EAAI;AAC1B,oBAAmB,OAAO,mBAAmB;AAE7C,QAAO;;AAGT,SAAgB,mBAAmB,OAAmB,QAAgB;AACpE,KAAI,MAAM,OAAO,KAAK,MAAM,QAAQ,MAAM,GACxC,OAAM,IAAI,MAAM,GAAG,OAAO,yBAAyB,QAAQ"}
|
package/dist/drivers/index.cjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
require(
|
|
18
|
-
|
|
1
|
+
require("./urls.cjs");
|
|
2
|
+
require("./blob.cjs");
|
|
3
|
+
require("./log.cjs");
|
|
4
|
+
require("./ls.cjs");
|
|
5
|
+
require("./pframe/data_info.cjs");
|
|
6
|
+
require("./pframe/spec/spec.cjs");
|
|
7
|
+
require("./pframe/data_types.cjs");
|
|
8
|
+
require("./pframe/query/utils.cjs");
|
|
9
|
+
require("./pframe/table_calculate.cjs");
|
|
10
|
+
require("./pframe/table_common.cjs");
|
|
11
|
+
require("./pframe/spec/ids.cjs");
|
|
12
|
+
require("./pframe/spec/anchored.cjs");
|
|
13
|
+
require("./pframe/spec/filtered_column.cjs");
|
|
14
|
+
require("./pframe/spec/selectors.cjs");
|
|
15
|
+
require("./pframe/spec/native_id.cjs");
|
|
16
|
+
require("./pframe/linker_columns.cjs");
|
|
17
|
+
require("./pframe/index.cjs");
|
|
18
|
+
require("./ChunkedStreamReader.cjs");
|
package/dist/drivers/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { BlobLike, FileLike } from "./interfaces.js";
|
|
|
2
2
|
import { ArchiveFormat, BlobToURLDriver, BlockUIURL, FolderURL, FrontendDriver, isBlockUIURL, isFolderURL } from "./urls.js";
|
|
3
3
|
import { BlobDriver, BlobHandleAndSize, ContentHandler, GetContentOptions, LocalBlobHandle, LocalBlobHandleAndSize, RangeBytes, RemoteBlobHandle, RemoteBlobHandleAndSize, newRangeBytesOpt, validateRangeBytes } from "./blob.js";
|
|
4
4
|
import { ImportProgress, ImportStatus } from "./upload.js";
|
|
5
|
-
import { AnyLogHandle, LiveLogHandle, LogsDriver, ProgressLogWithInfo, ReadyLogHandle, StreamingApiResponse, StreamingApiResponseHandleOutdated, StreamingApiResponseOk, isLiveLog } from "./log.js";
|
|
5
|
+
import { AnyLogHandle, LiveLogHandle, LogsDriver, ProgressLogWithInfo, ReadyLogHandle, StreamingApiResponse, StreamingApiResponseHandleOutdated, StreamingApiResponseOk, isAnyLogHandle, isLiveLog } from "./log.js";
|
|
6
6
|
import { Annotation, AnnotationJson, AxesId, AxesSpec, AxisId, AxisSpec, AxisSpecNormalized, AxisTree, AxisValueType, ColumnValueType, Domain, DomainJson, Metadata, MetadataJson, PAxisName, PColumn, PColumnIdAndSpec, PColumnInfo, PColumnLazy, PColumnName, PColumnSpec, PColumnSpecId, PDataColumnSpec, PUniversalColumnSpec, ValueType, canonicalizeAxisId, canonicalizeAxisWithParents, getArrayFromAxisTree, getAxesId, getAxesTree, getAxisId, getColumnIdAndSpec, getDenormalizedAxesList, getNormalizedAxesList, getPColumnSpecId, getSetFromAxisTree, getTypeFromPColumnOrAxisSpec, isAxisId, isLabelColumn, isLinkerColumn, matchAxisId, readAnnotation, readAnnotationJson, readAnnotationJsonOrThrow, readDomain, readDomainJson, readDomainJsonOrThrow, readMetadata, readMetadataJson, readMetadataJsonOrThrow, resolveAnnotationParents } from "./pframe/spec/spec.js";
|
|
7
7
|
import { ColumnFilter } from "./pframe/column_filter.js";
|
|
8
8
|
import { BinaryChunk, BinaryPartitionedDataInfo, BinaryPartitionedDataInfoEntries, DataInfo, DataInfoEntries, JsonDataInfo, JsonDataInfoEntries, JsonPartitionedDataInfo, JsonPartitionedDataInfoEntries, PColumnDataEntry, PColumnKey, PColumnValue, PColumnValues, PColumnValuesEntry, ParquetChunk, ParquetChunkMapping, ParquetChunkMappingAxis, ParquetChunkMappingColumn, ParquetChunkMetadata, ParquetChunkStats, ParquetPartitionedDataInfo, ParquetPartitionedDataInfoEntries, PartitionedDataInfoEntries, dataInfoToEntries, entriesToDataInfo, isDataInfo, isDataInfoEntries, isPartitionedDataInfoEntries, mapDataInfo, mapDataInfoEntries, visitDataInfo } from "./pframe/data_info.js";
|
|
@@ -23,7 +23,6 @@ import { DataExprAxisRef, DataExprColumnRef, DataQuery, DataQueryBooleanExpressi
|
|
|
23
23
|
import { collectSpecQueryColumns, isBooleanExpression, mapSpecQueryColumns, sortSpecQuery, traverseQuerySpec } from "./pframe/query/utils.js";
|
|
24
24
|
import { CompositeLinkerMap, LinkerMap } from "./pframe/linker_columns.js";
|
|
25
25
|
import { AxisQualification, ColumnAxesWithQualifications, DeleteColumnRequest, DeleteColumnResponse, DiscoverColumnsConstraints, DiscoverColumnsLinkerStep, DiscoverColumnsMappingVariant, DiscoverColumnsRequest, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, DiscoverColumnsStepInfo, EvaluateQueryResponse, MatcherMap, MultiAxisSelector, MultiColumnSelector, PFrameSpecDriver, SpecFrameHandle, StringMatcher } from "./pframe/spec_driver.js";
|
|
26
|
-
import "./pframe/index.js";
|
|
27
26
|
import { FileRange, ImportFileHandle, ImportFileHandleIndex, ImportFileHandleUpload, ListFilesResult, LocalImportFileHandle, LsDriver, LsEntry, OpenDialogFilter, OpenDialogOps, OpenMultipleFilesResponse, OpenSingleFileResponse, StorageEntry, StorageHandle, StorageHandleLocal, StorageHandleRemote, getFileNameFromHandle, getFilePathFromHandle, isImportFileHandleIndex, isImportFileHandleUpload } from "./ls.js";
|
|
28
27
|
import { ChunkedStreamReader, ChunkedStreamReaderOptions, ErrorHandlerStatus } from "./ChunkedStreamReader.js";
|
|
29
28
|
import { PFrame, PFrameDef } from "./pframe/pframe.js";
|
package/dist/drivers/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
1
|
+
import "./urls.js";
|
|
2
|
+
import "./blob.js";
|
|
3
|
+
import "./log.js";
|
|
4
|
+
import "./ls.js";
|
|
5
|
+
import "./pframe/data_info.js";
|
|
6
|
+
import "./pframe/spec/spec.js";
|
|
7
|
+
import "./pframe/data_types.js";
|
|
8
|
+
import "./pframe/query/utils.js";
|
|
9
|
+
import "./pframe/table_calculate.js";
|
|
10
|
+
import "./pframe/table_common.js";
|
|
11
|
+
import "./pframe/spec/ids.js";
|
|
12
|
+
import "./pframe/spec/anchored.js";
|
|
13
|
+
import "./pframe/spec/filtered_column.js";
|
|
14
|
+
import "./pframe/spec/selectors.js";
|
|
15
|
+
import "./pframe/spec/native_id.js";
|
|
16
|
+
import "./pframe/linker_columns.js";
|
|
17
17
|
import "./pframe/index.js";
|
|
18
|
-
import
|
|
18
|
+
import "./ChunkedStreamReader.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","names":[],"sources":["../../src/drivers/interfaces.ts"],"mappings":";;AAGA;;UAAiB,QAAA;EAQ8B;EAAA,SANpC,IAAA;EAEA;EAAA,SAAA,IAAA;EAED;EAAR,IAAA,IAAQ,OAAA;EAEF;EAAN,KAAA,CAAM,KAAA,WAAgB,GAAA,YAAe,QAAA;AAAA;;;AAOvC;UAAiB,QAAA,SAAiB,QAAA;;WAEvB,YAAA;EAFuB;EAAA,SAIvB,IAAA;AAAA"}
|
package/dist/drivers/log.cjs
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
|
|
2
1
|
//#region src/drivers/log.ts
|
|
3
|
-
/**
|
|
2
|
+
/** Prefix constants — single source of truth for handle format. */
|
|
3
|
+
const LIVE_LOG_PREFIX = "log+live://log/";
|
|
4
|
+
const READY_LOG_PREFIX = "log+ready://log/";
|
|
5
|
+
/** Type guard to check if a value is any kind of log handle. */
|
|
6
|
+
function isAnyLogHandle(value) {
|
|
7
|
+
return typeof value === "string" && (value.startsWith(LIVE_LOG_PREFIX) || value.startsWith(READY_LOG_PREFIX));
|
|
8
|
+
}
|
|
9
|
+
/** Type guard to check if log is live, and corresponding process is not finished. */
|
|
4
10
|
function isLiveLog(handle) {
|
|
5
|
-
return handle !== void 0 && handle.startsWith(
|
|
11
|
+
return handle !== void 0 && handle.startsWith(LIVE_LOG_PREFIX);
|
|
6
12
|
}
|
|
7
|
-
|
|
8
13
|
//#endregion
|
|
14
|
+
exports.isAnyLogHandle = isAnyLogHandle;
|
|
9
15
|
exports.isLiveLog = isLiveLog;
|
|
16
|
+
|
|
10
17
|
//# sourceMappingURL=log.cjs.map
|
package/dist/drivers/log.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.cjs","names":[],"sources":["../../src/drivers/log.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"log.cjs","names":[],"sources":["../../src/drivers/log.ts"],"sourcesContent":["import type { Branded } from \"../branding\";\n\n/** Prefix constants — single source of truth for handle format. */\nconst LIVE_LOG_PREFIX = \"log+live://log/\";\nconst READY_LOG_PREFIX = \"log+ready://log/\";\n\n/** Handle of the live logs of a program.\n * The resource that represents a log can be deleted,\n * in this case the handle should be refreshed. */\nexport type LiveLogHandle = Branded<`${typeof LIVE_LOG_PREFIX}${string}`, \"LiveLogHandle\">;\n\n/** Handle of the ready logs of a program. */\nexport type ReadyLogHandle = Branded<`${typeof READY_LOG_PREFIX}${string}`, \"ReadyLogHandle\">;\n\n/** Handle of logs. This handle should be passed\n * to the driver for retrieving logs. */\nexport type AnyLogHandle = LiveLogHandle | ReadyLogHandle;\n\n/** Type guard to check if a value is any kind of log handle. */\nexport function isAnyLogHandle(value: unknown): value is AnyLogHandle {\n return (\n typeof value === \"string\" &&\n (value.startsWith(LIVE_LOG_PREFIX) || value.startsWith(READY_LOG_PREFIX))\n );\n}\n\n/** Type guard to check if log is live, and corresponding process is not finished. */\nexport function isLiveLog(handle: AnyLogHandle | undefined): handle is LiveLogHandle {\n return handle !== undefined && handle.startsWith(LIVE_LOG_PREFIX);\n}\n\n/** Driver to retrieve logs given log handle */\nexport interface LogsDriver {\n lastLines(\n /** A handle that was issued previously. */\n handle: AnyLogHandle,\n\n /** Allows client to limit total data sent from server. */\n lineCount: number,\n\n /** Makes streamer to perform seek operation to given offset before sending the contents.\n * Client can just use the <new_offset> value of the last response from server to continue streaming after reconnection.\n * If undefined, then starts from the end. */\n offsetBytes?: number,\n\n /** Is substring for line search pattern.\n * This option makes controller to send to the client only lines, that\n * have given substring. */\n searchStr?: string,\n ): Promise<StreamingApiResponse>;\n\n readText(\n /** A handle that was issued previously. */\n handle: AnyLogHandle,\n\n /** Allows client to limit total data sent from server. */\n lineCount: number,\n\n /** Makes streamer to perform seek operation to given offset before sending the contents.\n * Client can just use the <new_offset> value of the last response from server to continue streaming after reconnection.\n * If undefined of 0, then starts from the beginning. */\n offsetBytes?: number,\n\n /** Is substring for line search pattern.\n * This option makes controller to send to the client only lines, that\n * have given substring. */\n searchStr?: string,\n ): Promise<StreamingApiResponse>;\n}\n\n/** Response of the driver.\n * The caller should give a handle to retrieve it.\n * It can be OK or outdated, in which case the handle\n * should be issued again. */\nexport type StreamingApiResponse = StreamingApiResponseOk | StreamingApiResponseHandleOutdated;\n\nexport type StreamingApiResponseOk = {\n /** The handle don't have to be updated,\n * the response is OK. */\n shouldUpdateHandle: false;\n\n /** Whether the log can still grow or it's in a final state. */\n live: boolean;\n\n /** Data of the response, in bytes. */\n data: Uint8Array;\n /** Current size of the file. It can grow if it's still live. */\n size: number;\n /** Offset in bytes from the beginning of a file. */\n newOffset: number;\n};\n\n/** The handle should be issued again, this one is done. */\nexport type StreamingApiResponseHandleOutdated = {\n shouldUpdateHandle: true;\n};\n\nexport type ProgressLogWithInfo = {\n progressLine?: string;\n live: boolean;\n};\n"],"mappings":";;AAGA,MAAM,kBAAkB;AACxB,MAAM,mBAAmB;;AAezB,SAAgB,eAAe,OAAuC;AACpE,QACE,OAAO,UAAU,aAChB,MAAM,WAAW,gBAAgB,IAAI,MAAM,WAAW,iBAAiB;;;AAK5E,SAAgB,UAAU,QAA2D;AACnF,QAAO,WAAW,KAAA,KAAa,OAAO,WAAW,gBAAgB"}
|
package/dist/drivers/log.d.ts
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
|
+
import { Branded } from "../branding.js";
|
|
2
|
+
|
|
1
3
|
//#region src/drivers/log.d.ts
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
/** Prefix constants — single source of truth for handle format. */
|
|
5
|
+
declare const LIVE_LOG_PREFIX = "log+live://log/";
|
|
6
|
+
declare const READY_LOG_PREFIX = "log+ready://log/";
|
|
5
7
|
/** Handle of the live logs of a program.
|
|
6
8
|
* The resource that represents a log can be deleted,
|
|
7
9
|
* in this case the handle should be refreshed. */
|
|
8
|
-
type LiveLogHandle =
|
|
10
|
+
type LiveLogHandle = Branded<`${typeof LIVE_LOG_PREFIX}${string}`, "LiveLogHandle">;
|
|
9
11
|
/** Handle of the ready logs of a program. */
|
|
10
|
-
type ReadyLogHandle =
|
|
11
|
-
/**
|
|
12
|
+
type ReadyLogHandle = Branded<`${typeof READY_LOG_PREFIX}${string}`, "ReadyLogHandle">;
|
|
13
|
+
/** Handle of logs. This handle should be passed
|
|
14
|
+
* to the driver for retrieving logs. */
|
|
15
|
+
type AnyLogHandle = LiveLogHandle | ReadyLogHandle;
|
|
16
|
+
/** Type guard to check if a value is any kind of log handle. */
|
|
17
|
+
declare function isAnyLogHandle(value: unknown): value is AnyLogHandle;
|
|
18
|
+
/** Type guard to check if log is live, and corresponding process is not finished. */
|
|
12
19
|
declare function isLiveLog(handle: AnyLogHandle | undefined): handle is LiveLogHandle;
|
|
13
20
|
/** Driver to retrieve logs given log handle */
|
|
14
21
|
interface LogsDriver {
|
|
@@ -66,5 +73,5 @@ type ProgressLogWithInfo = {
|
|
|
66
73
|
live: boolean;
|
|
67
74
|
};
|
|
68
75
|
//#endregion
|
|
69
|
-
export { AnyLogHandle, LiveLogHandle, LogsDriver, ProgressLogWithInfo, ReadyLogHandle, StreamingApiResponse, StreamingApiResponseHandleOutdated, StreamingApiResponseOk, isLiveLog };
|
|
76
|
+
export { AnyLogHandle, LiveLogHandle, LogsDriver, ProgressLogWithInfo, ReadyLogHandle, StreamingApiResponse, StreamingApiResponseHandleOutdated, StreamingApiResponseOk, isAnyLogHandle, isLiveLog };
|
|
70
77
|
//# sourceMappingURL=log.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.d.ts","names":[],"sources":["../../src/drivers/log.ts"],"mappings":";;;;cAGM,eAAA;AAAA,cACA,gBAAA;;;;KAKM,aAAA,GAAgB,OAAA,WAAkB,eAAA;AANzB;AAAA,KAST,cAAA,GAAiB,OAAA,WAAkB,gBAAA;;;KAInC,YAAA,GAAe,aAAA,GAAgB,cAAA;AAP3C;AAAA,iBAUgB,cAAA,CAAe,KAAA,YAAiB,KAAA,IAAS,YAAA;;iBAQzC,SAAA,CAAU,MAAA,EAAQ,YAAA,eAA2B,MAAA,IAAU,aAAA;;UAKtD,UAAA;EACf,SAAA;;EAEE,MAAA,EAAQ,YAAA,EAvBmD;;EA0B3D,SAAA;EAtBoB;;;;EA2BpB,WAAA;EAxBY;;;;EA6BZ,SAAA,YACC,OAAA,CAAQ,oBAAA;EAEX,QAAA,CAhC8C;;EAkC5C,MAAA,EAAQ,YAAA,EAlCyD;;EAqCjE,SAAA;EA7BY;;;;EAkCZ,WAAA;EAlC8B;;;;EAuC9B,SAAA,YACC,OAAA,CAAQ,oBAAA;AAAA;;AAnCb;;;KA0CY,oBAAA,GAAuB,sBAAA,GAAyB,kCAAA;AAAA,KAEhD,sBAAA;EA3BP;;EA8BH,kBAAA,SAZG;EAeH,IAAA,WAfU;EAkBV,IAAA,EAAM,UAAA,EAlDI;EAoDV,IAAA,UAjDE;EAmDF,SAAA;AAAA;;KAIU,kCAAA;EACV,kBAAA;AAAA;AAAA,KAGU,mBAAA;EACV,YAAA;EACA,IAAA;AAAA"}
|
package/dist/drivers/log.js
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
//#region src/drivers/log.ts
|
|
2
|
-
/**
|
|
2
|
+
/** Prefix constants — single source of truth for handle format. */
|
|
3
|
+
const LIVE_LOG_PREFIX = "log+live://log/";
|
|
4
|
+
const READY_LOG_PREFIX = "log+ready://log/";
|
|
5
|
+
/** Type guard to check if a value is any kind of log handle. */
|
|
6
|
+
function isAnyLogHandle(value) {
|
|
7
|
+
return typeof value === "string" && (value.startsWith(LIVE_LOG_PREFIX) || value.startsWith(READY_LOG_PREFIX));
|
|
8
|
+
}
|
|
9
|
+
/** Type guard to check if log is live, and corresponding process is not finished. */
|
|
3
10
|
function isLiveLog(handle) {
|
|
4
|
-
return handle !== void 0 && handle.startsWith(
|
|
11
|
+
return handle !== void 0 && handle.startsWith(LIVE_LOG_PREFIX);
|
|
5
12
|
}
|
|
6
|
-
|
|
7
13
|
//#endregion
|
|
8
|
-
export { isLiveLog };
|
|
14
|
+
export { isAnyLogHandle, isLiveLog };
|
|
15
|
+
|
|
9
16
|
//# sourceMappingURL=log.js.map
|
package/dist/drivers/log.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.js","names":[],"sources":["../../src/drivers/log.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"log.js","names":[],"sources":["../../src/drivers/log.ts"],"sourcesContent":["import type { Branded } from \"../branding\";\n\n/** Prefix constants — single source of truth for handle format. */\nconst LIVE_LOG_PREFIX = \"log+live://log/\";\nconst READY_LOG_PREFIX = \"log+ready://log/\";\n\n/** Handle of the live logs of a program.\n * The resource that represents a log can be deleted,\n * in this case the handle should be refreshed. */\nexport type LiveLogHandle = Branded<`${typeof LIVE_LOG_PREFIX}${string}`, \"LiveLogHandle\">;\n\n/** Handle of the ready logs of a program. */\nexport type ReadyLogHandle = Branded<`${typeof READY_LOG_PREFIX}${string}`, \"ReadyLogHandle\">;\n\n/** Handle of logs. This handle should be passed\n * to the driver for retrieving logs. */\nexport type AnyLogHandle = LiveLogHandle | ReadyLogHandle;\n\n/** Type guard to check if a value is any kind of log handle. */\nexport function isAnyLogHandle(value: unknown): value is AnyLogHandle {\n return (\n typeof value === \"string\" &&\n (value.startsWith(LIVE_LOG_PREFIX) || value.startsWith(READY_LOG_PREFIX))\n );\n}\n\n/** Type guard to check if log is live, and corresponding process is not finished. */\nexport function isLiveLog(handle: AnyLogHandle | undefined): handle is LiveLogHandle {\n return handle !== undefined && handle.startsWith(LIVE_LOG_PREFIX);\n}\n\n/** Driver to retrieve logs given log handle */\nexport interface LogsDriver {\n lastLines(\n /** A handle that was issued previously. */\n handle: AnyLogHandle,\n\n /** Allows client to limit total data sent from server. */\n lineCount: number,\n\n /** Makes streamer to perform seek operation to given offset before sending the contents.\n * Client can just use the <new_offset> value of the last response from server to continue streaming after reconnection.\n * If undefined, then starts from the end. */\n offsetBytes?: number,\n\n /** Is substring for line search pattern.\n * This option makes controller to send to the client only lines, that\n * have given substring. */\n searchStr?: string,\n ): Promise<StreamingApiResponse>;\n\n readText(\n /** A handle that was issued previously. */\n handle: AnyLogHandle,\n\n /** Allows client to limit total data sent from server. */\n lineCount: number,\n\n /** Makes streamer to perform seek operation to given offset before sending the contents.\n * Client can just use the <new_offset> value of the last response from server to continue streaming after reconnection.\n * If undefined of 0, then starts from the beginning. */\n offsetBytes?: number,\n\n /** Is substring for line search pattern.\n * This option makes controller to send to the client only lines, that\n * have given substring. */\n searchStr?: string,\n ): Promise<StreamingApiResponse>;\n}\n\n/** Response of the driver.\n * The caller should give a handle to retrieve it.\n * It can be OK or outdated, in which case the handle\n * should be issued again. */\nexport type StreamingApiResponse = StreamingApiResponseOk | StreamingApiResponseHandleOutdated;\n\nexport type StreamingApiResponseOk = {\n /** The handle don't have to be updated,\n * the response is OK. */\n shouldUpdateHandle: false;\n\n /** Whether the log can still grow or it's in a final state. */\n live: boolean;\n\n /** Data of the response, in bytes. */\n data: Uint8Array;\n /** Current size of the file. It can grow if it's still live. */\n size: number;\n /** Offset in bytes from the beginning of a file. */\n newOffset: number;\n};\n\n/** The handle should be issued again, this one is done. */\nexport type StreamingApiResponseHandleOutdated = {\n shouldUpdateHandle: true;\n};\n\nexport type ProgressLogWithInfo = {\n progressLine?: string;\n live: boolean;\n};\n"],"mappings":";;AAGA,MAAM,kBAAkB;AACxB,MAAM,mBAAmB;;AAezB,SAAgB,eAAe,OAAuC;AACpE,QACE,OAAO,UAAU,aAChB,MAAM,WAAW,gBAAgB,IAAI,MAAM,WAAW,iBAAiB;;;AAK5E,SAAgB,UAAU,QAA2D;AACnF,QAAO,WAAW,KAAA,KAAa,OAAO,WAAW,gBAAgB"}
|
package/dist/drivers/ls.cjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
const require_util = require(
|
|
2
|
-
|
|
1
|
+
const require_util = require("../util.cjs");
|
|
3
2
|
//#region src/drivers/ls.ts
|
|
4
3
|
const uploadPrefix = "upload://upload/";
|
|
5
4
|
const indexPrefix = "index://index/";
|
|
@@ -27,10 +26,10 @@ function extractFileName(filePath) {
|
|
|
27
26
|
function getFileNameFromHandle(handle) {
|
|
28
27
|
return extractFileName(getFilePathFromHandle(handle));
|
|
29
28
|
}
|
|
30
|
-
|
|
31
29
|
//#endregion
|
|
32
30
|
exports.getFileNameFromHandle = getFileNameFromHandle;
|
|
33
31
|
exports.getFilePathFromHandle = getFilePathFromHandle;
|
|
34
32
|
exports.isImportFileHandleIndex = isImportFileHandleIndex;
|
|
35
33
|
exports.isImportFileHandleUpload = isImportFileHandleUpload;
|
|
34
|
+
|
|
36
35
|
//# sourceMappingURL=ls.cjs.map
|
package/dist/drivers/ls.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ls.cjs","names":[],"sources":["../../src/drivers/ls.ts"],"sourcesContent":["import { assertNever } from \"../util\";\nimport type { Branded } from \"../branding\";\nimport type { TableRange } from \"./pframe\";\nimport type { FileLike } from \"./interfaces\";\n\nconst uploadPrefix = \"upload://upload/\";\nconst indexPrefix = \"index://index/\";\n\nexport type ImportFileHandleUpload = `upload://upload/${string}`;\nexport type ImportFileHandleIndex = `index://index/${string}`;\n\nexport type ImportFileHandle = ImportFileHandleUpload | ImportFileHandleIndex;\n\nexport type LocalImportFileHandle = Branded<ImportFileHandle, \"Local\">;\n\nexport function isImportFileHandleUpload(\n handle: ImportFileHandle,\n): handle is ImportFileHandleUpload {\n return handle.startsWith(uploadPrefix);\n}\n\nexport function isImportFileHandleIndex(handle: ImportFileHandle): handle is ImportFileHandleIndex {\n return handle.startsWith(indexPrefix);\n}\n\n/** Results in upload */\nexport type StorageHandleLocal = `local://${string}`;\n\n/** Results in index */\nexport type StorageHandleRemote = `remote://${string}`;\n\nexport type StorageHandle = StorageHandleLocal | StorageHandleRemote;\n\nexport type StorageEntry = {\n name: string;\n handle: StorageHandle;\n initialFullPath: string;\n\n // TODO\n // pathStartsWithDisk\n};\n\nexport type ListFilesResult = {\n parent?: string;\n entries: LsEntry[];\n};\n\nexport type LsEntry =\n | {\n type: \"dir\";\n name: string;\n fullPath: string;\n }\n | {\n type: \"file\";\n name: string;\n fullPath: string;\n\n /** This handle should be set to args... */\n handle: ImportFileHandle;\n };\n\nexport type OpenDialogFilter = {\n /** Human-readable file type name */\n readonly name: string;\n /** File extensions */\n readonly extensions: string[];\n};\n\nexport type OpenDialogOps = {\n /** Open dialog window title */\n readonly title?: string;\n /** Custom label for the confirmation button, when left empty the default label will be used. */\n readonly buttonLabel?: string;\n /** Limits of file types user can select */\n readonly filters?: OpenDialogFilter[];\n};\n\nexport type OpenSingleFileResponse = {\n /** Contains local file handle, allowing file importing or content reading. If user canceled\n * the dialog, field will be undefined. */\n readonly file?: LocalImportFileHandle;\n};\n\nexport type OpenMultipleFilesResponse = {\n /** Contains local file handles, allowing file importing or content reading. If user canceled\n * the dialog, field will be undefined. */\n readonly files?: LocalImportFileHandle[];\n};\n\n/** Can be used to limit request for local file content to a certain bytes range */\nexport type FileRange = {\n /** From byte index (inclusive) */\n readonly from: number;\n /** To byte index (exclusive) */\n readonly to: number;\n};\n\nexport interface LsDriver {\n /** remote and local storages */\n getStorageList(): Promise<StorageEntry[]>;\n\n listFiles(storage: StorageHandle, fullPath: string): Promise<ListFilesResult>;\n\n /** Opens system file open dialog allowing to select single file and awaits user action */\n showOpenSingleFileDialog(ops: OpenDialogOps): Promise<OpenSingleFileResponse>;\n\n /** Opens system file open dialog allowing to multiple files and awaits user action */\n showOpenMultipleFilesDialog(ops: OpenDialogOps): Promise<OpenMultipleFilesResponse>;\n\n /** Given a handle to a local file, allows to get file size */\n getLocalFileSize(file: LocalImportFileHandle): Promise<number>;\n\n /** Given a handle to a local file, allows to get its content */\n getLocalFileContent(file: LocalImportFileHandle, range?: TableRange): Promise<Uint8Array>;\n\n /**\n * Resolves browser's File object into platforma's import file handle.\n *\n * This method is useful among other things for implementation of UI\n * components, that handle file Drag&Drop.\n * */\n fileToImportHandle(file: FileLike): Promise<ImportFileHandle>;\n\n /** Saves currently opened block webview as a PDF. */\n exportToPdf?(): Promise<void>;\n}\n\n/** Gets a file path from an import handle. */\nexport function getFilePathFromHandle(handle: ImportFileHandle): string {\n if (isImportFileHandleIndex(handle)) {\n const trimmed = handle.slice(indexPrefix.length);\n const data = JSON.parse(decodeURIComponent(trimmed)) as { path: string };\n return data.path;\n } else if (isImportFileHandleUpload(handle)) {\n const trimmed = handle.slice(uploadPrefix.length);\n const data = JSON.parse(decodeURIComponent(trimmed)) as { localPath: string };\n return data.localPath;\n }\n\n assertNever(handle);\n}\n\nfunction extractFileName(filePath: string) {\n return filePath.replace(/^.*[\\\\/]/, \"\");\n}\n\n/** Gets a file name from an import handle. */\nexport function getFileNameFromHandle(handle: ImportFileHandle): string {\n return extractFileName(getFilePathFromHandle(handle));\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ls.cjs","names":[],"sources":["../../src/drivers/ls.ts"],"sourcesContent":["import { assertNever } from \"../util\";\nimport type { Branded } from \"../branding\";\nimport type { TableRange } from \"./pframe\";\nimport type { FileLike } from \"./interfaces\";\n\nconst uploadPrefix = \"upload://upload/\";\nconst indexPrefix = \"index://index/\";\n\nexport type ImportFileHandleUpload = `upload://upload/${string}`;\nexport type ImportFileHandleIndex = `index://index/${string}`;\n\nexport type ImportFileHandle = ImportFileHandleUpload | ImportFileHandleIndex;\n\nexport type LocalImportFileHandle = Branded<ImportFileHandle, \"Local\">;\n\nexport function isImportFileHandleUpload(\n handle: ImportFileHandle,\n): handle is ImportFileHandleUpload {\n return handle.startsWith(uploadPrefix);\n}\n\nexport function isImportFileHandleIndex(handle: ImportFileHandle): handle is ImportFileHandleIndex {\n return handle.startsWith(indexPrefix);\n}\n\n/** Results in upload */\nexport type StorageHandleLocal = `local://${string}`;\n\n/** Results in index */\nexport type StorageHandleRemote = `remote://${string}`;\n\nexport type StorageHandle = StorageHandleLocal | StorageHandleRemote;\n\nexport type StorageEntry = {\n name: string;\n handle: StorageHandle;\n initialFullPath: string;\n\n // TODO\n // pathStartsWithDisk\n};\n\nexport type ListFilesResult = {\n parent?: string;\n entries: LsEntry[];\n};\n\nexport type LsEntry =\n | {\n type: \"dir\";\n name: string;\n fullPath: string;\n }\n | {\n type: \"file\";\n name: string;\n fullPath: string;\n\n /** This handle should be set to args... */\n handle: ImportFileHandle;\n };\n\nexport type OpenDialogFilter = {\n /** Human-readable file type name */\n readonly name: string;\n /** File extensions */\n readonly extensions: string[];\n};\n\nexport type OpenDialogOps = {\n /** Open dialog window title */\n readonly title?: string;\n /** Custom label for the confirmation button, when left empty the default label will be used. */\n readonly buttonLabel?: string;\n /** Limits of file types user can select */\n readonly filters?: OpenDialogFilter[];\n};\n\nexport type OpenSingleFileResponse = {\n /** Contains local file handle, allowing file importing or content reading. If user canceled\n * the dialog, field will be undefined. */\n readonly file?: LocalImportFileHandle;\n};\n\nexport type OpenMultipleFilesResponse = {\n /** Contains local file handles, allowing file importing or content reading. If user canceled\n * the dialog, field will be undefined. */\n readonly files?: LocalImportFileHandle[];\n};\n\n/** Can be used to limit request for local file content to a certain bytes range */\nexport type FileRange = {\n /** From byte index (inclusive) */\n readonly from: number;\n /** To byte index (exclusive) */\n readonly to: number;\n};\n\nexport interface LsDriver {\n /** remote and local storages */\n getStorageList(): Promise<StorageEntry[]>;\n\n listFiles(storage: StorageHandle, fullPath: string): Promise<ListFilesResult>;\n\n /** Opens system file open dialog allowing to select single file and awaits user action */\n showOpenSingleFileDialog(ops: OpenDialogOps): Promise<OpenSingleFileResponse>;\n\n /** Opens system file open dialog allowing to multiple files and awaits user action */\n showOpenMultipleFilesDialog(ops: OpenDialogOps): Promise<OpenMultipleFilesResponse>;\n\n /** Given a handle to a local file, allows to get file size */\n getLocalFileSize(file: LocalImportFileHandle): Promise<number>;\n\n /** Given a handle to a local file, allows to get its content */\n getLocalFileContent(file: LocalImportFileHandle, range?: TableRange): Promise<Uint8Array>;\n\n /**\n * Resolves browser's File object into platforma's import file handle.\n *\n * This method is useful among other things for implementation of UI\n * components, that handle file Drag&Drop.\n * */\n fileToImportHandle(file: FileLike): Promise<ImportFileHandle>;\n\n /** Saves currently opened block webview as a PDF. */\n exportToPdf?(): Promise<void>;\n}\n\n/** Gets a file path from an import handle. */\nexport function getFilePathFromHandle(handle: ImportFileHandle): string {\n if (isImportFileHandleIndex(handle)) {\n const trimmed = handle.slice(indexPrefix.length);\n const data = JSON.parse(decodeURIComponent(trimmed)) as { path: string };\n return data.path;\n } else if (isImportFileHandleUpload(handle)) {\n const trimmed = handle.slice(uploadPrefix.length);\n const data = JSON.parse(decodeURIComponent(trimmed)) as { localPath: string };\n return data.localPath;\n }\n\n assertNever(handle);\n}\n\nfunction extractFileName(filePath: string) {\n return filePath.replace(/^.*[\\\\/]/, \"\");\n}\n\n/** Gets a file name from an import handle. */\nexport function getFileNameFromHandle(handle: ImportFileHandle): string {\n return extractFileName(getFilePathFromHandle(handle));\n}\n"],"mappings":";;AAKA,MAAM,eAAe;AACrB,MAAM,cAAc;AASpB,SAAgB,yBACd,QACkC;AAClC,QAAO,OAAO,WAAW,aAAa;;AAGxC,SAAgB,wBAAwB,QAA2D;AACjG,QAAO,OAAO,WAAW,YAAY;;;AA2GvC,SAAgB,sBAAsB,QAAkC;AACtE,KAAI,wBAAwB,OAAO,EAAE;EACnC,MAAM,UAAU,OAAO,MAAM,GAAmB;AAEhD,SADa,KAAK,MAAM,mBAAmB,QAAQ,CAAC,CACxC;YACH,yBAAyB,OAAO,EAAE;EAC3C,MAAM,UAAU,OAAO,MAAM,GAAoB;AAEjD,SADa,KAAK,MAAM,mBAAmB,QAAQ,CAAC,CACxC;;AAGd,cAAA,YAAY,OAAO;;AAGrB,SAAS,gBAAgB,UAAkB;AACzC,QAAO,SAAS,QAAQ,YAAY,GAAG;;;AAIzC,SAAgB,sBAAsB,QAAkC;AACtE,QAAO,gBAAgB,sBAAsB,OAAO,CAAC"}
|
package/dist/drivers/ls.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Branded } from "../branding.js";
|
|
2
2
|
import { FileLike } from "./interfaces.js";
|
|
3
3
|
import { TableRange } from "./pframe/data_types.js";
|
|
4
|
-
import "./pframe/index.js";
|
|
5
|
-
|
|
6
4
|
//#region src/drivers/ls.d.ts
|
|
7
5
|
type ImportFileHandleUpload = `upload://upload/${string}`;
|
|
8
6
|
type ImportFileHandleIndex = `index://index/${string}`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ls.d.ts","names":[],"sources":["../../src/drivers/ls.ts"],"mappings":";;;;KAQY,sBAAA;AAAA,KACA,qBAAA;AAAA,KAEA,gBAAA,GAAmB,sBAAA,GAAyB,qBAAA;AAAA,KAE5C,qBAAA,GAAwB,OAAA,CAAQ,gBAAA;AAAA,iBAE5B,wBAAA,CACd,MAAA,EAAQ,gBAAA,GACP,MAAA,IAAU,sBAAA;AAAA,iBAIG,uBAAA,CAAwB,MAAA,EAAQ,gBAAA,GAAmB,MAAA,IAAU,qBAAA;;KAKjE,kBAAA;AAjBZ;AAAA,KAoBY,mBAAA;AAAA,KAEA,aAAA,GAAgB,kBAAA,GAAqB,mBAAA;AAAA,KAErC,YAAA;EACV,IAAA;EACA,MAAA,EAAQ,aAAA;EACR,eAAA;AAAA;AAAA,KAMU,eAAA;EACV,MAAA;EACA,OAAA,EAAS,OAAA;AAAA;AAAA,KAGC,OAAA;EAEN,IAAA;EACA,IAAA;EACA,QAAA;AAAA;EAGA,IAAA;EACA,IAAA;EACA,QAAA,UAxCJ;EA2CI,MAAA,EAAQ,gBAAA;AAAA;AAAA,KAGF,gBAAA;EA7CuB,6CA+CxB,IAAA,UA3C4B;EAAA,SA6C5B,UAAA;AAAA;AAAA,KAGC,aAAA;EAhD4B,wCAkD7B,KAAA,WAlDkE;EAAA,SAoDlE,WAAA,WApDuF;EAAA,SAsDvF,OAAA,GAAU,gBAAA;AAAA;AAAA,KAGT,sBAAA;EApDkB;;EAAA,SAuDnB,IAAA,GAAO,qBAAA;AAAA;AAAA,KAGN,yBAAA;EAvDmB;;EAAA,SA0DpB,KAAA,GAAQ,qBAAA;AAAA;;KAIP,SAAA;EA5DwD,2CA8DzD,IAAA,UA5Da;EAAA,SA8Db,EAAA;AAAA;AAAA,UAGM,QAAA;EA/Df;EAiEA,cAAA,IAAkB,OAAA,CAAQ,YAAA;EAE1B,SAAA,CAAU,OAAA,EAAS,aAAA,EAAe,QAAA,WAAmB,OAAA,CAAQ,eAAA;EAlE9C;EAqEf,wBAAA,CAAyB,GAAA,EAAK,aAAA,GAAgB,OAAA,CAAQ,sBAAA;EA/D5C;EAkEV,2BAAA,CAA4B,GAAA,EAAK,aAAA,GAAgB,OAAA,CAAQ,yBAAA;;EAGzD,gBAAA,CAAiB,IAAA,EAAM,qBAAA,GAAwB,OAAA;EApE/C;EAuEA,mBAAA,CAAoB,IAAA,EAAM,qBAAA,EAAuB,KAAA,GAAQ,UAAA,GAAa,OAAA,CAAQ,UAAA;EAtErE;;;AAGX;;;EA2EE,kBAAA,CAAmB,IAAA,EAAM,QAAA,GAAW,OAAA,CAAQ,gBAAA;EAzExC;EA4EJ,WAAA,KAAgB,OAAA;AAAA;;iBAIF,qBAAA,CAAsB,MAAA,EAAQ,gBAAA;;iBAmB9B,qBAAA,CAAsB,MAAA,EAAQ,gBAAA"}
|
package/dist/drivers/ls.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { assertNever } from "../util.js";
|
|
2
|
-
|
|
3
2
|
//#region src/drivers/ls.ts
|
|
4
3
|
const uploadPrefix = "upload://upload/";
|
|
5
4
|
const indexPrefix = "index://index/";
|
|
@@ -27,7 +26,7 @@ function extractFileName(filePath) {
|
|
|
27
26
|
function getFileNameFromHandle(handle) {
|
|
28
27
|
return extractFileName(getFilePathFromHandle(handle));
|
|
29
28
|
}
|
|
30
|
-
|
|
31
29
|
//#endregion
|
|
32
30
|
export { getFileNameFromHandle, getFilePathFromHandle, isImportFileHandleIndex, isImportFileHandleUpload };
|
|
31
|
+
|
|
33
32
|
//# sourceMappingURL=ls.js.map
|
package/dist/drivers/ls.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ls.js","names":[],"sources":["../../src/drivers/ls.ts"],"sourcesContent":["import { assertNever } from \"../util\";\nimport type { Branded } from \"../branding\";\nimport type { TableRange } from \"./pframe\";\nimport type { FileLike } from \"./interfaces\";\n\nconst uploadPrefix = \"upload://upload/\";\nconst indexPrefix = \"index://index/\";\n\nexport type ImportFileHandleUpload = `upload://upload/${string}`;\nexport type ImportFileHandleIndex = `index://index/${string}`;\n\nexport type ImportFileHandle = ImportFileHandleUpload | ImportFileHandleIndex;\n\nexport type LocalImportFileHandle = Branded<ImportFileHandle, \"Local\">;\n\nexport function isImportFileHandleUpload(\n handle: ImportFileHandle,\n): handle is ImportFileHandleUpload {\n return handle.startsWith(uploadPrefix);\n}\n\nexport function isImportFileHandleIndex(handle: ImportFileHandle): handle is ImportFileHandleIndex {\n return handle.startsWith(indexPrefix);\n}\n\n/** Results in upload */\nexport type StorageHandleLocal = `local://${string}`;\n\n/** Results in index */\nexport type StorageHandleRemote = `remote://${string}`;\n\nexport type StorageHandle = StorageHandleLocal | StorageHandleRemote;\n\nexport type StorageEntry = {\n name: string;\n handle: StorageHandle;\n initialFullPath: string;\n\n // TODO\n // pathStartsWithDisk\n};\n\nexport type ListFilesResult = {\n parent?: string;\n entries: LsEntry[];\n};\n\nexport type LsEntry =\n | {\n type: \"dir\";\n name: string;\n fullPath: string;\n }\n | {\n type: \"file\";\n name: string;\n fullPath: string;\n\n /** This handle should be set to args... */\n handle: ImportFileHandle;\n };\n\nexport type OpenDialogFilter = {\n /** Human-readable file type name */\n readonly name: string;\n /** File extensions */\n readonly extensions: string[];\n};\n\nexport type OpenDialogOps = {\n /** Open dialog window title */\n readonly title?: string;\n /** Custom label for the confirmation button, when left empty the default label will be used. */\n readonly buttonLabel?: string;\n /** Limits of file types user can select */\n readonly filters?: OpenDialogFilter[];\n};\n\nexport type OpenSingleFileResponse = {\n /** Contains local file handle, allowing file importing or content reading. If user canceled\n * the dialog, field will be undefined. */\n readonly file?: LocalImportFileHandle;\n};\n\nexport type OpenMultipleFilesResponse = {\n /** Contains local file handles, allowing file importing or content reading. If user canceled\n * the dialog, field will be undefined. */\n readonly files?: LocalImportFileHandle[];\n};\n\n/** Can be used to limit request for local file content to a certain bytes range */\nexport type FileRange = {\n /** From byte index (inclusive) */\n readonly from: number;\n /** To byte index (exclusive) */\n readonly to: number;\n};\n\nexport interface LsDriver {\n /** remote and local storages */\n getStorageList(): Promise<StorageEntry[]>;\n\n listFiles(storage: StorageHandle, fullPath: string): Promise<ListFilesResult>;\n\n /** Opens system file open dialog allowing to select single file and awaits user action */\n showOpenSingleFileDialog(ops: OpenDialogOps): Promise<OpenSingleFileResponse>;\n\n /** Opens system file open dialog allowing to multiple files and awaits user action */\n showOpenMultipleFilesDialog(ops: OpenDialogOps): Promise<OpenMultipleFilesResponse>;\n\n /** Given a handle to a local file, allows to get file size */\n getLocalFileSize(file: LocalImportFileHandle): Promise<number>;\n\n /** Given a handle to a local file, allows to get its content */\n getLocalFileContent(file: LocalImportFileHandle, range?: TableRange): Promise<Uint8Array>;\n\n /**\n * Resolves browser's File object into platforma's import file handle.\n *\n * This method is useful among other things for implementation of UI\n * components, that handle file Drag&Drop.\n * */\n fileToImportHandle(file: FileLike): Promise<ImportFileHandle>;\n\n /** Saves currently opened block webview as a PDF. */\n exportToPdf?(): Promise<void>;\n}\n\n/** Gets a file path from an import handle. */\nexport function getFilePathFromHandle(handle: ImportFileHandle): string {\n if (isImportFileHandleIndex(handle)) {\n const trimmed = handle.slice(indexPrefix.length);\n const data = JSON.parse(decodeURIComponent(trimmed)) as { path: string };\n return data.path;\n } else if (isImportFileHandleUpload(handle)) {\n const trimmed = handle.slice(uploadPrefix.length);\n const data = JSON.parse(decodeURIComponent(trimmed)) as { localPath: string };\n return data.localPath;\n }\n\n assertNever(handle);\n}\n\nfunction extractFileName(filePath: string) {\n return filePath.replace(/^.*[\\\\/]/, \"\");\n}\n\n/** Gets a file name from an import handle. */\nexport function getFileNameFromHandle(handle: ImportFileHandle): string {\n return extractFileName(getFilePathFromHandle(handle));\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ls.js","names":[],"sources":["../../src/drivers/ls.ts"],"sourcesContent":["import { assertNever } from \"../util\";\nimport type { Branded } from \"../branding\";\nimport type { TableRange } from \"./pframe\";\nimport type { FileLike } from \"./interfaces\";\n\nconst uploadPrefix = \"upload://upload/\";\nconst indexPrefix = \"index://index/\";\n\nexport type ImportFileHandleUpload = `upload://upload/${string}`;\nexport type ImportFileHandleIndex = `index://index/${string}`;\n\nexport type ImportFileHandle = ImportFileHandleUpload | ImportFileHandleIndex;\n\nexport type LocalImportFileHandle = Branded<ImportFileHandle, \"Local\">;\n\nexport function isImportFileHandleUpload(\n handle: ImportFileHandle,\n): handle is ImportFileHandleUpload {\n return handle.startsWith(uploadPrefix);\n}\n\nexport function isImportFileHandleIndex(handle: ImportFileHandle): handle is ImportFileHandleIndex {\n return handle.startsWith(indexPrefix);\n}\n\n/** Results in upload */\nexport type StorageHandleLocal = `local://${string}`;\n\n/** Results in index */\nexport type StorageHandleRemote = `remote://${string}`;\n\nexport type StorageHandle = StorageHandleLocal | StorageHandleRemote;\n\nexport type StorageEntry = {\n name: string;\n handle: StorageHandle;\n initialFullPath: string;\n\n // TODO\n // pathStartsWithDisk\n};\n\nexport type ListFilesResult = {\n parent?: string;\n entries: LsEntry[];\n};\n\nexport type LsEntry =\n | {\n type: \"dir\";\n name: string;\n fullPath: string;\n }\n | {\n type: \"file\";\n name: string;\n fullPath: string;\n\n /** This handle should be set to args... */\n handle: ImportFileHandle;\n };\n\nexport type OpenDialogFilter = {\n /** Human-readable file type name */\n readonly name: string;\n /** File extensions */\n readonly extensions: string[];\n};\n\nexport type OpenDialogOps = {\n /** Open dialog window title */\n readonly title?: string;\n /** Custom label for the confirmation button, when left empty the default label will be used. */\n readonly buttonLabel?: string;\n /** Limits of file types user can select */\n readonly filters?: OpenDialogFilter[];\n};\n\nexport type OpenSingleFileResponse = {\n /** Contains local file handle, allowing file importing or content reading. If user canceled\n * the dialog, field will be undefined. */\n readonly file?: LocalImportFileHandle;\n};\n\nexport type OpenMultipleFilesResponse = {\n /** Contains local file handles, allowing file importing or content reading. If user canceled\n * the dialog, field will be undefined. */\n readonly files?: LocalImportFileHandle[];\n};\n\n/** Can be used to limit request for local file content to a certain bytes range */\nexport type FileRange = {\n /** From byte index (inclusive) */\n readonly from: number;\n /** To byte index (exclusive) */\n readonly to: number;\n};\n\nexport interface LsDriver {\n /** remote and local storages */\n getStorageList(): Promise<StorageEntry[]>;\n\n listFiles(storage: StorageHandle, fullPath: string): Promise<ListFilesResult>;\n\n /** Opens system file open dialog allowing to select single file and awaits user action */\n showOpenSingleFileDialog(ops: OpenDialogOps): Promise<OpenSingleFileResponse>;\n\n /** Opens system file open dialog allowing to multiple files and awaits user action */\n showOpenMultipleFilesDialog(ops: OpenDialogOps): Promise<OpenMultipleFilesResponse>;\n\n /** Given a handle to a local file, allows to get file size */\n getLocalFileSize(file: LocalImportFileHandle): Promise<number>;\n\n /** Given a handle to a local file, allows to get its content */\n getLocalFileContent(file: LocalImportFileHandle, range?: TableRange): Promise<Uint8Array>;\n\n /**\n * Resolves browser's File object into platforma's import file handle.\n *\n * This method is useful among other things for implementation of UI\n * components, that handle file Drag&Drop.\n * */\n fileToImportHandle(file: FileLike): Promise<ImportFileHandle>;\n\n /** Saves currently opened block webview as a PDF. */\n exportToPdf?(): Promise<void>;\n}\n\n/** Gets a file path from an import handle. */\nexport function getFilePathFromHandle(handle: ImportFileHandle): string {\n if (isImportFileHandleIndex(handle)) {\n const trimmed = handle.slice(indexPrefix.length);\n const data = JSON.parse(decodeURIComponent(trimmed)) as { path: string };\n return data.path;\n } else if (isImportFileHandleUpload(handle)) {\n const trimmed = handle.slice(uploadPrefix.length);\n const data = JSON.parse(decodeURIComponent(trimmed)) as { localPath: string };\n return data.localPath;\n }\n\n assertNever(handle);\n}\n\nfunction extractFileName(filePath: string) {\n return filePath.replace(/^.*[\\\\/]/, \"\");\n}\n\n/** Gets a file name from an import handle. */\nexport function getFileNameFromHandle(handle: ImportFileHandle): string {\n return extractFileName(getFilePathFromHandle(handle));\n}\n"],"mappings":";;AAKA,MAAM,eAAe;AACrB,MAAM,cAAc;AASpB,SAAgB,yBACd,QACkC;AAClC,QAAO,OAAO,WAAW,aAAa;;AAGxC,SAAgB,wBAAwB,QAA2D;AACjG,QAAO,OAAO,WAAW,YAAY;;;AA2GvC,SAAgB,sBAAsB,QAAkC;AACtE,KAAI,wBAAwB,OAAO,EAAE;EACnC,MAAM,UAAU,OAAO,MAAM,GAAmB;AAEhD,SADa,KAAK,MAAM,mBAAmB,QAAQ,CAAC,CACxC;YACH,yBAAyB,OAAO,EAAE;EAC3C,MAAM,UAAU,OAAO,MAAM,GAAoB;AAEjD,SADa,KAAK,MAAM,mBAAmB,QAAQ,CAAC,CACxC;;AAGd,aAAY,OAAO;;AAGrB,SAAS,gBAAgB,UAAkB;AACzC,QAAO,SAAS,QAAQ,YAAY,GAAG;;;AAIzC,SAAgB,sBAAsB,QAAkC;AACtE,QAAO,gBAAgB,sBAAsB,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"column_filter.d.ts","names":[],"sources":["../../../src/drivers/pframe/column_filter.ts"],"mappings":";;;;UAGiB,YAAA;EAAA;;EAAA,SAGN,IAAA,GAAO,SAAA;EAAA;;EAAA,SAIP,IAAA;EAUoB;EAAA,SAPpB,WAAA,GAAc,MAAA;EAOY;EAAA,SAJ1B,eAAA,GAAkB,MAAA;EAVX;;EAAA,SAcP,iBAAA,GAAoB,MAAA;AAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
const require_util = require(
|
|
2
|
-
|
|
1
|
+
const require_util = require("../../util.cjs");
|
|
3
2
|
//#region src/drivers/pframe/data_info.ts
|
|
4
3
|
/**
|
|
5
4
|
* Type guard function that checks if the given value is a valid DataInfo.
|
|
@@ -220,7 +219,6 @@ function mapDataInfoEntries(dataInfoEntries, mapFn) {
|
|
|
220
219
|
};
|
|
221
220
|
}
|
|
222
221
|
}
|
|
223
|
-
|
|
224
222
|
//#endregion
|
|
225
223
|
exports.dataInfoToEntries = dataInfoToEntries;
|
|
226
224
|
exports.entriesToDataInfo = entriesToDataInfo;
|
|
@@ -230,4 +228,5 @@ exports.isPartitionedDataInfoEntries = isPartitionedDataInfoEntries;
|
|
|
230
228
|
exports.mapDataInfo = mapDataInfo;
|
|
231
229
|
exports.mapDataInfoEntries = mapDataInfoEntries;
|
|
232
230
|
exports.visitDataInfo = visitDataInfo;
|
|
231
|
+
|
|
233
232
|
//# sourceMappingURL=data_info.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data_info.cjs","names":[],"sources":["../../../src/drivers/pframe/data_info.ts"],"sourcesContent":["import { assertNever } from \"../../util\";\n\n/**\n * Represents a JavaScript representation of a value in a PColumn. Can be null, a number, or a string.\n * These are the primitive types that can be stored directly in PColumns.\n *\n * Note: Actual columns can hold more value types, which are converted to these JavaScript types\n * once they enter the JavaScript runtime.\n */\nexport type PColumnValue = null | number | string;\n\n/**\n * Represents a key for a PColumn value.\n * Can be an array of strings or numbers.\n */\nexport type PColumnKey = (number | string)[];\n\n/**\n * Represents a single entry in a PColumn's data structure.\n * Contains a key and a value.\n */\nexport type PColumnDataEntry<T> = {\n /** Key for the value */\n key: PColumnKey;\n\n /** Value / blob at the given key */\n value: T;\n};\n\n/**\n * Represents column data stored as a simple JSON structure.\n * Used for small datasets that can be efficiently stored directly in memory.\n */\nexport type JsonDataInfo = {\n /** Identifier for this data format ('Json') */\n type: \"Json\";\n\n /** Number of axes that make up the complete key (tuple length) */\n keyLength: number;\n\n /**\n * Key-value pairs where keys are stringified tuples of axis values\n * and values are the column values for those coordinates\n */\n data: Record<string, PColumnValue>;\n};\n\n/**\n * Represents column data partitioned across multiple JSON blobs.\n * Used for larger datasets that need to be split into manageable chunks.\n */\nexport type JsonPartitionedDataInfo<Blob> = {\n /** Identifier for this data format ('JsonPartitioned') */\n type: \"JsonPartitioned\";\n\n /** Number of leading axes used for partitioning */\n partitionKeyLength: number;\n\n /** Map of stringified partition keys to blob references */\n parts: Record<string, Blob>;\n};\n\n/**\n * Represents a binary format chunk containing index and values as separate blobs.\n * Used for efficient storage and retrieval of column data in binary format.\n */\nexport type BinaryChunk<Blob> = {\n /** Binary blob containing structured index information */\n index: Blob;\n\n /** Binary blob containing the actual values */\n values: Blob;\n};\n\n/**\n * Represents column data partitioned across multiple binary chunks.\n * Optimized for efficient storage and retrieval of large datasets.\n */\nexport type BinaryPartitionedDataInfo<Blob> = {\n /** Identifier for this data format ('BinaryPartitioned') */\n type: \"BinaryPartitioned\";\n\n /** Number of leading axes used for partitioning */\n partitionKeyLength: number;\n\n /** Map of stringified partition keys to binary chunks */\n parts: Record<string, BinaryChunk<Blob>>;\n};\n\nexport type ParquetChunkMappingAxis = {\n /** Data type (matches PColumn axis types) */\n type: \"Int\" | \"Long\" | \"String\";\n\n /** Field name in the Parquet file */\n id: string;\n};\n\nexport type ParquetChunkMappingColumn = {\n /** Data type (matches PColumn value type) */\n type: \"Int\" | \"Long\" | \"Float\" | \"Double\" | \"String\";\n\n /** Field name in the Parquet file */\n id: string;\n};\n\nexport type ParquetChunkMapping = {\n /** Axes mappings - Parquet file is sorted by these fields in this order */\n axes: ParquetChunkMappingAxis[];\n\n /** Column mapping */\n column: ParquetChunkMappingColumn;\n};\n\nexport type ParquetChunkStats = {\n /** Number of rows in the chunk */\n numberOfRows: number;\n /** Byte size information for storage optimization and query planning */\n size: {\n /** Byte sizes for each axis column in the same order as axes mapping */\n axes: number[];\n /** Byte size for the data column */\n column: number;\n };\n};\n\nexport type ParquetChunkMetadata = {\n /** Content hash calculated for the specific axes and data this chunk represents */\n dataDigest: string;\n\n /** Pre-computed statistics for optimization without blob download */\n stats: Partial<ParquetChunkStats>;\n};\n\nexport type ParquetChunk<Blob> = {\n /** Parquet file (PTable) containing column data */\n data: Blob;\n} & ParquetChunkMapping &\n Partial<ParquetChunkMetadata>;\n\nexport type ParquetPartitionedDataInfo<Blob> = {\n /** Identifier for this data format ('ParquetPartitioned') */\n type: \"ParquetPartitioned\";\n\n /** Number of leading axes used for partitioning */\n partitionKeyLength: number;\n\n /** Map of stringified partition keys to parquet files */\n parts: Record<string, Blob>;\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<Blob>;\n\n/**\n * Type guard function that checks if the given value is a valid DataInfo.\n *\n * @param value - The value to check\n * @returns True if the value is a valid DataInfo, false otherwise\n */\nexport function isDataInfo<Blob>(value: unknown): value is DataInfo<Blob> {\n if (!value || typeof value !== \"object\") {\n return false;\n }\n\n const data = value as Record<string, unknown>;\n if (!(\"type\" in data)) {\n return false;\n }\n\n switch (data.type) {\n case \"Json\":\n return (\n typeof data.keyLength === \"number\" &&\n data.data !== undefined &&\n typeof data.data === \"object\"\n );\n case \"JsonPartitioned\":\n case \"BinaryPartitioned\":\n case \"ParquetPartitioned\":\n return (\n typeof data.partitionKeyLength === \"number\" &&\n data.parts !== undefined &&\n typeof data.parts === \"object\"\n );\n default:\n return false;\n }\n}\n\n/**\n * Maps blob references in a DataInfo object from one type to another using a mapping function.\n *\n * @template B1 - Source blob type\n * @template B2 - Target blob type\n * @param dataInfo - The source DataInfo object\n * @param mapFn - Function to transform blobs from type B1 to type B2\n * @returns A new DataInfo object with transformed blob references\n */\nexport function mapDataInfo<B1, B2>(\n dataInfo: ParquetPartitionedDataInfo<B1>,\n mapFn: (blob: B1) => B2,\n): ParquetPartitionedDataInfo<B2>;\nexport function mapDataInfo<B1, B2>(\n dataInfo: Exclude<DataInfo<B1>, ParquetPartitionedDataInfo<B1>>,\n mapFn: (blob: B1) => B2,\n): Exclude<DataInfo<B2>, ParquetPartitionedDataInfo<B2>>;\nexport function mapDataInfo<B1, B2>(dataInfo: DataInfo<B1>, mapFn: (blob: B1) => B2): DataInfo<B2>;\nexport function mapDataInfo<B1, B2>(\n dataInfo: DataInfo<B1> | undefined,\n mapFn: (blob: B1) => B2,\n): DataInfo<B2> | undefined {\n if (dataInfo === undefined) {\n return undefined;\n }\n\n switch (dataInfo.type) {\n case \"Json\":\n // Json type doesn't contain blobs, so return as is\n return dataInfo;\n case \"JsonPartitioned\": {\n // Map each blob in parts\n const newParts: Record<string, B2> = {};\n for (const [key, blob] of Object.entries(dataInfo.parts)) {\n newParts[key] = mapFn(blob);\n }\n return {\n ...dataInfo,\n parts: newParts,\n };\n }\n case \"BinaryPartitioned\": {\n // Map each index and values blob in parts\n const newParts: Record<string, BinaryChunk<B2>> = {};\n for (const [key, chunk] of Object.entries(dataInfo.parts)) {\n newParts[key] = {\n index: mapFn(chunk.index),\n values: mapFn(chunk.values),\n };\n }\n return {\n ...dataInfo,\n parts: newParts,\n };\n }\n case \"ParquetPartitioned\": {\n // Map each blob in parts\n const newParts: Record<string, B2> = {};\n for (const [key, blob] of Object.entries(dataInfo.parts)) {\n newParts[key] = mapFn(blob);\n }\n return {\n ...dataInfo,\n parts: newParts,\n };\n }\n }\n}\n\n/**\n * @param dataInfo - The source DataInfo object\n * @param cb - Callback, function that have access to every blob to visit them all\n * @returns Nothing\n */\nexport function visitDataInfo<B>(dataInfo: DataInfo<B>, cb: (blob: B) => void): void {\n switch (dataInfo.type) {\n case \"Json\":\n // Json type doesn't contain blobs, so return as is\n break;\n case \"JsonPartitioned\": {\n // Visit each blob in parts\n Object.values(dataInfo.parts).forEach(cb);\n break;\n }\n case \"BinaryPartitioned\": {\n // Visit each index and values blob in parts\n Object.values(dataInfo.parts).forEach((chunk) => {\n cb(chunk.index);\n cb(chunk.values);\n });\n break;\n }\n case \"ParquetPartitioned\": {\n // Visit each blob in parts\n Object.values(dataInfo.parts).forEach(cb);\n break;\n }\n }\n}\n\n//\n// Lightway representation for ExplicitJsonData\n//\n\n/**\n * Represents a single key-value entry in a column's explicit data structure.\n * Used when directly instantiating PColumns with explicit data.\n */\nexport type PColumnValuesEntry = {\n key: PColumnKey;\n val: PColumnValue;\n};\n\n/**\n * Array of key-value entries representing explicit column data.\n * Used for lightweight explicit instantiation of PColumns.\n */\nexport type PColumnValues = PColumnValuesEntry[];\n\n/**\n * Entry-based representation of JsonDataInfo\n */\nexport interface JsonDataInfoEntries {\n type: \"Json\";\n keyLength: number;\n data: PColumnDataEntry<PColumnValue>[];\n}\n\n/**\n * Entry-based representation of JsonPartitionedDataInfo\n */\nexport interface JsonPartitionedDataInfoEntries<Blob> {\n type: \"JsonPartitioned\";\n partitionKeyLength: number;\n parts: PColumnDataEntry<Blob>[];\n}\n\n/**\n * Entry-based representation of BinaryPartitionedDataInfo\n */\nexport interface BinaryPartitionedDataInfoEntries<Blob> {\n type: \"BinaryPartitioned\";\n partitionKeyLength: number;\n parts: PColumnDataEntry<BinaryChunk<Blob>>[];\n}\n\n/**\n * Entry-based representation of ParquetPartitionedDataInfo\n */\nexport interface ParquetPartitionedDataInfoEntries<Blob> {\n type: \"ParquetPartitioned\";\n partitionKeyLength: number;\n parts: PColumnDataEntry<Blob>[];\n}\n/**\n * Union type representing all possible entry-based partitioned data storage formats\n */\nexport type PartitionedDataInfoEntries<Blob> =\n | JsonPartitionedDataInfoEntries<Blob>\n | BinaryPartitionedDataInfoEntries<Blob>\n | ParquetPartitionedDataInfoEntries<Blob>;\n\n/**\n * Union type representing all possible entry-based data storage formats\n */\nexport type DataInfoEntries<Blob> = JsonDataInfoEntries | PartitionedDataInfoEntries<Blob>;\n\n/**\n * Type guard function that checks if the given value is a valid DataInfoEntries.\n *\n * @param value - The value to check\n * @returns True if the value is a valid DataInfoEntries, false otherwise\n */\nexport function isDataInfoEntries<Blob>(value: unknown): value is DataInfoEntries<Blob> {\n if (!value || typeof value !== \"object\") {\n return false;\n }\n\n const data = value as Record<string, unknown>;\n if (!(\"type\" in data)) {\n return false;\n }\n\n switch (data.type) {\n case \"Json\":\n return typeof data.keyLength === \"number\" && Array.isArray(data.data);\n case \"JsonPartitioned\":\n case \"BinaryPartitioned\":\n case \"ParquetPartitioned\":\n return typeof data.partitionKeyLength === \"number\" && Array.isArray(data.parts);\n default:\n return false;\n }\n}\n\n/**\n * Type guard function that checks if the given value is a valid PartitionedDataInfoEntries.\n *\n * @template Blob - Type parameter representing the storage reference type\n * @param value - The value to check\n * @returns True if the value is a valid PartitionedDataInfoEntries, false otherwise\n */\nexport function isPartitionedDataInfoEntries<Blob>(\n value: unknown,\n): value is PartitionedDataInfoEntries<Blob> {\n if (!isDataInfoEntries(value)) return false;\n switch (value.type) {\n case \"JsonPartitioned\":\n case \"BinaryPartitioned\":\n case \"ParquetPartitioned\":\n return true;\n default:\n return false;\n }\n}\n\n/**\n * Converts DataInfo to DataInfoEntries\n *\n * @param dataInfo - The record-based DataInfo object\n * @returns The equivalent entry-based DataInfoEntries object\n */\nexport function dataInfoToEntries<Blob>(dataInfo: DataInfo<Blob>): DataInfoEntries<Blob> {\n switch (dataInfo.type) {\n case \"Json\":\n return {\n type: \"Json\",\n keyLength: dataInfo.keyLength,\n data: Object.entries(dataInfo.data).map(([keyStr, value]) => {\n const key = JSON.parse(keyStr) as PColumnKey;\n return { key, value } as PColumnDataEntry<PColumnValue>;\n }),\n };\n case \"JsonPartitioned\":\n return {\n type: \"JsonPartitioned\",\n partitionKeyLength: dataInfo.partitionKeyLength,\n parts: Object.entries(dataInfo.parts).map(([keyStr, blob]) => {\n const key = JSON.parse(keyStr) as PColumnKey;\n return { key, value: blob } as PColumnDataEntry<Blob>;\n }),\n };\n case \"BinaryPartitioned\":\n return {\n type: \"BinaryPartitioned\",\n partitionKeyLength: dataInfo.partitionKeyLength,\n parts: Object.entries(dataInfo.parts).map(([keyStr, chunk]) => {\n const key = JSON.parse(keyStr) as PColumnKey;\n return { key, value: chunk } as PColumnDataEntry<BinaryChunk<Blob>>;\n }),\n };\n case \"ParquetPartitioned\":\n return {\n type: \"ParquetPartitioned\",\n partitionKeyLength: dataInfo.partitionKeyLength,\n parts: Object.entries(dataInfo.parts).map(([keyStr, blob]) => {\n const key = JSON.parse(keyStr) as PColumnKey;\n return { key, value: blob } as PColumnDataEntry<Blob>;\n }),\n };\n default:\n assertNever(dataInfo);\n }\n}\n\n/**\n * Converts DataInfoEntries to DataInfo\n *\n * @param dataInfoEntries - The entry-based DataInfoEntries object\n * @returns The equivalent record-based DataInfo object\n */\nexport function entriesToDataInfo<Blob>(dataInfoEntries: DataInfoEntries<Blob>): DataInfo<Blob> {\n switch (dataInfoEntries.type) {\n case \"Json\":\n return {\n type: \"Json\",\n keyLength: dataInfoEntries.keyLength,\n data: Object.fromEntries(\n dataInfoEntries.data.map(({ key, value }) => [JSON.stringify(key), value]),\n ),\n };\n case \"JsonPartitioned\":\n return {\n type: \"JsonPartitioned\",\n partitionKeyLength: dataInfoEntries.partitionKeyLength,\n parts: Object.fromEntries(\n dataInfoEntries.parts.map(({ key, value }) => [JSON.stringify(key), value]),\n ),\n };\n case \"BinaryPartitioned\":\n return {\n type: \"BinaryPartitioned\",\n partitionKeyLength: dataInfoEntries.partitionKeyLength,\n parts: Object.fromEntries(\n dataInfoEntries.parts.map(({ key, value }) => [JSON.stringify(key), value]),\n ),\n };\n case \"ParquetPartitioned\":\n return {\n type: \"ParquetPartitioned\",\n partitionKeyLength: dataInfoEntries.partitionKeyLength,\n parts: Object.fromEntries(\n dataInfoEntries.parts.map(({ key, value }) => [JSON.stringify(key), value]),\n ),\n };\n default:\n assertNever(dataInfoEntries);\n }\n}\n\n/**\n * Maps blob references in a DataInfoEntries object from one type to another using a mapping function.\n *\n * @template B1 - Source blob type\n * @template B2 - Target blob type\n * @param dataInfoEntries - The source DataInfoEntries object\n * @param mapFn - Function to transform blobs from type B1 to type B2\n * @returns A new DataInfoEntries object with transformed blob references\n */\nexport function mapDataInfoEntries<B1, B2>(\n dataInfoEntries: DataInfoEntries<B1>,\n mapFn: (blob: B1) => B2,\n): DataInfoEntries<B2>;\nexport function mapDataInfoEntries<B1, B2>(\n dataInfoEntries: DataInfoEntries<B1> | undefined,\n mapFn: (blob: B1) => B2,\n): DataInfoEntries<B2> | undefined {\n if (dataInfoEntries === undefined) {\n return undefined;\n }\n\n switch (dataInfoEntries.type) {\n case \"Json\":\n // Json type doesn't contain blobs, so return as is\n return dataInfoEntries;\n case \"JsonPartitioned\":\n return {\n ...dataInfoEntries,\n parts: dataInfoEntries.parts.map((entry) => ({\n key: entry.key,\n value: mapFn(entry.value),\n })),\n };\n case \"BinaryPartitioned\":\n return {\n ...dataInfoEntries,\n parts: dataInfoEntries.parts.map((entry) => ({\n key: entry.key,\n value: {\n index: mapFn(entry.value.index),\n values: mapFn(entry.value.values),\n },\n })),\n };\n case \"ParquetPartitioned\":\n return {\n ...dataInfoEntries,\n parts: dataInfoEntries.parts.map((entry) => ({\n key: entry.key,\n value: mapFn(entry.value),\n })),\n };\n }\n}\n"],"mappings":";;;;;;;;;AAwKA,SAAgB,WAAiB,OAAyC;AACxE,KAAI,CAAC,SAAS,OAAO,UAAU,SAC7B,QAAO;CAGT,MAAM,OAAO;AACb,KAAI,EAAE,UAAU,MACd,QAAO;AAGT,SAAQ,KAAK,MAAb;EACE,KAAK,OACH,QACE,OAAO,KAAK,cAAc,YAC1B,KAAK,SAAS,UACd,OAAO,KAAK,SAAS;EAEzB,KAAK;EACL,KAAK;EACL,KAAK,qBACH,QACE,OAAO,KAAK,uBAAuB,YACnC,KAAK,UAAU,UACf,OAAO,KAAK,UAAU;EAE1B,QACE,QAAO;;;AAsBb,SAAgB,YACd,UACA,OAC0B;AAC1B,KAAI,aAAa,OACf;AAGF,SAAQ,SAAS,MAAjB;EACE,KAAK,OAEH,QAAO;EACT,KAAK,mBAAmB;GAEtB,MAAM,WAA+B,EAAE;AACvC,QAAK,MAAM,CAAC,KAAK,SAAS,OAAO,QAAQ,SAA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AO;GACL,MAAM;GACN,oBAAoB,gBAAgB;GACpC,OAAO,OAAO,YACZ,gBAAgB,MAAM,KAAK,EAAE,KAAK,YAAY,CAAC,KAAK,UAAU,IAAI,EAAE,MAAM,CAAC,CAC5E;GACF;EACH,KAAK,oBACH,QAAO;GACL,MAAM;GACN,oBAAoB,gBAAgB;GACpC,OAAO,OAAO,YACZ,gBAAgB,MAAM,KAAK,EAAE,KAAK,YAAY,CAAC,KAAK,UAAU,IAAI,EAAE,MAAM,CAAC,CAC5E;GACF;EACH,KAAK,qBACH,QAAO;GACL,MAAM;GACN,oBAAoB,gBAAgB;GACpC,OAAO,OAAO,YACZ,gBAAgB,MAAM,KAAK,EAAE,KAAK,YAAY,CAAC,KAAK,UAAU,IAAI,EAAE,MAAM,CAAC,CAC5E;GACF;EACH,QACE,0BAAY,gBAAgB;;;AAiBlC,SAAgB,mBACd,iBACA,OACiC;AACjC,KAAI,oBAAoB,OACtB;AAGF,SAAQ,gBAAgB,MAAxB;EACE,KAAK,OAEH,QAAO;EACT,KAAK,kBACH,QAAO;GACL,GAAG;GACH,OAAO,gBAAgB,MAAM,KAAK,WAAW;IAC3C,KAAK,MAAM;IACX,OAAO,MAAM,MAAM,MAAM;IAC1B,EAAE;GACJ;EACH,KAAK,oBACH,QAAO;GACL,GAAG;GACH,OAAO,gBAAgB,MAAM,KAAK,WAAW;IAC3C,KAAK,MAAM;IACX,OAAO;KACL,OAAO,MAAM,MAAM,MAAM,MAAM;KAC/B,QAAQ,MAAM,MAAM,MAAM,OAAO;KAClC;IACF,EAAE;GACJ;EACH,KAAK,qBACH,QAAO;GACL,GAAG;GACH,OAAO,gBAAgB,MAAM,KAAK,WAAW;IAC3C,KAAK,MAAM;IACX,OAAO,MAAM,MAAM,MAAM;IAC1B,EAAE;GACJ"}
|
|
1
|
+
{"version":3,"file":"data_info.cjs","names":[],"sources":["../../../src/drivers/pframe/data_info.ts"],"sourcesContent":["import { assertNever } from \"../../util\";\n\n/**\n * Represents a JavaScript representation of a value in a PColumn. Can be null, a number, or a string.\n * These are the primitive types that can be stored directly in PColumns.\n *\n * Note: Actual columns can hold more value types, which are converted to these JavaScript types\n * once they enter the JavaScript runtime.\n */\nexport type PColumnValue = null | number | string;\n\n/**\n * Represents a key for a PColumn value.\n * Can be an array of strings or numbers.\n */\nexport type PColumnKey = (number | string)[];\n\n/**\n * Represents a single entry in a PColumn's data structure.\n * Contains a key and a value.\n */\nexport type PColumnDataEntry<T> = {\n /** Key for the value */\n key: PColumnKey;\n\n /** Value / blob at the given key */\n value: T;\n};\n\n/**\n * Represents column data stored as a simple JSON structure.\n * Used for small datasets that can be efficiently stored directly in memory.\n */\nexport type JsonDataInfo = {\n /** Identifier for this data format ('Json') */\n type: \"Json\";\n\n /** Number of axes that make up the complete key (tuple length) */\n keyLength: number;\n\n /**\n * Key-value pairs where keys are stringified tuples of axis values\n * and values are the column values for those coordinates\n */\n data: Record<string, PColumnValue>;\n};\n\n/**\n * Represents column data partitioned across multiple JSON blobs.\n * Used for larger datasets that need to be split into manageable chunks.\n */\nexport type JsonPartitionedDataInfo<Blob> = {\n /** Identifier for this data format ('JsonPartitioned') */\n type: \"JsonPartitioned\";\n\n /** Number of leading axes used for partitioning */\n partitionKeyLength: number;\n\n /** Map of stringified partition keys to blob references */\n parts: Record<string, Blob>;\n};\n\n/**\n * Represents a binary format chunk containing index and values as separate blobs.\n * Used for efficient storage and retrieval of column data in binary format.\n */\nexport type BinaryChunk<Blob> = {\n /** Binary blob containing structured index information */\n index: Blob;\n\n /** Binary blob containing the actual values */\n values: Blob;\n};\n\n/**\n * Represents column data partitioned across multiple binary chunks.\n * Optimized for efficient storage and retrieval of large datasets.\n */\nexport type BinaryPartitionedDataInfo<Blob> = {\n /** Identifier for this data format ('BinaryPartitioned') */\n type: \"BinaryPartitioned\";\n\n /** Number of leading axes used for partitioning */\n partitionKeyLength: number;\n\n /** Map of stringified partition keys to binary chunks */\n parts: Record<string, BinaryChunk<Blob>>;\n};\n\nexport type ParquetChunkMappingAxis = {\n /** Data type (matches PColumn axis types) */\n type: \"Int\" | \"Long\" | \"String\";\n\n /** Field name in the Parquet file */\n id: string;\n};\n\nexport type ParquetChunkMappingColumn = {\n /** Data type (matches PColumn value type) */\n type: \"Int\" | \"Long\" | \"Float\" | \"Double\" | \"String\";\n\n /** Field name in the Parquet file */\n id: string;\n};\n\nexport type ParquetChunkMapping = {\n /** Axes mappings - Parquet file is sorted by these fields in this order */\n axes: ParquetChunkMappingAxis[];\n\n /** Column mapping */\n column: ParquetChunkMappingColumn;\n};\n\nexport type ParquetChunkStats = {\n /** Number of rows in the chunk */\n numberOfRows: number;\n /** Byte size information for storage optimization and query planning */\n size: {\n /** Byte sizes for each axis column in the same order as axes mapping */\n axes: number[];\n /** Byte size for the data column */\n column: number;\n };\n};\n\nexport type ParquetChunkMetadata = {\n /** Content hash calculated for the specific axes and data this chunk represents */\n dataDigest: string;\n\n /** Pre-computed statistics for optimization without blob download */\n stats: Partial<ParquetChunkStats>;\n};\n\nexport type ParquetChunk<Blob> = {\n /** Parquet file (PTable) containing column data */\n data: Blob;\n} & ParquetChunkMapping &\n Partial<ParquetChunkMetadata>;\n\nexport type ParquetPartitionedDataInfo<Blob> = {\n /** Identifier for this data format ('ParquetPartitioned') */\n type: \"ParquetPartitioned\";\n\n /** Number of leading axes used for partitioning */\n partitionKeyLength: number;\n\n /** Map of stringified partition keys to parquet files */\n parts: Record<string, Blob>;\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<Blob>;\n\n/**\n * Type guard function that checks if the given value is a valid DataInfo.\n *\n * @param value - The value to check\n * @returns True if the value is a valid DataInfo, false otherwise\n */\nexport function isDataInfo<Blob>(value: unknown): value is DataInfo<Blob> {\n if (!value || typeof value !== \"object\") {\n return false;\n }\n\n const data = value as Record<string, unknown>;\n if (!(\"type\" in data)) {\n return false;\n }\n\n switch (data.type) {\n case \"Json\":\n return (\n typeof data.keyLength === \"number\" &&\n data.data !== undefined &&\n typeof data.data === \"object\"\n );\n case \"JsonPartitioned\":\n case \"BinaryPartitioned\":\n case \"ParquetPartitioned\":\n return (\n typeof data.partitionKeyLength === \"number\" &&\n data.parts !== undefined &&\n typeof data.parts === \"object\"\n );\n default:\n return false;\n }\n}\n\n/**\n * Maps blob references in a DataInfo object from one type to another using a mapping function.\n *\n * @template B1 - Source blob type\n * @template B2 - Target blob type\n * @param dataInfo - The source DataInfo object\n * @param mapFn - Function to transform blobs from type B1 to type B2\n * @returns A new DataInfo object with transformed blob references\n */\nexport function mapDataInfo<B1, B2>(\n dataInfo: ParquetPartitionedDataInfo<B1>,\n mapFn: (blob: B1) => B2,\n): ParquetPartitionedDataInfo<B2>;\nexport function mapDataInfo<B1, B2>(\n dataInfo: Exclude<DataInfo<B1>, ParquetPartitionedDataInfo<B1>>,\n mapFn: (blob: B1) => B2,\n): Exclude<DataInfo<B2>, ParquetPartitionedDataInfo<B2>>;\nexport function mapDataInfo<B1, B2>(dataInfo: DataInfo<B1>, mapFn: (blob: B1) => B2): DataInfo<B2>;\nexport function mapDataInfo<B1, B2>(\n dataInfo: DataInfo<B1> | undefined,\n mapFn: (blob: B1) => B2,\n): DataInfo<B2> | undefined {\n if (dataInfo === undefined) {\n return undefined;\n }\n\n switch (dataInfo.type) {\n case \"Json\":\n // Json type doesn't contain blobs, so return as is\n return dataInfo;\n case \"JsonPartitioned\": {\n // Map each blob in parts\n const newParts: Record<string, B2> = {};\n for (const [key, blob] of Object.entries(dataInfo.parts)) {\n newParts[key] = mapFn(blob);\n }\n return {\n ...dataInfo,\n parts: newParts,\n };\n }\n case \"BinaryPartitioned\": {\n // Map each index and values blob in parts\n const newParts: Record<string, BinaryChunk<B2>> = {};\n for (const [key, chunk] of Object.entries(dataInfo.parts)) {\n newParts[key] = {\n index: mapFn(chunk.index),\n values: mapFn(chunk.values),\n };\n }\n return {\n ...dataInfo,\n parts: newParts,\n };\n }\n case \"ParquetPartitioned\": {\n // Map each blob in parts\n const newParts: Record<string, B2> = {};\n for (const [key, blob] of Object.entries(dataInfo.parts)) {\n newParts[key] = mapFn(blob);\n }\n return {\n ...dataInfo,\n parts: newParts,\n };\n }\n }\n}\n\n/**\n * @param dataInfo - The source DataInfo object\n * @param cb - Callback, function that have access to every blob to visit them all\n * @returns Nothing\n */\nexport function visitDataInfo<B>(dataInfo: DataInfo<B>, cb: (blob: B) => void): void {\n switch (dataInfo.type) {\n case \"Json\":\n // Json type doesn't contain blobs, so return as is\n break;\n case \"JsonPartitioned\": {\n // Visit each blob in parts\n Object.values(dataInfo.parts).forEach(cb);\n break;\n }\n case \"BinaryPartitioned\": {\n // Visit each index and values blob in parts\n Object.values(dataInfo.parts).forEach((chunk) => {\n cb(chunk.index);\n cb(chunk.values);\n });\n break;\n }\n case \"ParquetPartitioned\": {\n // Visit each blob in parts\n Object.values(dataInfo.parts).forEach(cb);\n break;\n }\n }\n}\n\n//\n// Lightway representation for ExplicitJsonData\n//\n\n/**\n * Represents a single key-value entry in a column's explicit data structure.\n * Used when directly instantiating PColumns with explicit data.\n */\nexport type PColumnValuesEntry = {\n key: PColumnKey;\n val: PColumnValue;\n};\n\n/**\n * Array of key-value entries representing explicit column data.\n * Used for lightweight explicit instantiation of PColumns.\n */\nexport type PColumnValues = PColumnValuesEntry[];\n\n/**\n * Entry-based representation of JsonDataInfo\n */\nexport interface JsonDataInfoEntries {\n type: \"Json\";\n keyLength: number;\n data: PColumnDataEntry<PColumnValue>[];\n}\n\n/**\n * Entry-based representation of JsonPartitionedDataInfo\n */\nexport interface JsonPartitionedDataInfoEntries<Blob> {\n type: \"JsonPartitioned\";\n partitionKeyLength: number;\n parts: PColumnDataEntry<Blob>[];\n}\n\n/**\n * Entry-based representation of BinaryPartitionedDataInfo\n */\nexport interface BinaryPartitionedDataInfoEntries<Blob> {\n type: \"BinaryPartitioned\";\n partitionKeyLength: number;\n parts: PColumnDataEntry<BinaryChunk<Blob>>[];\n}\n\n/**\n * Entry-based representation of ParquetPartitionedDataInfo\n */\nexport interface ParquetPartitionedDataInfoEntries<Blob> {\n type: \"ParquetPartitioned\";\n partitionKeyLength: number;\n parts: PColumnDataEntry<Blob>[];\n}\n/**\n * Union type representing all possible entry-based partitioned data storage formats\n */\nexport type PartitionedDataInfoEntries<Blob> =\n | JsonPartitionedDataInfoEntries<Blob>\n | BinaryPartitionedDataInfoEntries<Blob>\n | ParquetPartitionedDataInfoEntries<Blob>;\n\n/**\n * Union type representing all possible entry-based data storage formats\n */\nexport type DataInfoEntries<Blob> = JsonDataInfoEntries | PartitionedDataInfoEntries<Blob>;\n\n/**\n * Type guard function that checks if the given value is a valid DataInfoEntries.\n *\n * @param value - The value to check\n * @returns True if the value is a valid DataInfoEntries, false otherwise\n */\nexport function isDataInfoEntries<Blob>(value: unknown): value is DataInfoEntries<Blob> {\n if (!value || typeof value !== \"object\") {\n return false;\n }\n\n const data = value as Record<string, unknown>;\n if (!(\"type\" in data)) {\n return false;\n }\n\n switch (data.type) {\n case \"Json\":\n return typeof data.keyLength === \"number\" && Array.isArray(data.data);\n case \"JsonPartitioned\":\n case \"BinaryPartitioned\":\n case \"ParquetPartitioned\":\n return typeof data.partitionKeyLength === \"number\" && Array.isArray(data.parts);\n default:\n return false;\n }\n}\n\n/**\n * Type guard function that checks if the given value is a valid PartitionedDataInfoEntries.\n *\n * @template Blob - Type parameter representing the storage reference type\n * @param value - The value to check\n * @returns True if the value is a valid PartitionedDataInfoEntries, false otherwise\n */\nexport function isPartitionedDataInfoEntries<Blob>(\n value: unknown,\n): value is PartitionedDataInfoEntries<Blob> {\n if (!isDataInfoEntries(value)) return false;\n switch (value.type) {\n case \"JsonPartitioned\":\n case \"BinaryPartitioned\":\n case \"ParquetPartitioned\":\n return true;\n default:\n return false;\n }\n}\n\n/**\n * Converts DataInfo to DataInfoEntries\n *\n * @param dataInfo - The record-based DataInfo object\n * @returns The equivalent entry-based DataInfoEntries object\n */\nexport function dataInfoToEntries<Blob>(dataInfo: DataInfo<Blob>): DataInfoEntries<Blob> {\n switch (dataInfo.type) {\n case \"Json\":\n return {\n type: \"Json\",\n keyLength: dataInfo.keyLength,\n data: Object.entries(dataInfo.data).map(([keyStr, value]) => {\n const key = JSON.parse(keyStr) as PColumnKey;\n return { key, value } as PColumnDataEntry<PColumnValue>;\n }),\n };\n case \"JsonPartitioned\":\n return {\n type: \"JsonPartitioned\",\n partitionKeyLength: dataInfo.partitionKeyLength,\n parts: Object.entries(dataInfo.parts).map(([keyStr, blob]) => {\n const key = JSON.parse(keyStr) as PColumnKey;\n return { key, value: blob } as PColumnDataEntry<Blob>;\n }),\n };\n case \"BinaryPartitioned\":\n return {\n type: \"BinaryPartitioned\",\n partitionKeyLength: dataInfo.partitionKeyLength,\n parts: Object.entries(dataInfo.parts).map(([keyStr, chunk]) => {\n const key = JSON.parse(keyStr) as PColumnKey;\n return { key, value: chunk } as PColumnDataEntry<BinaryChunk<Blob>>;\n }),\n };\n case \"ParquetPartitioned\":\n return {\n type: \"ParquetPartitioned\",\n partitionKeyLength: dataInfo.partitionKeyLength,\n parts: Object.entries(dataInfo.parts).map(([keyStr, blob]) => {\n const key = JSON.parse(keyStr) as PColumnKey;\n return { key, value: blob } as PColumnDataEntry<Blob>;\n }),\n };\n default:\n assertNever(dataInfo);\n }\n}\n\n/**\n * Converts DataInfoEntries to DataInfo\n *\n * @param dataInfoEntries - The entry-based DataInfoEntries object\n * @returns The equivalent record-based DataInfo object\n */\nexport function entriesToDataInfo<Blob>(dataInfoEntries: DataInfoEntries<Blob>): DataInfo<Blob> {\n switch (dataInfoEntries.type) {\n case \"Json\":\n return {\n type: \"Json\",\n keyLength: dataInfoEntries.keyLength,\n data: Object.fromEntries(\n dataInfoEntries.data.map(({ key, value }) => [JSON.stringify(key), value]),\n ),\n };\n case \"JsonPartitioned\":\n return {\n type: \"JsonPartitioned\",\n partitionKeyLength: dataInfoEntries.partitionKeyLength,\n parts: Object.fromEntries(\n dataInfoEntries.parts.map(({ key, value }) => [JSON.stringify(key), value]),\n ),\n };\n case \"BinaryPartitioned\":\n return {\n type: \"BinaryPartitioned\",\n partitionKeyLength: dataInfoEntries.partitionKeyLength,\n parts: Object.fromEntries(\n dataInfoEntries.parts.map(({ key, value }) => [JSON.stringify(key), value]),\n ),\n };\n case \"ParquetPartitioned\":\n return {\n type: \"ParquetPartitioned\",\n partitionKeyLength: dataInfoEntries.partitionKeyLength,\n parts: Object.fromEntries(\n dataInfoEntries.parts.map(({ key, value }) => [JSON.stringify(key), value]),\n ),\n };\n default:\n assertNever(dataInfoEntries);\n }\n}\n\n/**\n * Maps blob references in a DataInfoEntries object from one type to another using a mapping function.\n *\n * @template B1 - Source blob type\n * @template B2 - Target blob type\n * @param dataInfoEntries - The source DataInfoEntries object\n * @param mapFn - Function to transform blobs from type B1 to type B2\n * @returns A new DataInfoEntries object with transformed blob references\n */\nexport function mapDataInfoEntries<B1, B2>(\n dataInfoEntries: DataInfoEntries<B1>,\n mapFn: (blob: B1) => B2,\n): DataInfoEntries<B2>;\nexport function mapDataInfoEntries<B1, B2>(\n dataInfoEntries: DataInfoEntries<B1> | undefined,\n mapFn: (blob: B1) => B2,\n): DataInfoEntries<B2> | undefined {\n if (dataInfoEntries === undefined) {\n return undefined;\n }\n\n switch (dataInfoEntries.type) {\n case \"Json\":\n // Json type doesn't contain blobs, so return as is\n return dataInfoEntries;\n case \"JsonPartitioned\":\n return {\n ...dataInfoEntries,\n parts: dataInfoEntries.parts.map((entry) => ({\n key: entry.key,\n value: mapFn(entry.value),\n })),\n };\n case \"BinaryPartitioned\":\n return {\n ...dataInfoEntries,\n parts: dataInfoEntries.parts.map((entry) => ({\n key: entry.key,\n value: {\n index: mapFn(entry.value.index),\n values: mapFn(entry.value.values),\n },\n })),\n };\n case \"ParquetPartitioned\":\n return {\n ...dataInfoEntries,\n parts: dataInfoEntries.parts.map((entry) => ({\n key: entry.key,\n value: mapFn(entry.value),\n })),\n };\n }\n}\n"],"mappings":";;;;;;;;AAwKA,SAAgB,WAAiB,OAAyC;AACxE,KAAI,CAAC,SAAS,OAAO,UAAU,SAC7B,QAAO;CAGT,MAAM,OAAO;AACb,KAAI,EAAE,UAAU,MACd,QAAO;AAGT,SAAQ,KAAK,MAAb;EACE,KAAK,OACH,QACE,OAAO,KAAK,cAAc,YAC1B,KAAK,SAAS,KAAA,KACd,OAAO,KAAK,SAAS;EAEzB,KAAK;EACL,KAAK;EACL,KAAK,qBACH,QACE,OAAO,KAAK,uBAAuB,YACnC,KAAK,UAAU,KAAA,KACf,OAAO,KAAK,UAAU;EAE1B,QACE,QAAO;;;AAsBb,SAAgB,YACd,UACA,OAC0B;AAC1B,KAAI,aAAa,KAAA,EACf;AAGF,SAAQ,SAAS,MAAjB;EACE,KAAK,OAEH,QAAO;EACT,KAAK,mBAAmB;GAEtB,MAAM,WAA+B,EAAE;AACvC,QAAK,MAAM,CAAC,KAAK,SAAS,OAAO,QAAQ,SAAS,MAAM,CACtD,UAAS,OAAO,MAAM,KAAK;AAE7B,UAAO;IACL,GAAG;IACH,OAAO;IACR;;EAEH,KAAK,qBAAqB;GAExB,MAAM,WAA4C,EAAE;AACpD,QAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,SAAS,MAAM,CACvD,UAAS,OAAO;IACd,OAAO,MAAM,MAAM,MAAM;IACzB,QAAQ,MAAM,MAAM,OAAO;IAC5B;AAEH,UAAO;IACL,GAAG;IACH,OAAO;IACR;;EAEH,KAAK,sBAAsB;GAEzB,MAAM,WAA+B,EAAE;AACvC,QAAK,MAAM,CAAC,KAAK,SAAS,OAAO,QAAQ,SAAS,MAAM,CACtD,UAAS,OAAO,MAAM,KAAK;AAE7B,UAAO;IACL,GAAG;IACH,OAAO;IACR;;;;;;;;;AAUP,SAAg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ACd,eAAA,EAAiB,eAAA,CAAgB,EAAA,GACjC,KAAA,GAAQ,IAAA,EAAM,EAAA,KAAO,EAAA,GACpB,eAAA,CAAgB,EAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { assertNever } from "../../util.js";
|
|
2
|
-
|
|
3
2
|
//#region src/drivers/pframe/data_info.ts
|
|
4
3
|
/**
|
|
5
4
|
* Type guard function that checks if the given value is a valid DataInfo.
|
|
@@ -220,7 +219,7 @@ function mapDataInfoEntries(dataInfoEntries, mapFn) {
|
|
|
220
219
|
};
|
|
221
220
|
}
|
|
222
221
|
}
|
|
223
|
-
|
|
224
222
|
//#endregion
|
|
225
223
|
export { dataInfoToEntries, entriesToDataInfo, isDataInfo, isDataInfoEntries, isPartitionedDataInfoEntries, mapDataInfo, mapDataInfoEntries, visitDataInfo };
|
|
224
|
+
|
|
226
225
|
//# sourceMappingURL=data_info.js.map
|