@veramo/remote-client
Advanced tools
Comparing version 1.1.1-next.14 to 1.1.1-next.15
@@ -5,6 +5,6 @@ "use strict"; | ||
const getOpenApiSchema = (agent, basePath, exposedMethods, name, version) => { | ||
var _a; | ||
const agentSchema = agent.getSchema(); | ||
const paths = {}; | ||
const schemas = {}; | ||
const xMethods = {}; | ||
for (const method of exposedMethods) { | ||
@@ -44,2 +44,3 @@ const pathItemObject = { | ||
paths[basePath + '/' + method] = pathItemObject; | ||
xMethods[method] = agentSchema.components.methods[method]; | ||
} | ||
@@ -57,6 +58,3 @@ const openApi = { | ||
}; | ||
if ((_a = openApi.components) === null || _a === void 0 ? void 0 : _a.schemas) { | ||
//@ts-ignore | ||
openApi['x-methods'] = agent.getSchema().components.methods; | ||
} | ||
openApi['x-methods'] = xMethods; | ||
return openApi; | ||
@@ -63,0 +61,0 @@ }; |
{ | ||
"name": "@veramo/remote-client", | ||
"description": "A remote client plugin for Veramo", | ||
"version": "1.1.1-next.14+ec3367da", | ||
"version": "1.1.1-next.15+faa7940c", | ||
"main": "build/index.js", | ||
@@ -12,3 +12,3 @@ "types": "build/index.d.ts", | ||
"dependencies": { | ||
"@veramo/core": "^1.1.1-next.14+ec3367da", | ||
"@veramo/core": "^1.1.1-next.15+faa7940c", | ||
"cross-fetch": "^3.0.5", | ||
@@ -41,3 +41,3 @@ "debug": "^4.1.1", | ||
"keywords": [], | ||
"gitHead": "ec3367da37ac960c09e85236ccd1f7682132864a" | ||
"gitHead": "faa7940c515bbd65dfaf9370594794f627099a38" | ||
} |
@@ -16,2 +16,3 @@ import { OpenAPIV3 } from 'openapi-types' | ||
const schemas = {} | ||
const xMethods: Record<string,any> = {} | ||
@@ -52,5 +53,6 @@ for (const method of exposedMethods) { | ||
paths[basePath + '/' + method] = pathItemObject | ||
xMethods[method] = agentSchema.components.methods[method] | ||
} | ||
const openApi: OpenAPIV3.Document = { | ||
const openApi: OpenAPIV3.Document & {'x-methods'?: Record<string, any>} = { | ||
openapi: '3.0.0', | ||
@@ -67,8 +69,5 @@ info: { | ||
if (openApi.components?.schemas) { | ||
//@ts-ignore | ||
openApi['x-methods'] = agent.getSchema().components.methods | ||
} | ||
openApi['x-methods'] = xMethods | ||
return openApi | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
25434
243