@backstage/backend-openapi-utils 0.7.1 → 0.7.2

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,5 +1,22 @@
1
1
  # @backstage/backend-openapi-utils
2
2
 
3
+ ## 0.7.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 736d84e: Use locale-insensitive Unicode casing for consistent string handling across environments.
8
+ - bf1f82d: Added the required OpenAPI types dependency for Swagger Parser.
9
+ - Updated dependencies
10
+ - @backstage/backend-plugin-api@1.10.1
11
+
12
+ ## 0.7.2-next.0
13
+
14
+ ### Patch Changes
15
+
16
+ - bf1f82d: Added the required OpenAPI types dependency for Swagger Parser.
17
+ - Updated dependencies
18
+ - @backstage/backend-plugin-api@1.10.1-next.0
19
+
3
20
  ## 0.7.1
4
21
 
5
22
  ### Patch Changes
@@ -4,15 +4,13 @@ var utils = require('./utils.cjs.js');
4
4
 
5
5
  class OperationError extends Error {
6
6
  constructor(operation, message) {
7
- super(
8
- `["${operation.method.toLocaleUpperCase("en-US")} ${operation.path}"] ${message}`
9
- );
7
+ super(`["${operation.method.toUpperCase()} ${operation.path}"] ${message}`);
10
8
  }
11
9
  }
12
10
  class OperationResponseError extends Error {
13
11
  constructor(operation, response, message) {
14
12
  super(
15
- `["${operation.method.toLocaleUpperCase("en-US")} ${operation.path}" (${response.status})]: ${message}`
13
+ `["${operation.method.toUpperCase()} ${operation.path}" (${response.status})]: ${message}`
16
14
  );
17
15
  }
18
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"errors.cjs.js","sources":["../../src/schema/errors.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Operation } from './types';\nimport { ErrorObject } from 'ajv';\nimport { humanifyAjvError } from './utils';\n\nexport class OperationError extends Error {\n constructor(operation: Operation, message: string) {\n super(\n `[\"${operation.method.toLocaleUpperCase('en-US')} ${\n operation.path\n }\"] ${message}`,\n );\n }\n}\n\nexport class OperationResponseError extends Error {\n constructor(operation: Operation, response: Response, message: string) {\n super(\n `[\"${operation.method.toLocaleUpperCase('en-US')} ${operation.path}\" (${\n response.status\n })]: ${message}`,\n );\n }\n}\n\nexport class OperationParsingError extends OperationError {\n constructor(operation: Operation, type: string, errors: ErrorObject[]) {\n super(\n operation,\n `${type} validation failed.\\n - ${errors\n .map(humanifyAjvError)\n .join('\\n - ')}`,\n );\n }\n}\n\nexport class OperationParsingResponseError extends OperationResponseError {\n constructor(\n operation: Operation,\n response: Response,\n type: string,\n errors: ErrorObject[],\n ) {\n super(\n operation,\n response,\n `${type} validation failed.\\n - ${errors\n .map(humanifyAjvError)\n .join('\\n - ')}`,\n );\n }\n}\n"],"names":["humanifyAjvError"],"mappings":";;;;AAoBO,MAAM,uBAAuB,KAAA,CAAM;AAAA,EACxC,WAAA,CAAY,WAAsB,OAAA,EAAiB;AACjD,IAAA,KAAA;AAAA,MACE,CAAA,EAAA,EAAK,SAAA,CAAU,MAAA,CAAO,iBAAA,CAAkB,OAAO,CAAC,CAAA,CAAA,EAC9C,SAAA,CAAU,IACZ,CAAA,GAAA,EAAM,OAAO,CAAA;AAAA,KACf;AAAA,EACF;AACF;AAEO,MAAM,+BAA+B,KAAA,CAAM;AAAA,EAChD,WAAA,CAAY,SAAA,EAAsB,QAAA,EAAoB,OAAA,EAAiB;AACrE,IAAA,KAAA;AAAA,MACE,CAAA,EAAA,EAAK,SAAA,CAAU,MAAA,CAAO,iBAAA,CAAkB,OAAO,CAAC,CAAA,CAAA,EAAI,SAAA,CAAU,IAAI,CAAA,GAAA,EAChE,QAAA,CAAS,MACX,OAAO,OAAO,CAAA;AAAA,KAChB;AAAA,EACF;AACF;AAEO,MAAM,8BAA8B,cAAA,CAAe;AAAA,EACxD,WAAA,CAAY,SAAA,EAAsB,IAAA,EAAc,MAAA,EAAuB;AACrE,IAAA,KAAA;AAAA,MACE,SAAA;AAAA,MACA,GAAG,IAAI,CAAA;AAAA,GAAA,EAA2B,OAC/B,GAAA,CAAIA,sBAAgB,CAAA,CACpB,IAAA,CAAK,OAAO,CAAC,CAAA;AAAA,KAClB;AAAA,EACF;AACF;AAEO,MAAM,sCAAsC,sBAAA,CAAuB;AAAA,EACxE,WAAA,CACE,SAAA,EACA,QAAA,EACA,IAAA,EACA,MAAA,EACA;AACA,IAAA,KAAA;AAAA,MACE,SAAA;AAAA,MACA,QAAA;AAAA,MACA,GAAG,IAAI,CAAA;AAAA,GAAA,EAA2B,OAC/B,GAAA,CAAIA,sBAAgB,CAAA,CACpB,IAAA,CAAK,OAAO,CAAC,CAAA;AAAA,KAClB;AAAA,EACF;AACF;;;;;;;"}
1
+ {"version":3,"file":"errors.cjs.js","sources":["../../src/schema/errors.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Operation } from './types';\nimport { ErrorObject } from 'ajv';\nimport { humanifyAjvError } from './utils';\n\nexport class OperationError extends Error {\n constructor(operation: Operation, message: string) {\n super(`[\"${operation.method.toUpperCase()} ${operation.path}\"] ${message}`);\n }\n}\n\nexport class OperationResponseError extends Error {\n constructor(operation: Operation, response: Response, message: string) {\n super(\n `[\"${operation.method.toUpperCase()} ${operation.path}\" (${\n response.status\n })]: ${message}`,\n );\n }\n}\n\nexport class OperationParsingError extends OperationError {\n constructor(operation: Operation, type: string, errors: ErrorObject[]) {\n super(\n operation,\n `${type} validation failed.\\n - ${errors\n .map(humanifyAjvError)\n .join('\\n - ')}`,\n );\n }\n}\n\nexport class OperationParsingResponseError extends OperationResponseError {\n constructor(\n operation: Operation,\n response: Response,\n type: string,\n errors: ErrorObject[],\n ) {\n super(\n operation,\n response,\n `${type} validation failed.\\n - ${errors\n .map(humanifyAjvError)\n .join('\\n - ')}`,\n );\n }\n}\n"],"names":["humanifyAjvError"],"mappings":";;;;AAoBO,MAAM,uBAAuB,KAAA,CAAM;AAAA,EACxC,WAAA,CAAY,WAAsB,OAAA,EAAiB;AACjD,IAAA,KAAA,CAAM,CAAA,EAAA,EAAK,SAAA,CAAU,MAAA,CAAO,WAAA,EAAa,IAAI,SAAA,CAAU,IAAI,CAAA,GAAA,EAAM,OAAO,CAAA,CAAE,CAAA;AAAA,EAC5E;AACF;AAEO,MAAM,+BAA+B,KAAA,CAAM;AAAA,EAChD,WAAA,CAAY,SAAA,EAAsB,QAAA,EAAoB,OAAA,EAAiB;AACrE,IAAA,KAAA;AAAA,MACE,CAAA,EAAA,EAAK,SAAA,CAAU,MAAA,CAAO,WAAA,EAAa,CAAA,CAAA,EAAI,SAAA,CAAU,IAAI,CAAA,GAAA,EACnD,QAAA,CAAS,MACX,CAAA,IAAA,EAAO,OAAO,CAAA;AAAA,KAChB;AAAA,EACF;AACF;AAEO,MAAM,8BAA8B,cAAA,CAAe;AAAA,EACxD,WAAA,CAAY,SAAA,EAAsB,IAAA,EAAc,MAAA,EAAuB;AACrE,IAAA,KAAA;AAAA,MACE,SAAA;AAAA,MACA,GAAG,IAAI,CAAA;AAAA,GAAA,EAA2B,OAC/B,GAAA,CAAIA,sBAAgB,CAAA,CACpB,IAAA,CAAK,OAAO,CAAC,CAAA;AAAA,KAClB;AAAA,EACF;AACF;AAEO,MAAM,sCAAsC,sBAAA,CAAuB;AAAA,EACxE,WAAA,CACE,SAAA,EACA,QAAA,EACA,IAAA,EACA,MAAA,EACA;AACA,IAAA,KAAA;AAAA,MACE,SAAA;AAAA,MACA,QAAA;AAAA,MACA,GAAG,IAAI,CAAA;AAAA,GAAA,EAA2B,OAC/B,GAAA,CAAIA,sBAAgB,CAAA,CACpB,IAAA,CAAK,OAAO,CAAC,CAAA;AAAA,KAClB;AAAA,EACF;AACF;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/backend-openapi-utils",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "OpenAPI typescript support.",
5
5
  "backstage": {
6
6
  "role": "node-library"
@@ -54,7 +54,7 @@
54
54
  },
55
55
  "dependencies": {
56
56
  "@apidevtools/swagger-parser": "^10.1.0",
57
- "@backstage/backend-plugin-api": "^1.10.0",
57
+ "@backstage/backend-plugin-api": "^1.10.1",
58
58
  "@backstage/errors": "^1.3.1",
59
59
  "@backstage/types": "^1.2.2",
60
60
  "@types/express": "^4.17.6",
@@ -68,11 +68,12 @@
68
68
  "lodash": "^4.17.21",
69
69
  "mockttp": "^3.13.0",
70
70
  "openapi-merge": "^1.3.2",
71
+ "openapi-types": "^12.0.0",
71
72
  "openapi3-ts": "^3.1.2"
72
73
  },
73
74
  "devDependencies": {
74
- "@backstage/cli": "^0.36.5",
75
- "@backstage/test-utils": "^1.7.21",
75
+ "@backstage/cli": "^0.36.6",
76
+ "@backstage/test-utils": "^1.7.22",
76
77
  "msw": "^2.0.0",
77
78
  "supertest": "^7.0.0"
78
79
  }