Comparing version 0.18.0 to 0.18.1-alpha-20231123170130-56a56a6
{ | ||
"name": "sofa-api", | ||
"version": "0.18.0", | ||
"version": "0.18.1-alpha-20231123170130-56a56a6", | ||
"description": "Create REST APIs with GraphQL", | ||
@@ -11,5 +11,5 @@ "sideEffects": false, | ||
"@graphql-tools/utils": "^10.0.0", | ||
"@whatwg-node/fetch": "^0.9.0", | ||
"@whatwg-node/fetch": "^0.9.14", | ||
"fets": "^0.6.4", | ||
"ansi-colors": "^4.1.3", | ||
"fets": "^0.2.0", | ||
"openapi-types": "^12.1.0", | ||
@@ -36,19 +36,26 @@ "param-case": "^3.0.4", | ||
"license": "MIT", | ||
"main": "index.js", | ||
"module": "index.mjs", | ||
"typings": "index.d.ts", | ||
"main": "cjs/index.js", | ||
"module": "esm/index.js", | ||
"typings": "typings/index.d.ts", | ||
"typescript": { | ||
"definition": "index.d.ts" | ||
"definition": "typings/index.d.ts" | ||
}, | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"require": "./index.js", | ||
"import": "./index.mjs" | ||
"require": { | ||
"types": "./typings/index.d.cts", | ||
"default": "./cjs/index.js" | ||
}, | ||
"import": { | ||
"types": "./typings/index.d.ts", | ||
"default": "./esm/index.js" | ||
}, | ||
"default": { | ||
"types": "./typings/index.d.ts", | ||
"default": "./esm/index.js" | ||
} | ||
}, | ||
"./*": { | ||
"require": "./*.js", | ||
"import": "./*.mjs" | ||
}, | ||
"./package.json": "./package.json" | ||
} | ||
} | ||
} |
@@ -353,12 +353,12 @@ [](https://www.sofa-api.com) | ||
}, | ||
tags: [ | ||
{ | ||
name: 'Book', | ||
description: 'Book related operations', | ||
}, | ||
{ | ||
name: 'Author', | ||
description: 'Author related operations', | ||
}, | ||
], | ||
tags: [ | ||
{ | ||
name: 'Book', | ||
description: 'Book related operations', | ||
}, | ||
{ | ||
name: 'Author', | ||
description: 'Author related operations', | ||
}, | ||
], | ||
}); | ||
@@ -370,6 +370,6 @@ ``` | ||
export class BookResolver { | ||
@Query(() => Book, { description: 'Get book by id' }) // custom summary tag | ||
getBookById(@Arg('id', () => Int) id: number) { | ||
return 'book'; | ||
} | ||
@Query(() => Book, { description: 'Get book by id' }) // custom summary tag | ||
getBookById(@Arg('id', () => Int) id: number) { | ||
return 'book'; | ||
} | ||
} | ||
@@ -380,23 +380,23 @@ ``` | ||
const routes: SofaConfig['routes'] = { | ||
'Query.getBookById': { | ||
method: 'POST', | ||
path: '/book/:id', | ||
tags: ['Book'], | ||
description: 'This is a custom detailed description for getBookById', | ||
}, | ||
} | ||
'Query.getBookById': { | ||
method: 'POST', | ||
path: '/book/:id', | ||
tags: ['Book'], | ||
description: 'This is a custom detailed description for getBookById', | ||
}, | ||
}; | ||
const createSofaMiddleware = ( | ||
schema: GraphQLSchema, | ||
openApi: ReturnType<typeof OpenAPI>, | ||
basePath = '' | ||
schema: GraphQLSchema, | ||
openApi: ReturnType<typeof OpenAPI>, | ||
basePath = '' | ||
): ReturnType<typeof useSofa> => { | ||
return useSofa({ | ||
routes, | ||
basePath, | ||
schema, | ||
onRoute(info) { | ||
openApi.addRoute(info, { basePath }); | ||
}, | ||
}); | ||
return useSofa({ | ||
routes, | ||
basePath, | ||
schema, | ||
onRoute(info) { | ||
openApi.addRoute(info, { basePath }); | ||
}, | ||
}); | ||
}; | ||
@@ -403,0 +403,0 @@ // writes every recorder route |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
101995
56
2329
2
Yes
+ Added@sinclair/typebox@0.31.28(transitive)
+ Addedcall-bind-apply-helpers@1.0.2(transitive)
+ Addedcall-bound@1.0.3(transitive)
+ Addeddunder-proto@1.0.1(transitive)
+ Addedes-define-property@1.0.1(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedes-object-atoms@1.1.1(transitive)
+ Addedfets@0.6.8(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-intrinsic@1.2.7(transitive)
+ Addedget-proto@1.0.1(transitive)
+ Addedgopd@1.2.0(transitive)
+ Addedhas-symbols@1.1.0(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedmath-intrinsics@1.1.0(transitive)
+ Addedobject-inspect@1.13.4(transitive)
+ Addedqs@6.14.0(transitive)
+ Addedside-channel@1.1.0(transitive)
+ Addedside-channel-list@1.0.0(transitive)
+ Addedside-channel-map@1.0.1(transitive)
+ Addedside-channel-weakmap@1.0.2(transitive)
+ Addedts-toolbelt@9.6.0(transitive)
- Removed@ardatan/fast-json-stringify@0.0.6(transitive)
- Removed@fastify/deepmerge@1.3.0(transitive)
- Removedajv@8.17.1(transitive)
- Removedajv-formats@2.1.1(transitive)
- Removedfast-deep-equal@3.1.3(transitive)
- Removedfast-uri@3.0.6(transitive)
- Removedfets@0.2.9(transitive)
- Removedjson-schema-traverse@1.0.0(transitive)
- Removedrequire-from-string@2.0.2(transitive)
- Removedrfdc@1.4.1(transitive)
- Removedzod@3.24.2(transitive)
- Removedzod-to-json-schema@3.24.2(transitive)
Updated@whatwg-node/fetch@^0.9.14
Updatedfets@^0.6.4