@milaboratories/pl-model-common 1.38.0 → 1.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/drivers/ls.cjs.map +1 -1
- package/dist/drivers/ls.d.ts +1 -0
- package/dist/drivers/ls.d.ts.map +1 -1
- package/dist/drivers/ls.js.map +1 -1
- package/dist/flags/block_flags.cjs +8 -0
- package/dist/flags/block_flags.cjs.map +1 -1
- package/dist/flags/block_flags.d.ts +9 -2
- package/dist/flags/block_flags.d.ts.map +1 -1
- package/dist/flags/block_flags.js +8 -1
- package/dist/flags/block_flags.js.map +1 -1
- package/dist/flags/index.d.ts +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -2
- package/dist/project_id.d.ts +15 -0
- package/dist/project_id.d.ts.map +1 -0
- package/dist/resource_types.cjs +4 -0
- package/dist/resource_types.cjs.map +1 -1
- package/dist/resource_types.d.ts +4 -0
- package/dist/resource_types.d.ts.map +1 -1
- package/dist/resource_types.js +4 -0
- package/dist/resource_types.js.map +1 -1
- package/package.json +3 -3
- package/src/drivers/ls.ts +3 -3
- package/src/flags/block_flags.ts +9 -0
- package/src/index.ts +1 -0
- package/src/project_id.ts +11 -0
- package/src/resource_types.ts +4 -0
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
|
|
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 /** Stable machine identifier (e.g. \"library\", \"root\", \"local\"). Used for filtering. */\n id: string;\n /** Human-readable display name. */\n name: string;\n handle: StorageHandle;\n initialFullPath: string;\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
|
@@ -14,6 +14,7 @@ type StorageHandleLocal = `local://${string}`;
|
|
|
14
14
|
type StorageHandleRemote = `remote://${string}`;
|
|
15
15
|
type StorageHandle = StorageHandleLocal | StorageHandleRemote;
|
|
16
16
|
type StorageEntry = {
|
|
17
|
+
/** Stable machine identifier (e.g. "library", "root", "local"). Used for filtering. */id: string; /** Human-readable display name. */
|
|
17
18
|
name: string;
|
|
18
19
|
handle: StorageHandle;
|
|
19
20
|
initialFullPath: string;
|
package/dist/drivers/ls.d.ts.map
CHANGED
|
@@ -1 +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;
|
|
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;EAxBqB,uFA0B/B,EAAA,UAxB0B;EA0B1B,IAAA;EACA,MAAA,EAAQ,aAAA;EACR,eAAA;AAAA;AAAA,KAGU,eAAA;EACV,MAAA;EACA,OAAA,EAAS,OAAA;AAAA;AAAA,KAGC,OAAA;EAEN,IAAA;EACA,IAAA;EACA,QAAA;AAAA;EAGA,IAAA;EACA,IAAA;EACA,QAAA,UAvC6B;EA0C7B,MAAA,EAAQ,gBAAA;AAAA;AAAA,KAGF,gBAAA;+CAED,IAAA,UA3CqC;EAAA,SA6CrC,UAAA;AAAA;AAAA,KAGC,aAAA;EAhDsF,wCAkDvF,KAAA,WA7CC;EAAA,SA+CD,WAAA;WAEA,OAAA,GAAU,gBAAA;AAAA;AAAA,KAGT,sBAAA;EAjDmB;;EAAA,SAoDpB,IAAA,GAAO,qBAAA;AAAA;AAAA,KAGN,yBAAA;EArDa;;EAAA,SAwDd,KAAA,GAAQ,qBAAA;AAAA;AAtDnB;AAAA,KA0DY,SAAA;6CAED,IAAA,UA1DT;EAAA,SA4DS,EAAA;AAAA;AAAA,UAGM,QAAA;EA3Df;EA6DA,cAAA,IAAkB,OAAA,CAAQ,YAAA;EAE1B,SAAA,CAAU,OAAA,EAAS,aAAA,EAAe,QAAA,WAAmB,OAAA,CAAQ,eAAA;EA5DnD;EA+DV,wBAAA,CAAyB,GAAA,EAAK,aAAA,GAAgB,OAAA,CAAQ,sBAAA;;EAGtD,2BAAA,CAA4B,GAAA,EAAK,aAAA,GAAgB,OAAA,CAAQ,yBAAA;EAjEzD;EAoEA,gBAAA,CAAiB,IAAA,EAAM,qBAAA,GAAwB,OAAA;EAnEtC;EAsET,mBAAA,CAAoB,IAAA,EAAM,qBAAA,EAAuB,KAAA,GAAQ,UAAA,GAAa,OAAA,CAAQ,UAAA;EAtE9D;AAGlB;;;;;EA2EE,kBAAA,CAAmB,IAAA,EAAM,QAAA,GAAW,OAAA,CAAQ,gBAAA;EAvExC;EA0EJ,WAAA,KAAgB,OAAA;AAAA;;iBAIF,qBAAA,CAAsB,MAAA,EAAQ,gBAAA;;iBAmB9B,qBAAA,CAAsB,MAAA,EAAQ,gBAAA"}
|
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
|
|
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 /** Stable machine identifier (e.g. \"library\", \"root\", \"local\"). Used for filtering. */\n id: string;\n /** Human-readable display name. */\n name: string;\n handle: StorageHandle;\n initialFullPath: string;\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"}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
//#region src/flags/block_flags.ts
|
|
2
|
+
/**
|
|
3
|
+
* Required PFrames version. Bump this in lockstep with the `@milaboratories/pframes-rs-*`
|
|
4
|
+
* version in `pnpm-workspace.yaml` so blocks built against the new SDK refuse to load on
|
|
5
|
+
* older desktop apps.
|
|
6
|
+
*/
|
|
7
|
+
const REQUIRES_PFRAMES_VERSION = 1001031;
|
|
2
8
|
const AllSupportsFeatureFlags = ["supportsLazyState", "supportsPframeQueryRanking"];
|
|
3
9
|
const AllRequiresFeatureFlags = [
|
|
4
10
|
"requiresUIAPIVersion",
|
|
5
11
|
"requiresCreatePTable",
|
|
12
|
+
"requiresPFramesVersion",
|
|
6
13
|
"requiresModelAPIVersion"
|
|
7
14
|
];
|
|
8
15
|
//#endregion
|
|
9
16
|
exports.AllRequiresFeatureFlags = AllRequiresFeatureFlags;
|
|
10
17
|
exports.AllSupportsFeatureFlags = AllSupportsFeatureFlags;
|
|
18
|
+
exports.REQUIRES_PFRAMES_VERSION = REQUIRES_PFRAMES_VERSION;
|
|
11
19
|
|
|
12
20
|
//# sourceMappingURL=block_flags.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_flags.cjs","names":[],"sources":["../../src/flags/block_flags.ts"],"sourcesContent":["import type { ServiceRequireFlags } from \"../services\";\nimport type { ArrayTypeUnion, Assert, Is, IsSubtypeOf } from \"./type_utils\";\n\n/**\n * Block-specific feature flags. Define flags that are interpreted by the desktop app to select\n * appropriate API to expose into Model and UI runtimes.\n *\n * Flags are split into two categories:\n * - supports... - those flags tells the desktop app that the block supports certain APIs, but can without them as well\n * - requires... - those flags tells the desktop app that the block requires certain APIs, and if desktop app doesn't support it, it can't be used in the block\n */\nexport type BlockCodeFeatureFlags = Record<`supports${string}`, boolean | number | undefined> &\n Record<`requires${string}`, boolean | number | undefined>;\n\n/**\n * Known block flags. Flags are set during model compilation, see `BlockModel.create` for more details and for initial values.\n */\nexport type BlockCodeKnownFeatureFlags = {\n readonly supportsLazyState?: boolean;\n readonly supportsPframeQueryRanking?: boolean;\n readonly requiresModelAPIVersion?: number;\n readonly requiresUIAPIVersion?: number;\n readonly requiresCreatePTable?: number;\n} & ServiceRequireFlags;\n\nexport const AllSupportsFeatureFlags = [\"supportsLazyState\", \"supportsPframeQueryRanking\"] as const;\n\nexport const AllRequiresFeatureFlags = [\n \"requiresUIAPIVersion\",\n \"requiresCreatePTable\",\n \"requiresModelAPIVersion\",\n] as const;\n\n//\n// Assertions\n//\n\n// This assertion ensures that BlockConfigV3KnownFeatureFlags is a subtype of BlockConfigV3FeatureFlags.\n// It will produce a compile-time error if there's a mismatch.\ntype _KnownFlagsAreValidFlags = Assert<\n IsSubtypeOf<BlockCodeKnownFeatureFlags, BlockCodeFeatureFlags>\n>;\n\n// This check ensures that all keys in BlockConfigV3FeatureFlags are covered in the arrays above.\n// It will produce a compile-time error if there's a mismatch.\n// Adding a service to Services automatically satisfies this assertion via ServiceRequireFlags.\ntype _AllFlagsAreCovered = Assert<\n Is<\n keyof BlockCodeKnownFeatureFlags,\n | ArrayTypeUnion<typeof AllRequiresFeatureFlags, typeof AllSupportsFeatureFlags>\n | keyof ServiceRequireFlags\n >\n>;\n"],"mappings":";
|
|
1
|
+
{"version":3,"file":"block_flags.cjs","names":[],"sources":["../../src/flags/block_flags.ts"],"sourcesContent":["import type { ServiceRequireFlags } from \"../services\";\nimport type { ArrayTypeUnion, Assert, Is, IsSubtypeOf } from \"./type_utils\";\n\n/**\n * Block-specific feature flags. Define flags that are interpreted by the desktop app to select\n * appropriate API to expose into Model and UI runtimes.\n *\n * Flags are split into two categories:\n * - supports... - those flags tells the desktop app that the block supports certain APIs, but can without them as well\n * - requires... - those flags tells the desktop app that the block requires certain APIs, and if desktop app doesn't support it, it can't be used in the block\n */\nexport type BlockCodeFeatureFlags = Record<`supports${string}`, boolean | number | undefined> &\n Record<`requires${string}`, boolean | number | undefined>;\n\n/**\n * Known block flags. Flags are set during model compilation, see `BlockModel.create` for more details and for initial values.\n */\nexport type BlockCodeKnownFeatureFlags = {\n readonly supportsLazyState?: boolean;\n readonly supportsPframeQueryRanking?: boolean;\n readonly requiresModelAPIVersion?: number;\n readonly requiresUIAPIVersion?: number;\n readonly requiresCreatePTable?: number;\n readonly requiresPFramesVersion?: number;\n} & ServiceRequireFlags;\n\n/**\n * Required PFrames version. Bump this in lockstep with the `@milaboratories/pframes-rs-*`\n * version in `pnpm-workspace.yaml` so blocks built against the new SDK refuse to load on\n * older desktop apps.\n */\nexport const REQUIRES_PFRAMES_VERSION = 1_001_031;\n\nexport const AllSupportsFeatureFlags = [\"supportsLazyState\", \"supportsPframeQueryRanking\"] as const;\n\nexport const AllRequiresFeatureFlags = [\n \"requiresUIAPIVersion\",\n \"requiresCreatePTable\",\n \"requiresPFramesVersion\",\n \"requiresModelAPIVersion\",\n] as const;\n\n//\n// Assertions\n//\n\n// This assertion ensures that BlockConfigV3KnownFeatureFlags is a subtype of BlockConfigV3FeatureFlags.\n// It will produce a compile-time error if there's a mismatch.\ntype _KnownFlagsAreValidFlags = Assert<\n IsSubtypeOf<BlockCodeKnownFeatureFlags, BlockCodeFeatureFlags>\n>;\n\n// This check ensures that all keys in BlockConfigV3FeatureFlags are covered in the arrays above.\n// It will produce a compile-time error if there's a mismatch.\n// Adding a service to Services automatically satisfies this assertion via ServiceRequireFlags.\ntype _AllFlagsAreCovered = Assert<\n Is<\n keyof BlockCodeKnownFeatureFlags,\n | ArrayTypeUnion<typeof AllRequiresFeatureFlags, typeof AllSupportsFeatureFlags>\n | keyof ServiceRequireFlags\n >\n>;\n"],"mappings":";;;;;;AA+BA,MAAa,2BAA2B;AAExC,MAAa,0BAA0B,CAAC,qBAAqB,6BAA6B;AAE1F,MAAa,0BAA0B;CACrC;CACA;CACA;CACA;CACD"}
|
|
@@ -18,9 +18,16 @@ type BlockCodeKnownFeatureFlags = {
|
|
|
18
18
|
readonly requiresModelAPIVersion?: number;
|
|
19
19
|
readonly requiresUIAPIVersion?: number;
|
|
20
20
|
readonly requiresCreatePTable?: number;
|
|
21
|
+
readonly requiresPFramesVersion?: number;
|
|
21
22
|
} & ServiceRequireFlags;
|
|
23
|
+
/**
|
|
24
|
+
* Required PFrames version. Bump this in lockstep with the `@milaboratories/pframes-rs-*`
|
|
25
|
+
* version in `pnpm-workspace.yaml` so blocks built against the new SDK refuse to load on
|
|
26
|
+
* older desktop apps.
|
|
27
|
+
*/
|
|
28
|
+
declare const REQUIRES_PFRAMES_VERSION = 1001031;
|
|
22
29
|
declare const AllSupportsFeatureFlags: readonly ["supportsLazyState", "supportsPframeQueryRanking"];
|
|
23
|
-
declare const AllRequiresFeatureFlags: readonly ["requiresUIAPIVersion", "requiresCreatePTable", "requiresModelAPIVersion"];
|
|
30
|
+
declare const AllRequiresFeatureFlags: readonly ["requiresUIAPIVersion", "requiresCreatePTable", "requiresPFramesVersion", "requiresModelAPIVersion"];
|
|
24
31
|
//#endregion
|
|
25
|
-
export { AllRequiresFeatureFlags, AllSupportsFeatureFlags, BlockCodeFeatureFlags, BlockCodeKnownFeatureFlags };
|
|
32
|
+
export { AllRequiresFeatureFlags, AllSupportsFeatureFlags, BlockCodeFeatureFlags, BlockCodeKnownFeatureFlags, REQUIRES_PFRAMES_VERSION };
|
|
26
33
|
//# sourceMappingURL=block_flags.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_flags.d.ts","names":[],"sources":["../../src/flags/block_flags.ts"],"mappings":";;;;;AAWA;;;;;KAAY,qBAAA,GAAwB,MAAA,sDAClC,MAAA;;;;KAKU,0BAAA;EAAA,SACD,iBAAA;EAAA,SACA,0BAAA;EAAA,SACA,uBAAA;EAAA,SACA,oBAAA;EAAA,SACA,oBAAA;AAAA,IACP,mBAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"block_flags.d.ts","names":[],"sources":["../../src/flags/block_flags.ts"],"mappings":";;;;;AAWA;;;;;KAAY,qBAAA,GAAwB,MAAA,sDAClC,MAAA;;;;KAKU,0BAAA;EAAA,SACD,iBAAA;EAAA,SACA,0BAAA;EAAA,SACA,uBAAA;EAAA,SACA,oBAAA;EAAA,SACA,oBAAA;EAAA,SACA,sBAAA;AAAA,IACP,mBAAA;;AAOJ;;;;cAAa,wBAAA;AAAA,cAEA,uBAAA;AAAA,cAEA,uBAAA"}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
//#region src/flags/block_flags.ts
|
|
2
|
+
/**
|
|
3
|
+
* Required PFrames version. Bump this in lockstep with the `@milaboratories/pframes-rs-*`
|
|
4
|
+
* version in `pnpm-workspace.yaml` so blocks built against the new SDK refuse to load on
|
|
5
|
+
* older desktop apps.
|
|
6
|
+
*/
|
|
7
|
+
const REQUIRES_PFRAMES_VERSION = 1001031;
|
|
2
8
|
const AllSupportsFeatureFlags = ["supportsLazyState", "supportsPframeQueryRanking"];
|
|
3
9
|
const AllRequiresFeatureFlags = [
|
|
4
10
|
"requiresUIAPIVersion",
|
|
5
11
|
"requiresCreatePTable",
|
|
12
|
+
"requiresPFramesVersion",
|
|
6
13
|
"requiresModelAPIVersion"
|
|
7
14
|
];
|
|
8
15
|
//#endregion
|
|
9
|
-
export { AllRequiresFeatureFlags, AllSupportsFeatureFlags };
|
|
16
|
+
export { AllRequiresFeatureFlags, AllSupportsFeatureFlags, REQUIRES_PFRAMES_VERSION };
|
|
10
17
|
|
|
11
18
|
//# sourceMappingURL=block_flags.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_flags.js","names":[],"sources":["../../src/flags/block_flags.ts"],"sourcesContent":["import type { ServiceRequireFlags } from \"../services\";\nimport type { ArrayTypeUnion, Assert, Is, IsSubtypeOf } from \"./type_utils\";\n\n/**\n * Block-specific feature flags. Define flags that are interpreted by the desktop app to select\n * appropriate API to expose into Model and UI runtimes.\n *\n * Flags are split into two categories:\n * - supports... - those flags tells the desktop app that the block supports certain APIs, but can without them as well\n * - requires... - those flags tells the desktop app that the block requires certain APIs, and if desktop app doesn't support it, it can't be used in the block\n */\nexport type BlockCodeFeatureFlags = Record<`supports${string}`, boolean | number | undefined> &\n Record<`requires${string}`, boolean | number | undefined>;\n\n/**\n * Known block flags. Flags are set during model compilation, see `BlockModel.create` for more details and for initial values.\n */\nexport type BlockCodeKnownFeatureFlags = {\n readonly supportsLazyState?: boolean;\n readonly supportsPframeQueryRanking?: boolean;\n readonly requiresModelAPIVersion?: number;\n readonly requiresUIAPIVersion?: number;\n readonly requiresCreatePTable?: number;\n} & ServiceRequireFlags;\n\nexport const AllSupportsFeatureFlags = [\"supportsLazyState\", \"supportsPframeQueryRanking\"] as const;\n\nexport const AllRequiresFeatureFlags = [\n \"requiresUIAPIVersion\",\n \"requiresCreatePTable\",\n \"requiresModelAPIVersion\",\n] as const;\n\n//\n// Assertions\n//\n\n// This assertion ensures that BlockConfigV3KnownFeatureFlags is a subtype of BlockConfigV3FeatureFlags.\n// It will produce a compile-time error if there's a mismatch.\ntype _KnownFlagsAreValidFlags = Assert<\n IsSubtypeOf<BlockCodeKnownFeatureFlags, BlockCodeFeatureFlags>\n>;\n\n// This check ensures that all keys in BlockConfigV3FeatureFlags are covered in the arrays above.\n// It will produce a compile-time error if there's a mismatch.\n// Adding a service to Services automatically satisfies this assertion via ServiceRequireFlags.\ntype _AllFlagsAreCovered = Assert<\n Is<\n keyof BlockCodeKnownFeatureFlags,\n | ArrayTypeUnion<typeof AllRequiresFeatureFlags, typeof AllSupportsFeatureFlags>\n | keyof ServiceRequireFlags\n >\n>;\n"],"mappings":";
|
|
1
|
+
{"version":3,"file":"block_flags.js","names":[],"sources":["../../src/flags/block_flags.ts"],"sourcesContent":["import type { ServiceRequireFlags } from \"../services\";\nimport type { ArrayTypeUnion, Assert, Is, IsSubtypeOf } from \"./type_utils\";\n\n/**\n * Block-specific feature flags. Define flags that are interpreted by the desktop app to select\n * appropriate API to expose into Model and UI runtimes.\n *\n * Flags are split into two categories:\n * - supports... - those flags tells the desktop app that the block supports certain APIs, but can without them as well\n * - requires... - those flags tells the desktop app that the block requires certain APIs, and if desktop app doesn't support it, it can't be used in the block\n */\nexport type BlockCodeFeatureFlags = Record<`supports${string}`, boolean | number | undefined> &\n Record<`requires${string}`, boolean | number | undefined>;\n\n/**\n * Known block flags. Flags are set during model compilation, see `BlockModel.create` for more details and for initial values.\n */\nexport type BlockCodeKnownFeatureFlags = {\n readonly supportsLazyState?: boolean;\n readonly supportsPframeQueryRanking?: boolean;\n readonly requiresModelAPIVersion?: number;\n readonly requiresUIAPIVersion?: number;\n readonly requiresCreatePTable?: number;\n readonly requiresPFramesVersion?: number;\n} & ServiceRequireFlags;\n\n/**\n * Required PFrames version. Bump this in lockstep with the `@milaboratories/pframes-rs-*`\n * version in `pnpm-workspace.yaml` so blocks built against the new SDK refuse to load on\n * older desktop apps.\n */\nexport const REQUIRES_PFRAMES_VERSION = 1_001_031;\n\nexport const AllSupportsFeatureFlags = [\"supportsLazyState\", \"supportsPframeQueryRanking\"] as const;\n\nexport const AllRequiresFeatureFlags = [\n \"requiresUIAPIVersion\",\n \"requiresCreatePTable\",\n \"requiresPFramesVersion\",\n \"requiresModelAPIVersion\",\n] as const;\n\n//\n// Assertions\n//\n\n// This assertion ensures that BlockConfigV3KnownFeatureFlags is a subtype of BlockConfigV3FeatureFlags.\n// It will produce a compile-time error if there's a mismatch.\ntype _KnownFlagsAreValidFlags = Assert<\n IsSubtypeOf<BlockCodeKnownFeatureFlags, BlockCodeFeatureFlags>\n>;\n\n// This check ensures that all keys in BlockConfigV3FeatureFlags are covered in the arrays above.\n// It will produce a compile-time error if there's a mismatch.\n// Adding a service to Services automatically satisfies this assertion via ServiceRequireFlags.\ntype _AllFlagsAreCovered = Assert<\n Is<\n keyof BlockCodeKnownFeatureFlags,\n | ArrayTypeUnion<typeof AllRequiresFeatureFlags, typeof AllSupportsFeatureFlags>\n | keyof ServiceRequireFlags\n >\n>;\n"],"mappings":";;;;;;AA+BA,MAAa,2BAA2B;AAExC,MAAa,0BAA0B,CAAC,qBAAqB,6BAA6B;AAE1F,MAAa,0BAA0B;CACrC;CACA;CACA;CACA;CACD"}
|
package/dist/flags/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ArrayTypeUnion, Assert, AssertKeysEqual, FilterKeysByPrefix, Is, IsSubtypeOf } from "./type_utils.js";
|
|
2
2
|
import { IncompatibleFlagsError, RuntimeCapabilities, SupportedRequirement, checkBlockFlag, extractAllRequirements, extractAllSupports } from "./flag_utils.js";
|
|
3
|
-
import { AllRequiresFeatureFlags, AllSupportsFeatureFlags, BlockCodeFeatureFlags, BlockCodeKnownFeatureFlags } from "./block_flags.js";
|
|
3
|
+
import { AllRequiresFeatureFlags, AllSupportsFeatureFlags, BlockCodeFeatureFlags, BlockCodeKnownFeatureFlags, REQUIRES_PFRAMES_VERSION } from "./block_flags.js";
|
package/dist/index.cjs
CHANGED
|
@@ -70,6 +70,7 @@ exports.PlIdBytes = require_plid.PlIdBytes;
|
|
|
70
70
|
exports.PlIdLength = require_plid.PlIdLength;
|
|
71
71
|
exports.PlRef = require_ref.PlRef;
|
|
72
72
|
exports.PoolEntryGuard = require_pool_entry.PoolEntryGuard;
|
|
73
|
+
exports.REQUIRES_PFRAMES_VERSION = require_block_flags.REQUIRES_PFRAMES_VERSION;
|
|
73
74
|
exports.RangeBytes = require_blob.RangeBytes;
|
|
74
75
|
exports.ResourceTypeName = require_resource_types.ResourceTypeName;
|
|
75
76
|
exports.ResourceTypePrefix = require_resource_types.ResourceTypePrefix;
|
package/dist/index.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ import { KnownServiceName, SERVICE_CAPABILITY_FLAGS, SERVICE_FEATURE_FLAGS, getM
|
|
|
49
49
|
import { DriverKit } from "./driver_kit.js";
|
|
50
50
|
import { createNodeServiceHandlers } from "./services/node_service_handlers.js";
|
|
51
51
|
import { MODEL_SERVICE_METHOD_MAP, NodeServiceHandlerMap, SERVICE_METHOD_MAP, buildServiceInfo, resolveNodeServiceHandler } from "./services/service_injectors.js";
|
|
52
|
-
import { AllRequiresFeatureFlags, AllSupportsFeatureFlags, BlockCodeFeatureFlags, BlockCodeKnownFeatureFlags } from "./flags/block_flags.js";
|
|
52
|
+
import { AllRequiresFeatureFlags, AllSupportsFeatureFlags, BlockCodeFeatureFlags, BlockCodeKnownFeatureFlags, REQUIRES_PFRAMES_VERSION } from "./flags/block_flags.js";
|
|
53
53
|
import { BlockCodeWithInfo, Code } from "./bmodel/code.js";
|
|
54
54
|
import { BlockRenderingMode } from "./bmodel/types.js";
|
|
55
55
|
import { BlockConfigGeneric, BlockConfigV3Generic, BlockConfigV4Generic, extractCodeWithInfo } from "./bmodel/block_config.js";
|
|
@@ -63,4 +63,5 @@ import { Base64Compatible, Base64Encoded, base64Decode, base64Encode } from "./b
|
|
|
63
63
|
import { assertNever, uniqueBy } from "./util.js";
|
|
64
64
|
import { BasicHttpAuth, HttpAuth, parseHttpAuth, serializeHttpAuth } from "./httpAuth.js";
|
|
65
65
|
import { ResourceTypeName, ResourceTypePrefix } from "./resource_types.js";
|
|
66
|
-
|
|
66
|
+
import { ProjectId } from "./project_id.js";
|
|
67
|
+
export { AAxisSelector, ADomain, AbortError, AllRequiresFeatureFlags, AllSupportsFeatureFlags, AnchorAxisIdOrRefBasic, AnchorAxisRef, AnchorAxisRefByIdx, AnchorAxisRefByMatcher, AnchorAxisRefByName, AnchorDomainRef, AnchoredColumnMatchStrategy, AnchoredIdDeriver, AnchoredPColumnId, AnchoredPColumnSelector, Annotation, AnnotationDataStatus, AnnotationJson, AnyFunction, AnyLogHandle, ArchiveFormat, ArrayTypeUnion, ArtificialColumnJoinEntry, Assert, AssertKeysEqual, AuthorMarker, AxesId, AxesSpec, AxisFilter, AxisFilterByIdx, AxisFilterByName, AxisFilterValue, AxisId, AxisQualification, AxisSpec, AxisSpecNormalized, AxisTree, AxisValueType, Base64Compatible, Base64Encoded, BasicHttpAuth, BinaryChunk, BinaryPartitionedDataInfo, BinaryPartitionedDataInfoEntries, BlobDriver, BlobHandleAndSize, BlobLike, BlobToURLDriver, BlockCodeFeatureFlags, BlockCodeKnownFeatureFlags, BlockCodeWithInfo, BlockConfigContainer, BlockConfigGeneric, BlockConfigV3Generic, BlockConfigV4Generic, BlockOutputsBase, BlockRenderingMode, BlockSection, BlockSectionDelimiter, BlockSectionLink, BlockSectionLinkAppearance, BlockState, BlockStateV3, BlockUIURL, Branded, BuildQueryInput, CalculateTableDataRequest, CalculateTableDataResponse, CanonicalizedJson, ChunkedStreamReader, ChunkedStreamReaderOptions, Code, ColumnAxesWithQualifications, ColumnFilter, ColumnJoinEntry, ColumnValueType, CompositeLinkerMap, ConstantAxisFilter, ContentHandler, CreateEnrichmentRefOptions, DataExprAxisRef, DataExprColumnRef, DataInfo, DataInfoEntries, DataQuery, DataQueryBooleanExpression, DataQueryColumn, DataQueryExpression, DataQueryFilter, DataQueryInlineColumn, DataQueryJoinEntry, DataQueryLinkerJoin, DataQueryLinkerJoinLinker, DataQueryOuterJoin, DataQuerySliceAxes, DataQuerySort, DataQuerySparseToDenseColumn, DataQuerySymmetricJoin, DatasetInput, DefaultNavigationState, DeleteColumnRequest, DeleteColumnResponse, DialogService, DiscoverColumnsConstraints, DiscoverColumnsFilterStep, DiscoverColumnsLinkerStep, DiscoverColumnsMappingVariant, DiscoverColumnsRequest, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, DiscoverColumnsStepInfo, DiscoveredPColumn, DiscoveredPColumnId, Domain, DomainJson, DriverKit, EnrichmentLinkerStep, EnrichmentRef, EnrichmentStep, ErrorHandlerStatus, EvaluateQueryResponse, FileFilter, FileLike, FileRange, FilterKeysByPrefix, FilterSpec, FilterSpecLeaf, FilterSpecNode, FilterSpecOfType, FilterSpecType, FilteredPColumn, FilteredPColumnId, FindColumnsRequest, FindColumnsResponse, FolderURL, FrontendDriver, FullJoin, FullPTableColumnData, GetContentOptions, HttpAuth, ImportFileHandle, ImportFileHandleIndex, ImportFileHandleUpload, ImportProgress, ImportStatus, IncompatibleFlagsError, InferFilterSpecCommonLeaf, InferFilterSpecCommonNode, InferFilterSpecLeaf, InferFilterSpecLeafColumn, InferServiceKind, InferServiceModel, InferServiceUi, InlineColumnJoinEntry, InnerJoin, Is, IsSubtypeOf, JoinEntry, JsonCompatible, JsonDataInfo, JsonDataInfoEntries, JsonPartitionedDataInfo, JsonPartitionedDataInfoEntries, JsonSerializable, KnownServiceName, LabeledEnrichmentRef, LabeledEnrichmentRefs, LegacyAxisSelector, LinkerMap, ListFilesResult, ListOptionBase, LiveLogHandle, LocalBlobHandle, LocalBlobHandleAndSize, LocalImportFileHandle, LogsDriver, LsDriver, LsEntry, MODEL_SERVICE_METHOD_MAP, MatcherMap, Metadata, MetadataJson, ModelServiceFactoryMap, ModelServiceRegistry, ModelServices, MultiAxisSelector, MultiColumnSelector, NativePObjectId, NavigationState, NodeServiceHandlerMap, OpenDialogFilter, OpenDialogOps, OpenMultipleFilesResponse, OpenSingleFileResponse, Option, OuterJoin, OutputWithStatus, PAxisName, PColumn, PColumnDataEntry, PColumnIdAndSpec, PColumnInfo, PColumnKey, PColumnLazy, PColumnName, PColumnSelector, PColumnSpec, PColumnSpecId, PColumnValue, PColumnValues, PColumnValuesEntry, PDataColumnSpec, PFrame, PFrameDef, PFrameDriver, PFrameDriverError, PFrameError, PFrameHandle, PFrameModelDriver, PFrameSpecDriver, PFrameSpecDriverError, PObject, PObjectId, PObjectSpec, PSpecPredicate, PTable, PTableColumnId, PTableColumnIdAxis, PTableColumnIdColumn, PTableColumnSpec, PTableColumnSpecAxis, PTableColumnSpecColumn, PTableDef, PTableDefV2, PTableDownloadCompression, PTableDownloadFormat, PTableHandle, PTableNA, PTableRecordFilter, PTableRecordSingleValueFilterV2, PTableShape, PTableSorting, PTableValue, PTableValueAxis, PTableValueBranded, PTableValueData, PTableValueDataBranded, PTableValueDouble, PTableValueFloat, PTableValueInt, PTableValueLong, PTableValueString, PTableVector, PTableVectorTyped, PUniversalColumnSpec, PVectorData, PVectorDataBytes, PVectorDataDouble, PVectorDataFloat, PVectorDataInt, PVectorDataLong, PVectorDataString, PVectorDataTyped, ParquetChunk, ParquetChunkMapping, ParquetChunkMappingAxis, ParquetChunkMappingColumn, ParquetChunkMetadata, ParquetChunkStats, ParquetPartitionedDataInfo, ParquetPartitionedDataInfoEntries, PartitionedDataInfoEntries, PlId, PlIdBytes, PlIdLength, PlRef, PoolEntry, PoolEntryGuard, PrimaryRef, ProgressLogWithInfo, ProjectId, REQUIRES_PFRAMES_VERSION, RangeBytes, ReadyLogHandle, Ref, RemoteBlobHandle, RemoteBlobHandleAndSize, RequireServices, ResolveAnchorsOptions, ResourceTypeName, ResourceTypePrefix, ResultCollection, ResultOrError, ResultPoolEntry, RootFilterSpec, RuntimeCapabilities, SERVICE_CAPABILITY_FLAGS, SERVICE_FEATURE_FLAGS, SERVICE_METHOD_MAP, SUniversalPColumnId, SerializedError, ServiceAlreadyRegisteredError, ServiceBrand, ServiceDispatch, ServiceError, ServiceInjectionError, ServiceInvalidIdError, ServiceMethodNotFoundError, ServiceName, ServiceNameLiterals, ServiceNotRegisteredError, ServiceRequireFlags, ServiceType, ServiceTypesLike, Services, ShowSaveDialogOptions, ShowSaveDialogResult, SingleAxisSelector, SingleValueAndPredicateV2, SingleValueEqualPredicate, SingleValueGreaterOrEqualPredicate, SingleValueGreaterPredicate, SingleValueIEqualPredicate, SingleValueInSetPredicate, SingleValueIsNAPredicate, SingleValueLessOrEqualPredicate, SingleValueLessPredicate, SingleValueMatchesPredicate, SingleValueNotPredicateV2, SingleValueOrPredicateV2, SingleValuePredicateV2, SingleValueStringContainsFuzzyPredicate, SingleValueStringContainsPredicate, SingleValueStringIContainsFuzzyPredicate, SingleValueStringIContainsPredicate, SlicedColumnJoinEntry, SpecExprAxisRef, SpecExprColumnRef, SpecFrameHandle, SpecQuery, SpecQueryBooleanExpression, SpecQueryColumn, SpecQueryExpression, SpecQueryFilter, SpecQueryInlineColumn, SpecQueryJoinEntry, SpecQueryLinkerJoin, SpecQueryLinkerJoinLinker, SpecQueryOuterJoin, SpecQuerySliceAxes, SpecQuerySort, SpecQuerySparseToDenseColumn, SpecQuerySymmetricJoin, StorageEntry, StorageHandle, StorageHandleLocal, StorageHandleRemote, StreamingApiResponse, StreamingApiResponseHandleOutdated, StreamingApiResponseOk, StringMatcher, StringifiedJson, SupportedRequirement, TableRange, Trace, TraceEntry, UiError, UiServiceFactoryMap, UiServiceRegistry, UiServices, UniqueValuesRequest, UniqueValuesResponse, UniversalPColumnId, ValueOrError, ValueType, ValueTypeSupported, ValueWithUTag, ValueWithUTagAndAuthor, WritePTableToFsOptions, WritePTableToFsResult, assertNever, base64Decode, base64Encode, bigintReplacer, buildServiceInfo, canonicalizeAxisId, canonicalizeAxisWithParents, canonicalizeJson, checkBlockFlag, collectSpecQueryColumns, createDiscoveredPColumn, createDiscoveredPColumnId, createEnrichmentRef, createNodeServiceHandlers, createPlRef, createPrimaryRef, dataInfoToEntries, deriveNativeId, deserializeError, deserializeResult, digestPlId, ensureError, ensurePColumn, entriesToDataInfo, executePSpecPredicate, extractAllColumns, extractAllRequirements, extractAllSupports, extractCodeWithInfo, extractConfigGeneric, getArrayFromAxisTree, getAxesId, getAxesTree, getAxisId, getColumnIdAndSpec, getDenormalizedAxesList, getFileNameFromHandle, getFilePathFromHandle, getMethodNames, getNormalizedAxesList, getPColumnSpecId, getPTableColumnId, getServiceKind, getServiceModelMethods, getServiceUiMethods, getSetFromAxisTree, getTypeFromPColumnOrAxisSpec, hasAbortError, isAbortError, isAggregateError, isAnchoredPColumnId, isAnyLogHandle, isAxisId, isBlockUIURL, isBooleanExpression, isDataInfo, isDataInfoEntries, isDiscoveredPColumn, isEnrichmentRef, isFilteredPColumn, isFolderURL, isImportFileHandleIndex, isImportFileHandleUpload, isKnownServiceName, isLabelColumn, isLinkerColumn, isLiveLog, isMainService, isNodeService, isPColumn, isPColumnResult, isPColumnSpec, isPColumnSpecResult, isPFrameDriverError, isPFrameError, isPFrameSpecDriverError, isPTableNA, isPartitionedDataInfoEntries, isPlRef, isPrimaryRef, isServiceAlreadyRegisteredError, isServiceError, isServiceInjectionError, isServiceInvalidIdError, isServiceMethodNotFoundError, isServiceNotRegisteredError, isValueNA, isWasmService, legacyColumnSelectorsToPredicate, mapDataInfo, mapDataInfoEntries, mapJoinEntry, mapPObjectData, mapPTableDef, mapPTableDefV2, mapSpecQueryColumns, mapValueInVOE, matchAxis, matchAxisId, matchMultiColumnSelector, matchPColumn, multiColumnSelectorsToPredicate, newRangeBytesOpt, pTableValue, pTableValueBranded, parseColumnId, parseDiscoveredPColumnId, parseHttpAuth, parseJson, plId, plRefsEqual, readAnnotation, readAnnotationJson, readAnnotationJsonOrThrow, readDomain, readDomainJson, readDomainJsonOrThrow, readMetadata, readMetadataJson, readMetadataJsonOrThrow, registerServiceCapabilities, resolveAnchors, resolveAnnotationParents, resolveNodeServiceHandler, resolveRequiredServices, serializeError, serializeHttpAuth, serializeResult, service, serviceFnKey, sortJoinEntry, sortPTableDef, sortSpecQuery, stringifyColumnId, stringifyDiscoveredPColumnId, stringifyJson, traverseQuerySpec, uniqueBy, uniquePlId, unwrapResult, validateRangeBytes, visitDataInfo, withEnrichments, wrapAndSerialize, wrapAndSerializeAsync, wrapAsyncCallback, wrapCallback };
|
package/dist/index.js
CHANGED
|
@@ -26,7 +26,7 @@ import { createDiscoveredPColumn, createDiscoveredPColumnId, isDiscoveredPColumn
|
|
|
26
26
|
import { LinkerMap } from "./drivers/pframe/linker_columns.js";
|
|
27
27
|
import { ChunkedStreamReader } from "./drivers/ChunkedStreamReader.js";
|
|
28
28
|
import "./drivers/index.js";
|
|
29
|
-
import { AllRequiresFeatureFlags, AllSupportsFeatureFlags } from "./flags/block_flags.js";
|
|
29
|
+
import { AllRequiresFeatureFlags, AllSupportsFeatureFlags, REQUIRES_PFRAMES_VERSION } from "./flags/block_flags.js";
|
|
30
30
|
import { IncompatibleFlagsError, RuntimeCapabilities, checkBlockFlag, extractAllRequirements, extractAllSupports } from "./flags/flag_utils.js";
|
|
31
31
|
import { DefaultNavigationState } from "./navigation.js";
|
|
32
32
|
import { PlId, PlIdBytes, PlIdLength, digestPlId, plId, uniquePlId } from "./plid.js";
|
|
@@ -43,4 +43,4 @@ import { createNodeServiceHandlers } from "./services/node_service_handlers.js";
|
|
|
43
43
|
import { MODEL_SERVICE_METHOD_MAP, SERVICE_METHOD_MAP, buildServiceInfo, resolveNodeServiceHandler } from "./services/service_injectors.js";
|
|
44
44
|
import "./services/index.js";
|
|
45
45
|
import { PoolEntryGuard } from "./pool_entry.js";
|
|
46
|
-
export { AbortError, AllRequiresFeatureFlags, AllSupportsFeatureFlags, AnchoredIdDeriver, Annotation, AnnotationJson, ChunkedStreamReader, Code, DefaultNavigationState, Domain, DomainJson, IncompatibleFlagsError, LinkerMap, MODEL_SERVICE_METHOD_MAP, ModelServiceRegistry, PAxisName, PColumnName, PFrameDriverError, PFrameError, PFrameSpecDriverError, PTableNA, PlId, PlIdBytes, PlIdLength, PlRef, PoolEntryGuard, RangeBytes, ResourceTypeName, ResourceTypePrefix, RuntimeCapabilities, SERVICE_CAPABILITY_FLAGS, SERVICE_FEATURE_FLAGS, SERVICE_METHOD_MAP, ServiceAlreadyRegisteredError, ServiceError, ServiceInjectionError, ServiceInvalidIdError, ServiceMethodNotFoundError, ServiceNotRegisteredError, Services, UiError, UiServiceRegistry, ValueType, assertNever, base64Decode, base64Encode, bigintReplacer, buildServiceInfo, canonicalizeAxisId, canonicalizeAxisWithParents, canonicalizeJson, checkBlockFlag, collectSpecQueryColumns, createDiscoveredPColumn, createDiscoveredPColumnId, createEnrichmentRef, createNodeServiceHandlers, createPlRef, createPrimaryRef, dataInfoToEntries, deriveNativeId, deserializeError, deserializeResult, digestPlId, ensureError, ensurePColumn, entriesToDataInfo, executePSpecPredicate, extractAllColumns, extractAllRequirements, extractAllSupports, extractCodeWithInfo, extractConfigGeneric, getArrayFromAxisTree, getAxesId, getAxesTree, getAxisId, getColumnIdAndSpec, getDenormalizedAxesList, getFileNameFromHandle, getFilePathFromHandle, getMethodNames, getNormalizedAxesList, getPColumnSpecId, getPTableColumnId, getServiceKind, getServiceModelMethods, getServiceUiMethods, getSetFromAxisTree, getTypeFromPColumnOrAxisSpec, hasAbortError, isAbortError, isAggregateError, isAnchoredPColumnId, isAnyLogHandle, isAxisId, isBlockUIURL, isBooleanExpression, isDataInfo, isDataInfoEntries, isDiscoveredPColumn, isEnrichmentRef, isFilteredPColumn, isFolderURL, isImportFileHandleIndex, isImportFileHandleUpload, isKnownServiceName, isLabelColumn, isLinkerColumn, isLiveLog, isMainService, isNodeService, isPColumn, isPColumnResult, isPColumnSpec, isPColumnSpecResult, isPFrameDriverError, isPFrameError, isPFrameSpecDriverError, isPTableNA, isPartitionedDataInfoEntries, isPlRef, isPrimaryRef, isServiceAlreadyRegisteredError, isServiceError, isServiceInjectionError, isServiceInvalidIdError, isServiceMethodNotFoundError, isServiceNotRegisteredError, isValueNA, isWasmService, legacyColumnSelectorsToPredicate, mapDataInfo, mapDataInfoEntries, mapJoinEntry, mapPObjectData, mapPTableDef, mapPTableDefV2, mapSpecQueryColumns, mapValueInVOE, matchAxis, matchAxisId, matchMultiColumnSelector, matchPColumn, multiColumnSelectorsToPredicate, newRangeBytesOpt, pTableValue, pTableValueBranded, parseColumnId, parseDiscoveredPColumnId, parseHttpAuth, parseJson, plId, plRefsEqual, readAnnotation, readAnnotationJson, readAnnotationJsonOrThrow, readDomain, readDomainJson, readDomainJsonOrThrow, readMetadata, readMetadataJson, readMetadataJsonOrThrow, registerServiceCapabilities, resolveAnchors, resolveAnnotationParents, resolveNodeServiceHandler, resolveRequiredServices, serializeError, serializeHttpAuth, serializeResult, service, serviceFnKey, sortJoinEntry, sortPTableDef, sortSpecQuery, stringifyColumnId, stringifyDiscoveredPColumnId, stringifyJson, traverseQuerySpec, uniqueBy, uniquePlId, unwrapResult, validateRangeBytes, visitDataInfo, withEnrichments, wrapAndSerialize, wrapAndSerializeAsync, wrapAsyncCallback, wrapCallback };
|
|
46
|
+
export { AbortError, AllRequiresFeatureFlags, AllSupportsFeatureFlags, AnchoredIdDeriver, Annotation, AnnotationJson, ChunkedStreamReader, Code, DefaultNavigationState, Domain, DomainJson, IncompatibleFlagsError, LinkerMap, MODEL_SERVICE_METHOD_MAP, ModelServiceRegistry, PAxisName, PColumnName, PFrameDriverError, PFrameError, PFrameSpecDriverError, PTableNA, PlId, PlIdBytes, PlIdLength, PlRef, PoolEntryGuard, REQUIRES_PFRAMES_VERSION, RangeBytes, ResourceTypeName, ResourceTypePrefix, RuntimeCapabilities, SERVICE_CAPABILITY_FLAGS, SERVICE_FEATURE_FLAGS, SERVICE_METHOD_MAP, ServiceAlreadyRegisteredError, ServiceError, ServiceInjectionError, ServiceInvalidIdError, ServiceMethodNotFoundError, ServiceNotRegisteredError, Services, UiError, UiServiceRegistry, ValueType, assertNever, base64Decode, base64Encode, bigintReplacer, buildServiceInfo, canonicalizeAxisId, canonicalizeAxisWithParents, canonicalizeJson, checkBlockFlag, collectSpecQueryColumns, createDiscoveredPColumn, createDiscoveredPColumnId, createEnrichmentRef, createNodeServiceHandlers, createPlRef, createPrimaryRef, dataInfoToEntries, deriveNativeId, deserializeError, deserializeResult, digestPlId, ensureError, ensurePColumn, entriesToDataInfo, executePSpecPredicate, extractAllColumns, extractAllRequirements, extractAllSupports, extractCodeWithInfo, extractConfigGeneric, getArrayFromAxisTree, getAxesId, getAxesTree, getAxisId, getColumnIdAndSpec, getDenormalizedAxesList, getFileNameFromHandle, getFilePathFromHandle, getMethodNames, getNormalizedAxesList, getPColumnSpecId, getPTableColumnId, getServiceKind, getServiceModelMethods, getServiceUiMethods, getSetFromAxisTree, getTypeFromPColumnOrAxisSpec, hasAbortError, isAbortError, isAggregateError, isAnchoredPColumnId, isAnyLogHandle, isAxisId, isBlockUIURL, isBooleanExpression, isDataInfo, isDataInfoEntries, isDiscoveredPColumn, isEnrichmentRef, isFilteredPColumn, isFolderURL, isImportFileHandleIndex, isImportFileHandleUpload, isKnownServiceName, isLabelColumn, isLinkerColumn, isLiveLog, isMainService, isNodeService, isPColumn, isPColumnResult, isPColumnSpec, isPColumnSpecResult, isPFrameDriverError, isPFrameError, isPFrameSpecDriverError, isPTableNA, isPartitionedDataInfoEntries, isPlRef, isPrimaryRef, isServiceAlreadyRegisteredError, isServiceError, isServiceInjectionError, isServiceInvalidIdError, isServiceMethodNotFoundError, isServiceNotRegisteredError, isValueNA, isWasmService, legacyColumnSelectorsToPredicate, mapDataInfo, mapDataInfoEntries, mapJoinEntry, mapPObjectData, mapPTableDef, mapPTableDefV2, mapSpecQueryColumns, mapValueInVOE, matchAxis, matchAxisId, matchMultiColumnSelector, matchPColumn, multiColumnSelectorsToPredicate, newRangeBytesOpt, pTableValue, pTableValueBranded, parseColumnId, parseDiscoveredPColumnId, parseHttpAuth, parseJson, plId, plRefsEqual, readAnnotation, readAnnotationJson, readAnnotationJsonOrThrow, readDomain, readDomainJson, readDomainJsonOrThrow, readMetadata, readMetadataJson, readMetadataJsonOrThrow, registerServiceCapabilities, resolveAnchors, resolveAnnotationParents, resolveNodeServiceHandler, resolveRequiredServices, serializeError, serializeHttpAuth, serializeResult, service, serviceFnKey, sortJoinEntry, sortPTableDef, sortSpecQuery, stringifyColumnId, stringifyDiscoveredPColumnId, stringifyJson, traverseQuerySpec, uniqueBy, uniquePlId, unwrapResult, validateRangeBytes, visitDataInfo, withEnrichments, wrapAndSerialize, wrapAndSerializeAsync, wrapAsyncCallback, wrapCallback };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Branded } from "./branding.js";
|
|
2
|
+
|
|
3
|
+
//#region src/project_id.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Opaque identifier for a project, safe to persist and reuse across sessions.
|
|
6
|
+
* Internally this is a string derived from resource ID without signature.
|
|
7
|
+
* Unlike SignedResourceId, this does not carry cryptographic signatures and can be
|
|
8
|
+
* safely persisted, serialized, and reused across ML sessions.
|
|
9
|
+
* Absence of signature guarantees this ID cannot be used in transactions 'as-is',
|
|
10
|
+
* requiring the caller to operate with special types and helpers.
|
|
11
|
+
*/
|
|
12
|
+
type ProjectId = Branded<string, "ProjectId">;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { ProjectId };
|
|
15
|
+
//# sourceMappingURL=project_id.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project_id.d.ts","names":[],"sources":["../src/project_id.ts"],"mappings":";;;;;AAUA;;;;;;KAAY,SAAA,GAAY,OAAA"}
|
package/dist/resource_types.cjs
CHANGED
|
@@ -33,6 +33,7 @@ const ResourceTypeName = {
|
|
|
33
33
|
Null: "Null",
|
|
34
34
|
Binary: "binary",
|
|
35
35
|
LSProvider: "LSProvider",
|
|
36
|
+
WorkingDirectory: "WorkingDirectory",
|
|
36
37
|
UserProject: "UserProject",
|
|
37
38
|
Projects: "Projects",
|
|
38
39
|
ClientRoot: "ClientRoot"
|
|
@@ -40,6 +41,9 @@ const ResourceTypeName = {
|
|
|
40
41
|
/** Resource type name prefix constants. */
|
|
41
42
|
const ResourceTypePrefix = {
|
|
42
43
|
Blob: "Blob/",
|
|
44
|
+
LS: "LS/",
|
|
45
|
+
WorkingDirectory: "WorkingDirectory/",
|
|
46
|
+
StorageSpaceAllocation: "StorageSpaceAllocation/",
|
|
43
47
|
BlobUpload: "BlobUpload/",
|
|
44
48
|
BlobIndex: "BlobIndex/",
|
|
45
49
|
PColumnData: "PColumnData/",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource_types.cjs","names":[],"sources":["../src/resource_types.ts"],"sourcesContent":["/** Well-known resource type names used across the platform. */\nexport const ResourceTypeName = {\n StreamManager: \"StreamManager\",\n StdMap: \"StdMap\",\n StdMapSlash: \"std/map\",\n EphStdMap: \"EphStdMap\",\n PFrame: \"PFrame\",\n ParquetChunk: \"ParquetChunk\",\n BContext: \"BContext\",\n BlockPackCustom: \"BlockPackCustom\",\n BinaryMap: \"BinaryMap\",\n BinaryValue: \"BinaryValue\",\n BlobMap: \"BlobMap\",\n BResolveSingle: \"BResolveSingle\",\n BResolveSingleNoResult: \"BResolveSingleNoResult\",\n BQueryResult: \"BQueryResult\",\n TengoTemplate: \"TengoTemplate\",\n TengoLib: \"TengoLib\",\n SoftwareInfo: \"SoftwareInfo\",\n Dummy: \"Dummy\",\n JsonResourceError: \"json/resourceError\",\n JsonObject: \"json/object\",\n JsonGzObject: \"json-gz/object\",\n JsonString: \"json/string\",\n JsonArray: \"json/array\",\n JsonNumber: \"json/number\",\n BContextEnd: \"BContextEnd\",\n FrontendFromUrl: \"Frontend/FromUrl\",\n FrontendFromFolder: \"Frontend/FromFolder\",\n BObjectSpec: \"BObjectSpec\",\n Blob: \"Blob\",\n Null: \"Null\",\n Binary: \"binary\",\n LSProvider: \"LSProvider\",\n UserProject: \"UserProject\",\n Projects: \"Projects\",\n ClientRoot: \"ClientRoot\",\n} as const;\n\n/** Resource type name prefix constants. */\nexport const ResourceTypePrefix = {\n Blob: \"Blob/\",\n BlobUpload: \"BlobUpload/\",\n BlobIndex: \"BlobIndex/\",\n PColumnData: \"PColumnData/\",\n StreamWorkdir: \"StreamWorkdir/\",\n} as const;\n"],"mappings":";;AACA,MAAa,mBAAmB;CAC9B,eAAe;CACf,QAAQ;CACR,aAAa;CACb,WAAW;CACX,QAAQ;CACR,cAAc;CACd,UAAU;CACV,iBAAiB;CACjB,WAAW;CACX,aAAa;CACb,SAAS;CACT,gBAAgB;CAChB,wBAAwB;CACxB,cAAc;CACd,eAAe;CACf,UAAU;CACV,cAAc;CACd,OAAO;CACP,mBAAmB;CACnB,YAAY;CACZ,cAAc;CACd,YAAY;CACZ,WAAW;CACX,YAAY;CACZ,aAAa;CACb,iBAAiB;CACjB,oBAAoB;CACpB,aAAa;CACb,MAAM;CACN,MAAM;CACN,QAAQ;CACR,YAAY;CACZ,aAAa;CACb,UAAU;CACV,YAAY;CACb;;AAGD,MAAa,qBAAqB;CAChC,MAAM;CACN,YAAY;CACZ,WAAW;CACX,aAAa;CACb,eAAe;CAChB"}
|
|
1
|
+
{"version":3,"file":"resource_types.cjs","names":[],"sources":["../src/resource_types.ts"],"sourcesContent":["/** Well-known resource type names used across the platform. */\nexport const ResourceTypeName = {\n StreamManager: \"StreamManager\",\n StdMap: \"StdMap\",\n StdMapSlash: \"std/map\",\n EphStdMap: \"EphStdMap\",\n PFrame: \"PFrame\",\n ParquetChunk: \"ParquetChunk\",\n BContext: \"BContext\",\n BlockPackCustom: \"BlockPackCustom\",\n BinaryMap: \"BinaryMap\",\n BinaryValue: \"BinaryValue\",\n BlobMap: \"BlobMap\",\n BResolveSingle: \"BResolveSingle\",\n BResolveSingleNoResult: \"BResolveSingleNoResult\",\n BQueryResult: \"BQueryResult\",\n TengoTemplate: \"TengoTemplate\",\n TengoLib: \"TengoLib\",\n SoftwareInfo: \"SoftwareInfo\",\n Dummy: \"Dummy\",\n JsonResourceError: \"json/resourceError\",\n JsonObject: \"json/object\",\n JsonGzObject: \"json-gz/object\",\n JsonString: \"json/string\",\n JsonArray: \"json/array\",\n JsonNumber: \"json/number\",\n BContextEnd: \"BContextEnd\",\n FrontendFromUrl: \"Frontend/FromUrl\",\n FrontendFromFolder: \"Frontend/FromFolder\",\n BObjectSpec: \"BObjectSpec\",\n Blob: \"Blob\",\n Null: \"Null\",\n Binary: \"binary\",\n LSProvider: \"LSProvider\",\n WorkingDirectory: \"WorkingDirectory\",\n UserProject: \"UserProject\",\n Projects: \"Projects\",\n ClientRoot: \"ClientRoot\",\n} as const;\n\n/** Resource type name prefix constants. */\nexport const ResourceTypePrefix = {\n Blob: \"Blob/\",\n LS: \"LS/\",\n WorkingDirectory: \"WorkingDirectory/\",\n StorageSpaceAllocation: \"StorageSpaceAllocation/\",\n BlobUpload: \"BlobUpload/\",\n BlobIndex: \"BlobIndex/\",\n PColumnData: \"PColumnData/\",\n StreamWorkdir: \"StreamWorkdir/\",\n} as const;\n"],"mappings":";;AACA,MAAa,mBAAmB;CAC9B,eAAe;CACf,QAAQ;CACR,aAAa;CACb,WAAW;CACX,QAAQ;CACR,cAAc;CACd,UAAU;CACV,iBAAiB;CACjB,WAAW;CACX,aAAa;CACb,SAAS;CACT,gBAAgB;CAChB,wBAAwB;CACxB,cAAc;CACd,eAAe;CACf,UAAU;CACV,cAAc;CACd,OAAO;CACP,mBAAmB;CACnB,YAAY;CACZ,cAAc;CACd,YAAY;CACZ,WAAW;CACX,YAAY;CACZ,aAAa;CACb,iBAAiB;CACjB,oBAAoB;CACpB,aAAa;CACb,MAAM;CACN,MAAM;CACN,QAAQ;CACR,YAAY;CACZ,kBAAkB;CAClB,aAAa;CACb,UAAU;CACV,YAAY;CACb;;AAGD,MAAa,qBAAqB;CAChC,MAAM;CACN,IAAI;CACJ,kBAAkB;CAClB,wBAAwB;CACxB,YAAY;CACZ,WAAW;CACX,aAAa;CACb,eAAe;CAChB"}
|
package/dist/resource_types.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ declare const ResourceTypeName: {
|
|
|
33
33
|
readonly Null: "Null";
|
|
34
34
|
readonly Binary: "binary";
|
|
35
35
|
readonly LSProvider: "LSProvider";
|
|
36
|
+
readonly WorkingDirectory: "WorkingDirectory";
|
|
36
37
|
readonly UserProject: "UserProject";
|
|
37
38
|
readonly Projects: "Projects";
|
|
38
39
|
readonly ClientRoot: "ClientRoot";
|
|
@@ -40,6 +41,9 @@ declare const ResourceTypeName: {
|
|
|
40
41
|
/** Resource type name prefix constants. */
|
|
41
42
|
declare const ResourceTypePrefix: {
|
|
42
43
|
readonly Blob: "Blob/";
|
|
44
|
+
readonly LS: "LS/";
|
|
45
|
+
readonly WorkingDirectory: "WorkingDirectory/";
|
|
46
|
+
readonly StorageSpaceAllocation: "StorageSpaceAllocation/";
|
|
43
47
|
readonly BlobUpload: "BlobUpload/";
|
|
44
48
|
readonly BlobIndex: "BlobIndex/";
|
|
45
49
|
readonly PColumnData: "PColumnData/";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource_types.d.ts","names":[],"sources":["../src/resource_types.ts"],"mappings":";;cACa,gBAAA;EAAA
|
|
1
|
+
{"version":3,"file":"resource_types.d.ts","names":[],"sources":["../src/resource_types.ts"],"mappings":";;cACa,gBAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAwCA,kBAAA;EAAA"}
|
package/dist/resource_types.js
CHANGED
|
@@ -33,6 +33,7 @@ const ResourceTypeName = {
|
|
|
33
33
|
Null: "Null",
|
|
34
34
|
Binary: "binary",
|
|
35
35
|
LSProvider: "LSProvider",
|
|
36
|
+
WorkingDirectory: "WorkingDirectory",
|
|
36
37
|
UserProject: "UserProject",
|
|
37
38
|
Projects: "Projects",
|
|
38
39
|
ClientRoot: "ClientRoot"
|
|
@@ -40,6 +41,9 @@ const ResourceTypeName = {
|
|
|
40
41
|
/** Resource type name prefix constants. */
|
|
41
42
|
const ResourceTypePrefix = {
|
|
42
43
|
Blob: "Blob/",
|
|
44
|
+
LS: "LS/",
|
|
45
|
+
WorkingDirectory: "WorkingDirectory/",
|
|
46
|
+
StorageSpaceAllocation: "StorageSpaceAllocation/",
|
|
43
47
|
BlobUpload: "BlobUpload/",
|
|
44
48
|
BlobIndex: "BlobIndex/",
|
|
45
49
|
PColumnData: "PColumnData/",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource_types.js","names":[],"sources":["../src/resource_types.ts"],"sourcesContent":["/** Well-known resource type names used across the platform. */\nexport const ResourceTypeName = {\n StreamManager: \"StreamManager\",\n StdMap: \"StdMap\",\n StdMapSlash: \"std/map\",\n EphStdMap: \"EphStdMap\",\n PFrame: \"PFrame\",\n ParquetChunk: \"ParquetChunk\",\n BContext: \"BContext\",\n BlockPackCustom: \"BlockPackCustom\",\n BinaryMap: \"BinaryMap\",\n BinaryValue: \"BinaryValue\",\n BlobMap: \"BlobMap\",\n BResolveSingle: \"BResolveSingle\",\n BResolveSingleNoResult: \"BResolveSingleNoResult\",\n BQueryResult: \"BQueryResult\",\n TengoTemplate: \"TengoTemplate\",\n TengoLib: \"TengoLib\",\n SoftwareInfo: \"SoftwareInfo\",\n Dummy: \"Dummy\",\n JsonResourceError: \"json/resourceError\",\n JsonObject: \"json/object\",\n JsonGzObject: \"json-gz/object\",\n JsonString: \"json/string\",\n JsonArray: \"json/array\",\n JsonNumber: \"json/number\",\n BContextEnd: \"BContextEnd\",\n FrontendFromUrl: \"Frontend/FromUrl\",\n FrontendFromFolder: \"Frontend/FromFolder\",\n BObjectSpec: \"BObjectSpec\",\n Blob: \"Blob\",\n Null: \"Null\",\n Binary: \"binary\",\n LSProvider: \"LSProvider\",\n UserProject: \"UserProject\",\n Projects: \"Projects\",\n ClientRoot: \"ClientRoot\",\n} as const;\n\n/** Resource type name prefix constants. */\nexport const ResourceTypePrefix = {\n Blob: \"Blob/\",\n BlobUpload: \"BlobUpload/\",\n BlobIndex: \"BlobIndex/\",\n PColumnData: \"PColumnData/\",\n StreamWorkdir: \"StreamWorkdir/\",\n} as const;\n"],"mappings":";;AACA,MAAa,mBAAmB;CAC9B,eAAe;CACf,QAAQ;CACR,aAAa;CACb,WAAW;CACX,QAAQ;CACR,cAAc;CACd,UAAU;CACV,iBAAiB;CACjB,WAAW;CACX,aAAa;CACb,SAAS;CACT,gBAAgB;CAChB,wBAAwB;CACxB,cAAc;CACd,eAAe;CACf,UAAU;CACV,cAAc;CACd,OAAO;CACP,mBAAmB;CACnB,YAAY;CACZ,cAAc;CACd,YAAY;CACZ,WAAW;CACX,YAAY;CACZ,aAAa;CACb,iBAAiB;CACjB,oBAAoB;CACpB,aAAa;CACb,MAAM;CACN,MAAM;CACN,QAAQ;CACR,YAAY;CACZ,aAAa;CACb,UAAU;CACV,YAAY;CACb;;AAGD,MAAa,qBAAqB;CAChC,MAAM;CACN,YAAY;CACZ,WAAW;CACX,aAAa;CACb,eAAe;CAChB"}
|
|
1
|
+
{"version":3,"file":"resource_types.js","names":[],"sources":["../src/resource_types.ts"],"sourcesContent":["/** Well-known resource type names used across the platform. */\nexport const ResourceTypeName = {\n StreamManager: \"StreamManager\",\n StdMap: \"StdMap\",\n StdMapSlash: \"std/map\",\n EphStdMap: \"EphStdMap\",\n PFrame: \"PFrame\",\n ParquetChunk: \"ParquetChunk\",\n BContext: \"BContext\",\n BlockPackCustom: \"BlockPackCustom\",\n BinaryMap: \"BinaryMap\",\n BinaryValue: \"BinaryValue\",\n BlobMap: \"BlobMap\",\n BResolveSingle: \"BResolveSingle\",\n BResolveSingleNoResult: \"BResolveSingleNoResult\",\n BQueryResult: \"BQueryResult\",\n TengoTemplate: \"TengoTemplate\",\n TengoLib: \"TengoLib\",\n SoftwareInfo: \"SoftwareInfo\",\n Dummy: \"Dummy\",\n JsonResourceError: \"json/resourceError\",\n JsonObject: \"json/object\",\n JsonGzObject: \"json-gz/object\",\n JsonString: \"json/string\",\n JsonArray: \"json/array\",\n JsonNumber: \"json/number\",\n BContextEnd: \"BContextEnd\",\n FrontendFromUrl: \"Frontend/FromUrl\",\n FrontendFromFolder: \"Frontend/FromFolder\",\n BObjectSpec: \"BObjectSpec\",\n Blob: \"Blob\",\n Null: \"Null\",\n Binary: \"binary\",\n LSProvider: \"LSProvider\",\n WorkingDirectory: \"WorkingDirectory\",\n UserProject: \"UserProject\",\n Projects: \"Projects\",\n ClientRoot: \"ClientRoot\",\n} as const;\n\n/** Resource type name prefix constants. */\nexport const ResourceTypePrefix = {\n Blob: \"Blob/\",\n LS: \"LS/\",\n WorkingDirectory: \"WorkingDirectory/\",\n StorageSpaceAllocation: \"StorageSpaceAllocation/\",\n BlobUpload: \"BlobUpload/\",\n BlobIndex: \"BlobIndex/\",\n PColumnData: \"PColumnData/\",\n StreamWorkdir: \"StreamWorkdir/\",\n} as const;\n"],"mappings":";;AACA,MAAa,mBAAmB;CAC9B,eAAe;CACf,QAAQ;CACR,aAAa;CACb,WAAW;CACX,QAAQ;CACR,cAAc;CACd,UAAU;CACV,iBAAiB;CACjB,WAAW;CACX,aAAa;CACb,SAAS;CACT,gBAAgB;CAChB,wBAAwB;CACxB,cAAc;CACd,eAAe;CACf,UAAU;CACV,cAAc;CACd,OAAO;CACP,mBAAmB;CACnB,YAAY;CACZ,cAAc;CACd,YAAY;CACZ,WAAW;CACX,YAAY;CACZ,aAAa;CACb,iBAAiB;CACjB,oBAAoB;CACpB,aAAa;CACb,MAAM;CACN,MAAM;CACN,QAAQ;CACR,YAAY;CACZ,kBAAkB;CAClB,aAAa;CACb,UAAU;CACV,YAAY;CACb;;AAGD,MAAa,qBAAqB;CAChC,MAAM;CACN,IAAI;CACJ,kBAAkB;CAClB,wBAAwB;CACxB,YAAY;CACZ,WAAW;CACX,aAAa;CACb,eAAe;CAChB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/pl-model-common",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.40.0",
|
|
4
4
|
"description": "Platforma SDK Model",
|
|
5
5
|
"files": [
|
|
6
6
|
"./dist/**/*",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"typescript": "~5.9.3",
|
|
28
28
|
"vitest": "^4.1.3",
|
|
29
29
|
"@milaboratories/build-configs": "2.0.0",
|
|
30
|
-
"@milaboratories/ts-
|
|
31
|
-
"@milaboratories/ts-
|
|
30
|
+
"@milaboratories/ts-configs": "1.2.3",
|
|
31
|
+
"@milaboratories/ts-builder": "1.4.0"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"build": "ts-builder build --target node",
|
package/src/drivers/ls.ts
CHANGED
|
@@ -32,12 +32,12 @@ export type StorageHandleRemote = `remote://${string}`;
|
|
|
32
32
|
export type StorageHandle = StorageHandleLocal | StorageHandleRemote;
|
|
33
33
|
|
|
34
34
|
export type StorageEntry = {
|
|
35
|
+
/** Stable machine identifier (e.g. "library", "root", "local"). Used for filtering. */
|
|
36
|
+
id: string;
|
|
37
|
+
/** Human-readable display name. */
|
|
35
38
|
name: string;
|
|
36
39
|
handle: StorageHandle;
|
|
37
40
|
initialFullPath: string;
|
|
38
|
-
|
|
39
|
-
// TODO
|
|
40
|
-
// pathStartsWithDisk
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
export type ListFilesResult = {
|
package/src/flags/block_flags.ts
CHANGED
|
@@ -21,13 +21,22 @@ export type BlockCodeKnownFeatureFlags = {
|
|
|
21
21
|
readonly requiresModelAPIVersion?: number;
|
|
22
22
|
readonly requiresUIAPIVersion?: number;
|
|
23
23
|
readonly requiresCreatePTable?: number;
|
|
24
|
+
readonly requiresPFramesVersion?: number;
|
|
24
25
|
} & ServiceRequireFlags;
|
|
25
26
|
|
|
27
|
+
/**
|
|
28
|
+
* Required PFrames version. Bump this in lockstep with the `@milaboratories/pframes-rs-*`
|
|
29
|
+
* version in `pnpm-workspace.yaml` so blocks built against the new SDK refuse to load on
|
|
30
|
+
* older desktop apps.
|
|
31
|
+
*/
|
|
32
|
+
export const REQUIRES_PFRAMES_VERSION = 1_001_031;
|
|
33
|
+
|
|
26
34
|
export const AllSupportsFeatureFlags = ["supportsLazyState", "supportsPframeQueryRanking"] as const;
|
|
27
35
|
|
|
28
36
|
export const AllRequiresFeatureFlags = [
|
|
29
37
|
"requiresUIAPIVersion",
|
|
30
38
|
"requiresCreatePTable",
|
|
39
|
+
"requiresPFramesVersion",
|
|
31
40
|
"requiresModelAPIVersion",
|
|
32
41
|
] as const;
|
|
33
42
|
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Branded } from "./branding";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Opaque identifier for a project, safe to persist and reuse across sessions.
|
|
5
|
+
* Internally this is a string derived from resource ID without signature.
|
|
6
|
+
* Unlike SignedResourceId, this does not carry cryptographic signatures and can be
|
|
7
|
+
* safely persisted, serialized, and reused across ML sessions.
|
|
8
|
+
* Absence of signature guarantees this ID cannot be used in transactions 'as-is',
|
|
9
|
+
* requiring the caller to operate with special types and helpers.
|
|
10
|
+
*/
|
|
11
|
+
export type ProjectId = Branded<string, "ProjectId">;
|
package/src/resource_types.ts
CHANGED
|
@@ -32,6 +32,7 @@ export const ResourceTypeName = {
|
|
|
32
32
|
Null: "Null",
|
|
33
33
|
Binary: "binary",
|
|
34
34
|
LSProvider: "LSProvider",
|
|
35
|
+
WorkingDirectory: "WorkingDirectory",
|
|
35
36
|
UserProject: "UserProject",
|
|
36
37
|
Projects: "Projects",
|
|
37
38
|
ClientRoot: "ClientRoot",
|
|
@@ -40,6 +41,9 @@ export const ResourceTypeName = {
|
|
|
40
41
|
/** Resource type name prefix constants. */
|
|
41
42
|
export const ResourceTypePrefix = {
|
|
42
43
|
Blob: "Blob/",
|
|
44
|
+
LS: "LS/",
|
|
45
|
+
WorkingDirectory: "WorkingDirectory/",
|
|
46
|
+
StorageSpaceAllocation: "StorageSpaceAllocation/",
|
|
43
47
|
BlobUpload: "BlobUpload/",
|
|
44
48
|
BlobIndex: "BlobIndex/",
|
|
45
49
|
PColumnData: "PColumnData/",
|