sprint-es 0.0.88 → 0.0.90

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/cli.cjs CHANGED
@@ -312,7 +312,7 @@ switch (command) {
312
312
  break;
313
313
  case "start":
314
314
  console.log("🚀 Starting production server...");
315
- runCommand("node dist/index.js", { NODE_ENV: "production" });
315
+ runCommand("node dist/app.js", { NODE_ENV: "production" });
316
316
  break;
317
317
  case "doctor":
318
318
  runDoctor();
@@ -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 healthcheckXml = `<?xml version="1.0" encoding="UTF-8"?>
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}${this.prefix}/healthcheck`);
774
- if (this.openapi.generateOnBuild) console.log(` ${dim}OpenAPI Spec:${reset} http://localhost:${port}${this.prefix}/openapi.json`);
775
- if (this.openapi.swaggerUi.enabled) console.log(` ${dim}Swagger UI:${reset} http://localhost:${port}${this.prefix}/swagger`);
776
- console.log("");
777
- console.log(` ${dim}GraphQL API:${reset} http://localhost:${port}${this.prefix}/graphql`);
778
- console.log(` ${dim}GraphQL Playground:${reset} http://localhost:${port}${this.prefix}/graphiql`);
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/cli.js CHANGED
@@ -294,7 +294,7 @@ switch (command) {
294
294
  break;
295
295
  case "start":
296
296
  console.log("🚀 Starting production server...");
297
- runCommand("node dist/index.js", { NODE_ENV: "production" });
297
+ runCommand("node dist/app.js", { NODE_ENV: "production" });
298
298
  break;
299
299
  case "doctor":
300
300
  runDoctor();
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 healthcheckXml = `<?xml version="1.0" encoding="UTF-8"?>
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}${this.prefix}/healthcheck`);
749
- if (this.openapi.generateOnBuild) console.log(` ${dim}OpenAPI Spec:${reset} http://localhost:${port}${this.prefix}/openapi.json`);
750
- if (this.openapi.swaggerUi.enabled) console.log(` ${dim}Swagger UI:${reset} http://localhost:${port}${this.prefix}/swagger`);
751
- console.log("");
752
- console.log(` ${dim}GraphQL API:${reset} http://localhost:${port}${this.prefix}/graphql`);
753
- console.log(` ${dim}GraphQL Playground:${reset} http://localhost:${port}${this.prefix}/graphiql`);
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,CAAC;AAejG,eAAO,MAAM,aAAa,SAAQ,CAAC;AACnC,eAAO,MAAM,YAAY,SAAS,CAAC;AAkDnC,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,OAAO,CAAC,YAAY,CAAiB;IACrC,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,iBAAiB,CAA0B;IACnD,OAAO,CAAC,OAAO,CAcb;IACF,OAAO,CAAC,OAAO,CAcb;IACF,OAAO,CAAC,aAAa,CAAa;IAClC,OAAO,CAAC,gBAAgB,CAIhB;;YAsJM,IAAI;IA8BlB,OAAO,CAAC,YAAY;IAiDpB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IA4B9B;;OAEG;YACW,eAAe;IAgC7B,OAAO,CAAC,eAAe;YAcT,UAAU;YAiFV,YAAY;IAmB1B,OAAO,CAAC,YAAY;IAgCpB,+BAA+B;IAC/B,OAAO,CAAC,WAAW;IAKnB,OAAO,CAAC,mBAAmB;IA+K3B,OAAO,CAAC,kBAAkB;IAqC1B,OAAO,CAAC,kBAAkB;IA8B1B,OAAO,CAAC,mBAAmB;IA+BpB,GA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,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAoBxE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAE9E;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAK1D;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAS7D"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,SAAiC,CAAC;AACpD,eAAO,MAAM,SAAS,SAAqC,CAAC;AAE5D,QAAA,IAAI,UAAU,EAAE,MAAM,CAAC;AACvB,QAAA,IAAI,SAAS,EAAE,MAAM,CAAC;AAYtB,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC;AAEjC;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAoBxE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAE9E;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAS7D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprint-es",
3
- "version": "0.0.88",
3
+ "version": "0.0.90",
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": {