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

Function pluginStorageEntryFromRow

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

Source from the content-addressed store, hash-verified

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