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

Function pluginStorageEntryFromRow

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

Source from the content-addressed store, hash-verified

1013// ---------------------------------------------------------------------------
1014
1015const pluginStorageEntryFromRow = <T>(row: CoreRow<"plugin_storage">): PluginStorageEntry<T> => ({
1016 id: pluginStorageId({
1017 pluginId: row.plugin_id,
1018 collection: row.collection,
1019 key: row.key,
1020 }),
1021 owner: row.owner as Owner,
1022 pluginId: row.plugin_id,
1023 collection: row.collection,
1024 key: row.key,
1025 data: row.data as T,
1026 createdAt: row.created_at instanceof Date ? row.created_at : new Date(row.created_at),
1027 updatedAt: row.updated_at instanceof Date ? row.updated_at : new Date(row.updated_at),
1028});
1029
1030const pluginStorageIndexSpecFields = (spec: PluginStorageRuntimeIndexSpec): readonly string[] =>
1031 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