@pikku/cli 0.6.15 → 0.6.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { pikkuState } from '@pikku/core';
|
|
2
2
|
import _convertSchema from '@openapi-contrib/json-schema-to-openapi-schema';
|
|
3
3
|
const convertSchema = 'default' in _convertSchema ? _convertSchema.default : _convertSchema;
|
|
4
4
|
const getErrorResponseForConstructorName = (constructorName) => {
|
|
5
|
-
const
|
|
5
|
+
const errors = Array.from(pikkuState('misc', 'errors').entries());
|
|
6
|
+
const foundError = errors.find(([e]) => e.name === constructorName);
|
|
6
7
|
if (foundError) {
|
|
7
8
|
return foundError[1];
|
|
8
9
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pikku/cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.16",
|
|
4
4
|
"author": "yasser.fadl@gmail.com",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@openapi-contrib/json-schema-to-openapi-schema": "^3.0.2",
|
|
25
|
-
"@pikku/core": "^0.6.
|
|
25
|
+
"@pikku/core": "^0.6.19",
|
|
26
26
|
"@pikku/inspector": "^0.6.3",
|
|
27
27
|
"@types/cookie": "^0.6.0",
|
|
28
28
|
"@types/uuid": "^10.0.0",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HTTPRoutesMeta, pikkuState } from '@pikku/core'
|
|
2
2
|
import _convertSchema from '@openapi-contrib/json-schema-to-openapi-schema'
|
|
3
3
|
const convertSchema =
|
|
4
4
|
'default' in _convertSchema ? (_convertSchema.default as any) : _convertSchema
|
|
@@ -66,9 +66,8 @@ export interface OpenAPISpecInfo {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
const getErrorResponseForConstructorName = (constructorName: string) => {
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
)
|
|
69
|
+
const errors = Array.from(pikkuState('misc', 'errors').entries())
|
|
70
|
+
const foundError = errors.find(([e]) => e.name === constructorName)
|
|
72
71
|
if (foundError) {
|
|
73
72
|
return foundError[1]
|
|
74
73
|
}
|