git-truck 0.5.9 → 0.5.12

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/build/index.js CHANGED
@@ -1903,6 +1903,7 @@ var import_compression = __toESM(require("compression"));
1903
1903
  var import_morgan = __toESM(require("morgan"));
1904
1904
  var import_open = __toESM(require("open"));
1905
1905
  var import_express2 = require("@remix-run/express");
1906
+ var import_path6 = require("path");
1906
1907
 
1907
1908
  // server-entry-module:@remix-run/dev/server-build
1908
1909
  var server_build_exports = {};
@@ -5675,8 +5676,8 @@ var routes = {
5675
5676
  var app = (0, import_express.default)();
5676
5677
  app.use((0, import_compression.default)());
5677
5678
  app.disable("x-powered-by");
5678
- app.use("/build", import_express.default.static("public/build", { immutable: true, maxAge: "1y" }));
5679
- app.use(import_express.default.static("public/build", { maxAge: "1h" }));
5679
+ app.use("/build", import_express.default.static((0, import_path6.join)(__dirname, "./public/build"), { immutable: true, maxAge: "1y" }));
5680
+ app.use(import_express.default.static((0, import_path6.join)(__dirname, "./public/build"), { maxAge: "1h" }));
5680
5681
  app.use((0, import_morgan.default)("tiny"));
5681
5682
  app.all("*", (0, import_express2.createRequestHandler)({
5682
5683
  build: server_build_exports,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "git-truck",
3
- "version": "0.5.9",
3
+ "version": "0.5.12",
4
4
  "private": false,
5
5
  "description": "Visualizing a Git repository",
6
6
  "license": "MIT",
package/server.js CHANGED
@@ -3,6 +3,7 @@ import compression from "compression";
3
3
  import morgan from "morgan";
4
4
  import open from "open";
5
5
  import { createRequestHandler } from "@remix-run/express";
6
+ import { join } from "path";
6
7
 
7
8
  import * as serverBuild from "@remix-run/dev/server-build";
8
9
 
@@ -16,12 +17,12 @@ app.disable("x-powered-by");
16
17
  // Remix fingerprints its assets so we can cache forever.
17
18
  app.use(
18
19
  "/build",
19
- express.static("public/build", { immutable: true, maxAge: "1y" })
20
+ express.static(join(__dirname, "public/build"), { immutable: true, maxAge: "1y" })
20
21
  );
21
22
 
22
23
  // Everything else (like favicon.ico) is cached for an hour. You may want to be
23
24
  // more aggressive with this caching.
24
- app.use(express.static("public/build", { maxAge: "1h" }));
25
+ app.use(express.static(join(__dirname, "public/build"), { maxAge: "1h" }));
25
26
 
26
27
  app.use(morgan("tiny"));
27
28