sprint-es 0.0.61 → 0.0.62

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.
@@ -161,21 +161,23 @@ class Sprint {
161
161
  this.loadDefaults();
162
162
  this.loadHealthcheck();
163
163
  this.routesLoaded = this.init();
164
- if (this.openapi.generateOnBuild) {
165
- this.app.get("/openapi.json", (_, res) => {
166
- res.json(this.generateOpenAPISpec());
167
- });
168
- if (this.openapi.swaggerUi.enabled) {
169
- import("swagger-ui-express").then((swaggerUi) => {
170
- this.app.use("/swagger", swaggerUi.serve, swaggerUi.setup(void 0, {
171
- swaggerUrl: "/openapi.json"
172
- }));
173
- }).catch(() => {
174
- console.error(`[Sprint] ⚠️ swagger-ui-express is not installed. Run "npm install swagger-ui-express" to enable Swagger UI.`);
164
+ this.routesLoaded.then(() => {
165
+ if (this.openapi.generateOnBuild) {
166
+ this.app.get("/openapi.json", (_, res) => {
167
+ res.json(this.generateOpenAPISpec());
175
168
  });
169
+ if (this.openapi.swaggerUi.enabled) {
170
+ import("swagger-ui-express").then((swaggerUi) => {
171
+ this.app.use("/swagger", swaggerUi.serve, swaggerUi.setup(void 0, {
172
+ swaggerUrl: "/openapi.json"
173
+ }));
174
+ }).catch(() => {
175
+ console.error(`[Sprint] ⚠️ swagger-ui-express is not installed. Run "npm install swagger-ui-express" to enable Swagger UI.`);
176
+ });
177
+ }
176
178
  }
177
- }
178
- if (finalConfig.autoListen) this.routesLoaded.then(() => this.listen());
179
+ if (finalConfig.autoListen) this.listen();
180
+ });
179
181
  });
180
182
  }
181
183
  async init() {
package/dist/esm/index.js CHANGED
@@ -136,21 +136,23 @@ class Sprint {
136
136
  this.loadDefaults();
137
137
  this.loadHealthcheck();
138
138
  this.routesLoaded = this.init();
139
- if (this.openapi.generateOnBuild) {
140
- this.app.get("/openapi.json", (_, res) => {
141
- res.json(this.generateOpenAPISpec());
142
- });
143
- if (this.openapi.swaggerUi.enabled) {
144
- import("swagger-ui-express").then((swaggerUi) => {
145
- this.app.use("/swagger", swaggerUi.serve, swaggerUi.setup(void 0, {
146
- swaggerUrl: "/openapi.json"
147
- }));
148
- }).catch(() => {
149
- console.error(`[Sprint] ⚠️ swagger-ui-express is not installed. Run "npm install swagger-ui-express" to enable Swagger UI.`);
139
+ this.routesLoaded.then(() => {
140
+ if (this.openapi.generateOnBuild) {
141
+ this.app.get("/openapi.json", (_, res) => {
142
+ res.json(this.generateOpenAPISpec());
150
143
  });
144
+ if (this.openapi.swaggerUi.enabled) {
145
+ import("swagger-ui-express").then((swaggerUi) => {
146
+ this.app.use("/swagger", swaggerUi.serve, swaggerUi.setup(void 0, {
147
+ swaggerUrl: "/openapi.json"
148
+ }));
149
+ }).catch(() => {
150
+ console.error(`[Sprint] ⚠️ swagger-ui-express is not installed. Run "npm install swagger-ui-express" to enable Swagger UI.`);
151
+ });
152
+ }
151
153
  }
152
- }
153
- if (finalConfig.autoListen) this.routesLoaded.then(() => this.listen());
154
+ if (finalConfig.autoListen) this.listen();
155
+ });
154
156
  });
155
157
  }
156
158
  async init() {
@@ -1 +1 @@
1
- {"version":3,"file":"sprint.d.ts","sourceRoot":"","sources":["../../src/sprint.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,OAAO,EAA+B,gBAAgB,EAAoB,MAAM,SAAS,CAAC;AACnG,OAAO,OAAO,EAAE,EAAE,WAAW,EAAoD,MAAM,SAAS,CAAC;AAejG,eAAO,MAAM,aAAa,SAAQ,CAAC;AACnC,eAAO,MAAM,YAAY,SAAS,CAAC;AAwCnC,qBAAa,MAAM;IACR,GAAG,EAAE,WAAW,CAAC;IACxB,OAAO,CAAC,IAAI,CAAwD;IACpE,OAAO,CAAC,UAAU,CAAsB;IACxC,OAAO,CAAC,eAAe,CAA2B;IAClD,OAAO,CAAC,YAAY,CAAwB;IAC5C,OAAO,CAAC,SAAS,CAAkB;IACnC,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,MAAM,CAAc;IAC5B,OAA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OAAO,CAAC,UAAU,CAAsB;IACxC,OAAO,CAAC,eAAe,CAA2B;IAClD,OAAO,CAAC,YAAY,CAAwB;IAC5C,OAAO,CAAC,SAAS,CAAkB;IACnC,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,YAAY,CAAiB;IACrC,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,iBAAiB,CAA0B;IACnD,OAAO,CAAC,OAAO,CAUb;IACF,OAAO,CAAC,gBAAgB,CAIhB;;YAoEM,IAAI;IA+BlB,OAAO,CAAC,YAAY;IAiDpB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IA4B9B;;OAEG;YACW,eAAe;IAgC7B,OAAO,CAAC,eAAe;YAcT,UAAU;YA2EV,YAAY;IAmB1B,OAAO,CAAC,YAAY;IAgCpB,+BAA+B;IAC/B,OAAO,CAAC,WAAW;IAKnB,OAAO,CAAC,mBAAmB;IA6BpB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IAClC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IACnC,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IAClC,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IACrC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IACpC,GAAG,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,GAAG,gBAAgB,EAAE,YAAY,CAAC,EAAE,OAAO;IAYlF,MAAM,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;CA0DzC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprint-es",
3
- "version": "0.0.61",
3
+ "version": "0.0.62",
4
4
  "description": "Sprint - Quickly API",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",