sprint-es 0.0.84 → 0.0.85

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.
@@ -221,8 +221,12 @@ class Sprint {
221
221
  schema: this.graphqlSchema
222
222
  }));
223
223
  if (this.graphql.graphiql.enabled) {
224
- const graphiqlPath = "/grapiql";
224
+ const graphiqlPath = "/graphiql";
225
225
  this.app.get(graphiqlPath, (_, res) => {
226
+ res.setHeader(
227
+ "Content-Security-Policy",
228
+ "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://unpkg.com; style-src 'self' 'unsafe-inline' https://unpkg.com; img-src 'self' data: https:; connect-src 'self' https:; font-src 'self' https:;"
229
+ );
226
230
  res.type("html");
227
231
  res.end(ruruHTML({ endpoint: graphqlPath }));
228
232
  });
@@ -736,11 +740,14 @@ class Sprint {
736
740
  console.log("");
737
741
  console.log(` ${bold}${cyan}Sprint${reset} ready to handle requests`);
738
742
  console.log("");
739
- console.log(` ${dim}Local:${reset} http://localhost:${bold}${port}${reset}`);
740
- console.log(` ${dim}Prefix:${reset} ${bold}${prefixInfo}${reset}`);
741
- console.log(` ${dim}Healthcheck:${reset} http://localhost:${port}${this.prefix}/healthcheck`);
742
- if (this.openapi.generateOnBuild) console.log(` ${dim}OpenAPI Spec:${reset} http://localhost:${port}${this.prefix}/openapi.json`);
743
- if (this.openapi.swaggerUi.enabled) console.log(` ${dim}Swagger UI:${reset} http://localhost:${port}${this.prefix}/swagger`);
743
+ console.log(` ${dim}Local:${reset} http://localhost:${bold}${port}${reset}`);
744
+ console.log(` ${dim}Prefix:${reset} ${bold}${prefixInfo}${reset}`);
745
+ console.log(` ${dim}Healthcheck:${reset} http://localhost:${port}${this.prefix}/healthcheck`);
746
+ if (this.openapi.generateOnBuild) console.log(` ${dim}OpenAPI Spec:${reset} http://localhost:${port}${this.prefix}/openapi.json`);
747
+ if (this.openapi.swaggerUi.enabled) console.log(` ${dim}Swagger UI:${reset} http://localhost:${port}${this.prefix}/swagger`);
748
+ console.log("");
749
+ console.log(` ${dim}GraphQL API:${reset} http://localhost:${port}${this.prefix}/graphql`);
750
+ console.log(` ${dim}GraphQL Playground:${reset} http://localhost:${port}${this.prefix}/graphiql`);
744
751
  console.log("");
745
752
  console.log(` ${dim}Tip: Need stronger route protection? Learn more at${reset}`);
746
753
  console.log(` ${dim}https://docs.tpeoficial.com/docs/dymo-api/private/request-verifier${reset}`);
package/dist/esm/index.js CHANGED
@@ -196,8 +196,12 @@ class Sprint {
196
196
  schema: this.graphqlSchema
197
197
  }));
198
198
  if (this.graphql.graphiql.enabled) {
199
- const graphiqlPath = "/grapiql";
199
+ const graphiqlPath = "/graphiql";
200
200
  this.app.get(graphiqlPath, (_, res) => {
201
+ res.setHeader(
202
+ "Content-Security-Policy",
203
+ "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://unpkg.com; style-src 'self' 'unsafe-inline' https://unpkg.com; img-src 'self' data: https:; connect-src 'self' https:; font-src 'self' https:;"
204
+ );
201
205
  res.type("html");
202
206
  res.end(ruruHTML({ endpoint: graphqlPath }));
203
207
  });
@@ -711,11 +715,14 @@ class Sprint {
711
715
  console.log("");
712
716
  console.log(` ${bold}${cyan}Sprint${reset} ready to handle requests`);
713
717
  console.log("");
714
- console.log(` ${dim}Local:${reset} http://localhost:${bold}${port}${reset}`);
715
- console.log(` ${dim}Prefix:${reset} ${bold}${prefixInfo}${reset}`);
716
- console.log(` ${dim}Healthcheck:${reset} http://localhost:${port}${this.prefix}/healthcheck`);
717
- if (this.openapi.generateOnBuild) console.log(` ${dim}OpenAPI Spec:${reset} http://localhost:${port}${this.prefix}/openapi.json`);
718
- if (this.openapi.swaggerUi.enabled) console.log(` ${dim}Swagger UI:${reset} http://localhost:${port}${this.prefix}/swagger`);
718
+ console.log(` ${dim}Local:${reset} http://localhost:${bold}${port}${reset}`);
719
+ console.log(` ${dim}Prefix:${reset} ${bold}${prefixInfo}${reset}`);
720
+ console.log(` ${dim}Healthcheck:${reset} http://localhost:${port}${this.prefix}/healthcheck`);
721
+ if (this.openapi.generateOnBuild) console.log(` ${dim}OpenAPI Spec:${reset} http://localhost:${port}${this.prefix}/openapi.json`);
722
+ if (this.openapi.swaggerUi.enabled) console.log(` ${dim}Swagger UI:${reset} http://localhost:${port}${this.prefix}/swagger`);
723
+ console.log("");
724
+ console.log(` ${dim}GraphQL API:${reset} http://localhost:${port}${this.prefix}/graphql`);
725
+ console.log(` ${dim}GraphQL Playground:${reset} http://localhost:${port}${this.prefix}/graphiql`);
719
726
  console.log("");
720
727
  console.log(` ${dim}Tip: Need stronger route protection? Learn more at${reset}`);
721
728
  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,CAUb;IACF,OAAO,CAAC,OAAO,CAUb;IACF,OAAO,CAAC,aAAa,CAAa;IAClC,OAAO,CAAC,gBAAgB,C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AAI,GAAG,IAAI;CA6DzC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprint-es",
3
- "version": "0.0.84",
3
+ "version": "0.0.85",
4
4
  "description": "Sprint - Quickly API",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",