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

Function pluginStorageEntryFromRow

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

Source from the content-addressed store, hash-verified

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