MCPcopy Index your code
hub / github.com/npmx-dev/npmx.dev / addOperation

Method addOperation

cli/src/mock-state.ts:186–200  ·  view source on GitHub ↗
(operation: NewOperationInput)

Source from the content-addressed store, hash-verified

184 // -- Operations queue --
185
186 addOperation(operation: NewOperationInput): PendingOperation {
187 const id = `op-${++this.state.operationIdCounter}`
188 const newOp: PendingOperation = {
189 id,
190 type: operation.type,
191 params: operation.params,
192 description: operation.description,
193 command: operation.command,
194 status: 'pending',
195 createdAt: Date.now(),
196 dependsOn: operation.dependsOn,
197 }
198 this.state.operations.push(newOp)
199 return newOp
200 }
201
202 addOperations(operations: NewOperationInput[]): PendingOperation[] {
203 return operations.map(op => this.addOperation(op))

Callers 2

addOperationsMethod · 0.95
createMockConnectorAppFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected