bits-to-dead-trees 1.0.1 → 1.0.2

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.
@@ -16,7 +16,7 @@ jobs:
16
16
  - name: Set up Node
17
17
  uses: actions/setup-node@v3
18
18
  with:
19
- node-version: lts/*
19
+ node-version-file: .tool-versions
20
20
  cache: npm
21
21
 
22
22
  - name: Install npm dependencies
@@ -18,11 +18,11 @@ jobs:
18
18
  # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
19
19
  fetch-depth: 0
20
20
 
21
- - name: Setup Node.js
21
+ - name: Set up Node
22
22
  uses: actions/setup-node@v3
23
23
  with:
24
+ node-version-file: .tool-versions
24
25
  cache: npm
25
- node-version: lts/*
26
26
 
27
27
  - name: Install Dependencies
28
28
  run: npm install
package/.tool-versions CHANGED
@@ -1 +1 @@
1
- nodejs 16.15.1
1
+ nodejs 16.16.0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # bits-to-dead-trees
2
2
 
3
+ ## 1.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 86a275d: Fix server crash due to missing schema
8
+ - 029ce39: Fix server crash due to pretty print on development
9
+
3
10
  ## 1.0.1
4
11
 
5
12
  ### Patch Changes
package/Dockerfile CHANGED
@@ -13,9 +13,9 @@ RUN apt-get update -yqq && \
13
13
 
14
14
  COPY ["package.json", "package-lock.json*", "./"]
15
15
 
16
- RUN npm install --production --ignore-scripts
16
+ RUN npm install --omit=dev --ignore-scripts
17
17
 
18
- COPY ["index.js", "schemas", "./"]
18
+ COPY ["index.js", "pdf_request_body.json", "./"]
19
19
 
20
20
  ENTRYPOINT ["tini", "-v", "--"]
21
21
  CMD ["node", "index.js"]
package/index.js CHANGED
@@ -12,20 +12,23 @@
12
12
 
13
13
  const { fastify } = require("fastify");
14
14
  const playwright = require("playwright-core");
15
- const PdfRequestBodySchema = require("./schemas/pdf_request_body.json");
15
+ const PdfRequestBodySchema = require("./pdf_request_body.json");
16
16
 
17
17
  const SERVER_PORT = process.env["SERVER_PORT"] ?? 8000;
18
18
  const SERVER_ADDRESS = process.env["SERVER_ADDRESS"] ?? "localhost";
19
19
 
20
20
  const server = fastify({
21
21
  logger: {
22
- prettyPrint:
22
+ transport:
23
23
  process.env["NODE_ENV"] !== "production"
24
24
  ? {
25
- translateTime: "HH:MM:ss Z",
26
- ignore: "pid,hostname",
25
+ target: "pino-pretty",
26
+ options: {
27
+ translateTime: "HH:MM:ss Z",
28
+ ignore: "pid,hostname",
29
+ },
27
30
  }
28
- : false,
31
+ : undefined,
29
32
  },
30
33
  });
31
34
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bits-to-dead-trees",
3
3
  "author": "Robin Mehner <robin@coding-robin.de>",
4
- "version": "1.0.1",
4
+ "version": "1.0.2",
5
5
  "description": "Turn HTML into PDF files",
6
6
  "repository": "github:rmehner/bits-to-dead-trees",
7
7
  "license": "Apache-2.0",
@@ -20,7 +20,7 @@
20
20
  "format": "prettier --write **/*.{js,ts,json,md}",
21
21
  "start": "node index.js",
22
22
  "start:dev": "nodemon --inspect index.js",
23
- "dump-schemas": "typescript-json-schema types/schemas.ts PdfRequestBody --out schemas/pdf_request_body.json",
23
+ "dump-schemas": "typescript-json-schema types/schemas.ts PdfRequestBody --out pdf_request_body.json",
24
24
  "update-schemas": "npm run dump-schemas && npm run format",
25
25
  "postinstall": "npx playwright install chromium",
26
26
  "add-changeset": "changeset",
@@ -28,7 +28,7 @@
28
28
  "ts-check": "npx tsc --noEmit"
29
29
  },
30
30
  "dependencies": {
31
- "fastify": "^4.2.0",
31
+ "fastify": "^4.2.1",
32
32
  "playwright-core": "^1.23.2"
33
33
  },
34
34
  "devDependencies": {