MCPcopy Create free account
hub / github.com/acode/cli / createContext

Method createContext

cli/local_gateway.js:46–58  ·  view source on GitHub ↗
(req, definitions, params, data, buffer)

Source from the content-addressed store, hash-verified

44 }
45
46 createContext (req, definitions, params, data, buffer) {
47 let context = super.createContext(req, definitions, params, data, buffer);
48 context.service = {};
49 context.service.name = this.serviceName;
50 context.service.path = this.serviceName.split('/');
51 context.service.version = null;
52 context.service.environment = 'local';
53 context.service.identifier = `${context.service.path.join('.')}[@${context.service.version || context.service.environment}]`;
54 context.service.uuid = '000000';
55 context.service.hash = '000000';
56 context.providers = context.providers || {};
57 return context;
58 }
59
60 resolve (req, res, buffer, callback) {
61 let urlinfo = url.parse(req.url, true);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected