yedra 0.16.0 → 0.16.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/dist/index.d.ts CHANGED
@@ -4,3 +4,4 @@ export { Yedra } from './routing/app.js';
4
4
  export { BadRequestError, ConflictError, ForbiddenError, HttpError, NotFoundError, PaymentRequiredError, UnauthorizedError, } from './routing/errors.js';
5
5
  export { Delete, Get, Post, Put } from './routing/rest.js';
6
6
  export { Ws } from './routing/websocket.js';
7
+ export { SecurityScheme } from './util/security.js';
package/dist/index.js CHANGED
@@ -4,3 +4,4 @@ export { Yedra } from './routing/app.js';
4
4
  export { BadRequestError, ConflictError, ForbiddenError, HttpError, NotFoundError, PaymentRequiredError, UnauthorizedError, } from './routing/errors.js';
5
5
  export { Delete, Get, Post, Put } from './routing/rest.js';
6
6
  export { Ws } from './routing/websocket.js';
7
+ export { SecurityScheme } from './util/security.js';
@@ -51,6 +51,7 @@ export declare class Yedra {
51
51
  private generatedDocs;
52
52
  use(path: string, endpoint: RestEndpoint | WsEndpoint | Yedra): Yedra;
53
53
  private generateDocs;
54
+ docs(): object;
54
55
  private static loadServe;
55
56
  private performRequest;
56
57
  private middlewareNext;
@@ -96,6 +96,12 @@ export class Yedra {
96
96
  paths,
97
97
  });
98
98
  }
99
+ docs() {
100
+ if (this.generatedDocs === undefined) {
101
+ throw new Error('Documentation was not generated correctly.');
102
+ }
103
+ return JSON.parse(this.generatedDocs);
104
+ }
99
105
  static async loadServe(config) {
100
106
  if (config === undefined) {
101
107
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yedra",
3
- "version": "0.16.0",
3
+ "version": "0.16.2",
4
4
  "repository": "github:0codekit/yedra",
5
5
  "main": "dist/index.js",
6
6
  "devDependencies": {