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.
- package/dist/cjs/index.cjs +15 -13
- package/dist/esm/index.js +15 -13
- package/dist/types/sprint.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -161,21 +161,23 @@ class Sprint {
|
|
|
161
161
|
this.loadDefaults();
|
|
162
162
|
this.loadHealthcheck();
|
|
163
163
|
this.routesLoaded = this.init();
|
|
164
|
-
|
|
165
|
-
this.
|
|
166
|
-
|
|
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
|
-
|
|
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
|
-
|
|
140
|
-
this.
|
|
141
|
-
|
|
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
|
-
|
|
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,OA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