Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bearer/openapi-generator

Package Overview
Dependencies
Maintainers
4
Versions
174
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bearer/openapi-generator - npm Package Compare versions

Comparing version 0.100.1-canary.53 to 0.100.1-canary.102

48

CHANGELOG.md

@@ -6,2 +6,50 @@ # Change Log

## [0.106.1](https://github.com/Bearer/bearer/compare/v0.106.0...v0.106.1) (2019-03-28)
**Note:** Version bump only for package @bearer/openapi-generator
# [0.106.0](https://github.com/Bearer/bearer/compare/v0.105.1...v0.106.0) (2019-03-28)
**Note:** Version bump only for package @bearer/openapi-generator
# [0.105.0](https://github.com/Bearer/bearer/compare/v0.104.0...v0.105.0) (2019-03-21)
**Note:** Version bump only for package @bearer/openapi-generator
# [0.104.0](https://github.com/Bearer/bearer/compare/v0.103.0...v0.104.0) (2019-03-20)
**Note:** Version bump only for package @bearer/openapi-generator
# [0.103.0](https://github.com/Bearer/bearer/compare/v0.102.0...v0.103.0) (2019-03-19)
**Note:** Version bump only for package @bearer/openapi-generator
# [0.102.0](https://github.com/Bearer/bearer/compare/v0.101.3...v0.102.0) (2019-03-19)
**Note:** Version bump only for package @bearer/openapi-generator
# [0.101.0](https://github.com/Bearer/bearer/compare/v0.100.0...v0.101.0) (2019-03-15)

@@ -8,0 +56,0 @@

22

lib/index.js

@@ -32,9 +32,4 @@ "use strict";

const returnTypeNode = method.type;
let dataIndex = 0; // index of ReturnedData in TFetchPromise<ReturnedData, ReturnedError>
let errorIndex = 1; // index of ReturnedError in TFetchPromise<ReturnedData, ReturnedError>
const typeName = checker.typeToString(checker.getTypeFromTypeNode(returnTypeNode));
if (typeName.startsWith('Promise<TSaveStatePayload')) {
dataIndex = 1; // index of ReturnedData in TSavePromise<State, ReturnedData, ReturnedError>
errorIndex = 2; // index of ReturnedData in TSavePromise<State, ReturnedData, ReturnedError>
}
const dataIndex = 0; // index of ReturnedData in TFetchPromise<ReturnedData, ReturnedError>
const errorIndex = 1; // index of ReturnedError in TFetchPromise<ReturnedData, ReturnedError>
if (returnTypeNode && typescript_1.default.isTypeReferenceNode(returnTypeNode)) {

@@ -52,9 +47,2 @@ const typeData = checker.getTypeFromTypeNode(returnTypeNode.typeArguments[dataIndex]);

}
function resolveParameterTypeIndex(t, checker, i, j) {
let index = i;
if (checker.typeToString(t).startsWith('TSaveActionEvent')) {
index = j;
}
return index;
}
/**

@@ -67,4 +55,3 @@ * Find the Parameter type in func and convert it to json-schema

if (typ.aliasTypeArguments) {
const index = resolveParameterTypeIndex(typ, checker, 0, 1);
return convert_type_1.convertType(typ.aliasTypeArguments[index], checker);
return convert_type_1.convertType(typ.aliasTypeArguments[0], checker);
}

@@ -83,4 +70,3 @@ }

if (typ.aliasTypeArguments) {
const index = resolveParameterTypeIndex(typ, checker, 1, 2);
const authType = checker.typeToString(typ.aliasTypeArguments[index]);
const authType = checker.typeToString(typ.aliasTypeArguments[1]);
if (/apiKey/.test(authType))

@@ -87,0 +73,0 @@ return 'APIKEY';

{
"name": "@bearer/openapi-generator",
"version": "0.100.1-canary.53+6e0c113c",
"version": "0.100.1-canary.102+c58abdb9",
"description": "Function openapi spec generator",

@@ -32,6 +32,6 @@ "main": "lib/index.js",

"dependencies": {
"@bearer/functions": "^0.100.1-canary.53+6e0c113c",
"@bearer/functions": "^0.100.1-canary.102+c58abdb9",
"lodash.merge": "^4.6.1"
},
"gitHead": "6e0c113cdff3976c3425269903377801c7e6ac6f"
"gitHead": "c58abdb946593b117e2f7de3d185fc48e3991c8e"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc