sprint-es 0.0.88 → 0.0.89
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 +10 -9
- package/dist/esm/index.js +10 -9
- package/dist/types/sprint.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/cjs/index.cjs
CHANGED
|
@@ -386,13 +386,13 @@ class Sprint {
|
|
|
386
386
|
this.loadedMiddlewares.sort((a, b) => (a.priority ?? 100) - (b.priority ?? 100));
|
|
387
387
|
}
|
|
388
388
|
loadHealthcheck() {
|
|
389
|
-
const
|
|
389
|
+
const healthRoutes = this.prefix ? [`${this.prefix}/health`, `${this.prefix}/healthcheck`] : ["/health", "/healthcheck"];
|
|
390
|
+
this.app.get(healthRoutes, (_, res) => {
|
|
391
|
+
const healthcheckXml = `<?xml version="1.0" encoding="UTF-8"?>
|
|
390
392
|
<health>
|
|
391
393
|
<status>ok</status>
|
|
392
394
|
<uptime>${process.uptime().toFixed(2)}</uptime>
|
|
393
395
|
</health>`;
|
|
394
|
-
const healthRoute = this.prefix ? `${this.prefix}/healthcheck` : "/healthcheck";
|
|
395
|
-
this.app.get(healthRoute, (_, res) => {
|
|
396
396
|
res.setHeader("Content-Type", "application/xml");
|
|
397
397
|
res.send(healthcheckXml);
|
|
398
398
|
});
|
|
@@ -770,12 +770,13 @@ class Sprint {
|
|
|
770
770
|
console.log("");
|
|
771
771
|
console.log(` ${dim}Local:${reset} http://localhost:${bold}${port}${reset}`);
|
|
772
772
|
console.log(` ${dim}Prefix:${reset} ${bold}${prefixInfo}${reset}`);
|
|
773
|
-
console.log(` ${dim}Healthcheck:${reset} http://localhost:${port}${
|
|
774
|
-
if (this.openapi.generateOnBuild
|
|
775
|
-
if (this.openapi.
|
|
776
|
-
console.log(
|
|
777
|
-
|
|
778
|
-
console.log(` ${dim}GraphQL
|
|
773
|
+
console.log(` ${dim}Healthcheck:${reset} http://localhost:${port}/healthcheck ${dim}(also available at /health)${reset}`);
|
|
774
|
+
if (this.openapi.generateOnBuild || this.openapi.swaggerUi.enabled) console.log("");
|
|
775
|
+
if (this.openapi.generateOnBuild) console.log(` ${dim}OpenAPI Spec:${reset} http://localhost:${port}${this.openapi.path}`);
|
|
776
|
+
if (this.openapi.swaggerUi.enabled) console.log(` ${dim}Swagger UI:${reset} http://localhost:${port}${this.openapi.swaggerUi.path}`);
|
|
777
|
+
if (this.graphql.enabled || this.graphql.graphiql.enabled) console.log("");
|
|
778
|
+
if (this.graphql.enabled) console.log(` ${dim}GraphQL API:${reset} http://localhost:${port}${this.graphql.path}`);
|
|
779
|
+
if (this.graphql.graphiql.enabled) console.log(` ${dim}GraphQL Playground:${reset} http://localhost:${port}${this.graphql.graphiql.path}`);
|
|
779
780
|
console.log("");
|
|
780
781
|
console.log(` ${dim}Tip: Need stronger route protection? Learn more at${reset}`);
|
|
781
782
|
console.log(` ${dim}https://docs.tpeoficial.com/docs/dymo-api/private/request-verifier${reset}`);
|
package/dist/esm/index.js
CHANGED
|
@@ -361,13 +361,13 @@ class Sprint {
|
|
|
361
361
|
this.loadedMiddlewares.sort((a, b) => (a.priority ?? 100) - (b.priority ?? 100));
|
|
362
362
|
}
|
|
363
363
|
loadHealthcheck() {
|
|
364
|
-
const
|
|
364
|
+
const healthRoutes = this.prefix ? [`${this.prefix}/health`, `${this.prefix}/healthcheck`] : ["/health", "/healthcheck"];
|
|
365
|
+
this.app.get(healthRoutes, (_, res) => {
|
|
366
|
+
const healthcheckXml = `<?xml version="1.0" encoding="UTF-8"?>
|
|
365
367
|
<health>
|
|
366
368
|
<status>ok</status>
|
|
367
369
|
<uptime>${process.uptime().toFixed(2)}</uptime>
|
|
368
370
|
</health>`;
|
|
369
|
-
const healthRoute = this.prefix ? `${this.prefix}/healthcheck` : "/healthcheck";
|
|
370
|
-
this.app.get(healthRoute, (_, res) => {
|
|
371
371
|
res.setHeader("Content-Type", "application/xml");
|
|
372
372
|
res.send(healthcheckXml);
|
|
373
373
|
});
|
|
@@ -745,12 +745,13 @@ class Sprint {
|
|
|
745
745
|
console.log("");
|
|
746
746
|
console.log(` ${dim}Local:${reset} http://localhost:${bold}${port}${reset}`);
|
|
747
747
|
console.log(` ${dim}Prefix:${reset} ${bold}${prefixInfo}${reset}`);
|
|
748
|
-
console.log(` ${dim}Healthcheck:${reset} http://localhost:${port}${
|
|
749
|
-
if (this.openapi.generateOnBuild
|
|
750
|
-
if (this.openapi.
|
|
751
|
-
console.log(
|
|
752
|
-
|
|
753
|
-
console.log(` ${dim}GraphQL
|
|
748
|
+
console.log(` ${dim}Healthcheck:${reset} http://localhost:${port}/healthcheck ${dim}(also available at /health)${reset}`);
|
|
749
|
+
if (this.openapi.generateOnBuild || this.openapi.swaggerUi.enabled) console.log("");
|
|
750
|
+
if (this.openapi.generateOnBuild) console.log(` ${dim}OpenAPI Spec:${reset} http://localhost:${port}${this.openapi.path}`);
|
|
751
|
+
if (this.openapi.swaggerUi.enabled) console.log(` ${dim}Swagger UI:${reset} http://localhost:${port}${this.openapi.swaggerUi.path}`);
|
|
752
|
+
if (this.graphql.enabled || this.graphql.graphiql.enabled) console.log("");
|
|
753
|
+
if (this.graphql.enabled) console.log(` ${dim}GraphQL API:${reset} http://localhost:${port}${this.graphql.path}`);
|
|
754
|
+
if (this.graphql.graphiql.enabled) console.log(` ${dim}GraphQL Playground:${reset} http://localhost:${port}${this.graphql.graphiql.path}`);
|
|
754
755
|
console.log("");
|
|
755
756
|
console.log(` ${dim}Tip: Need stronger route protection? Learn more at${reset}`);
|
|
756
757
|
console.log(` ${dim}https://docs.tpeoficial.com/docs/dymo-api/private/request-verifier${reset}`);
|
|
@@ -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,C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|
4
4
|
"description": "Sprint - Quickly API",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"dev": "NODE_ENV=development ts-node src/index.ts",
|
|
61
61
|
"start": "NODE_ENV=production ts-node src/index.ts",
|
|
62
62
|
"prepublishOnly": "npm run build",
|
|
63
|
-
"test": "jest",
|
|
63
|
+
"test": "jest --passWithNoTests",
|
|
64
64
|
"dev:example": "npm run build && node example/app.js"
|
|
65
65
|
},
|
|
66
66
|
"repository": {
|