MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / pluginStorageEntryFromRow

Function pluginStorageEntryFromRow

packages/core/sdk/src/executor.ts:777–790  ·  view source on GitHub ↗
(row: CoreRow<"plugin_storage">)

Source from the content-addressed store, hash-verified

775// ---------------------------------------------------------------------------
776
777const pluginStorageEntryFromRow = <T>(row: CoreRow<"plugin_storage">): PluginStorageEntry<T> => ({
778 id: pluginStorageId({
779 pluginId: row.plugin_id,
780 collection: row.collection,
781 key: row.key,
782 }),
783 owner: row.owner as Owner,
784 pluginId: row.plugin_id,
785 collection: row.collection,
786 key: row.key,
787 data: row.data as T,
788 createdAt: row.created_at instanceof Date ? row.created_at : new Date(row.created_at),
789 updatedAt: row.updated_at instanceof Date ? row.updated_at : new Date(row.updated_at),
790});
791
792const pluginStorageIndexSpecFields = (spec: PluginStorageRuntimeIndexSpec): readonly string[] =>
793 typeof spec === "string" ? [spec] : spec;

Callers 5

getVisibleFunction · 0.85
getForOwnerImplFunction · 0.85
putImplFunction · 0.85
queryCollectionFunction · 0.85
makePluginStorageFacadeFunction · 0.85

Calls 1

pluginStorageIdFunction · 0.90

Tested by

no test coverage detected