Files
webamp/packages/skin-database/knexfile.ts
T
Jordan EldredgeandClaude Opus 5.5 9999094dde Make the new UI's grid and feed two views of the same list
The feed was its own shuffled list (museum favorites plus random skins).
Now it continues through whatever the grid shows, the museum or a search:
tapping a skin opens the feed on it with the list before and after it,
and going back lands the grid on the skin you were on. Feed URLs are
plain permalinks; the list lives in the tab (listPosition.ts), and a
permalink opened fresh is followed by the museum. /feed redirects to the
museum's first skin.

- Event logging v3: one session per tab visit spanning both views, with
  view_switch events and each feed view's list, list index and depth.
  Older events are still accepted.
- The feed loads readmes and like counts on demand.
- Keyboard paging steps from the skin actually on screen, so it can't get
  stuck after a scroll is interrupted.
- Going back to the grid animates the skin into its tile. React's
  <ViewTransition> can't animate Back with Next's router, so it's done
  by hand.
- Grid tiles and view transition snapshots render pixelated.
- Download saves the skin under its file name, not its md5.
- A feed URL for a missing skin returns a 404 status.
- The list position is kept apart from the server actions, so pages with
  only the menu bar don't each compile another copy of the server code;
  this kept the build within the server's memory.
- Declare reselect (used by legacy-client) and give knexfile.ts named
  exports.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QzNErwA6wVTLaUTNMARPQt
2026-10-15 10:05:25 -07:00

30 lines
733 B
TypeScript

import path from "path";
export const production = {
client: "sqlite3",
connection: {
// Use process.cwd() and not __dir since Next runs from a build directory
filename: path.join(process.cwd(), "./skins.sqlite3"),
},
useNullAsDefault: true,
debug: false,
migrations: {
tableName: "knex_migrations",
// Use process.cwd() and not __dir since Next runs from a build directory
directory: path.join(__dirname, "./migrations"),
},
};
export const test = {
...production,
connection: ":memory:",
seeds: {
// Only put this in the test config so that we ensure we never clobber prod data.
directory: path.join(__dirname, "./seeds"),
},
};
export const development = {
...production,
};