MCPcopy
hub / github.com/npmx-dev/npmx.dev / createMockConnectorState

Function createMockConnectorState

cli/src/mock-state.ts:65–81  ·  view source on GitHub ↗
(config: MockConnectorConfig)

Source from the content-addressed store, hash-verified

63}
64
65export function createMockConnectorState(config: MockConnectorConfig): MockConnectorStateData {
66 return {
67 config: {
68 port: 31415,
69 avatar: null,
70 ...config,
71 },
72 connected: false,
73 connectedAt: null,
74 orgs: {},
75 packages: {},
76 userPackages: {},
77 userOrgs: [],
78 operations: [],
79 operationIdCounter: 0,
80 }
81}
82
83/**
84 * Mock connector state, shared between the HTTP server and composable mock.

Callers 3

runFunction · 0.90
createManagerFunction · 0.90
initGlobalMockStateFunction · 0.90

Calls

no outgoing calls

Tested by 1

createManagerFunction · 0.72