@devdogsuga/devtools 0.1.19 → 0.1.20

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.
@@ -4,6 +4,8 @@ export interface DocsPage {
4
4
  title: string;
5
5
  description: string | null;
6
6
  plainText: string;
7
+ /** When the page goes live (UTC ISO); absent or null for a visible page. */
8
+ publishAt?: string | null;
7
9
  }
8
10
  /**
9
11
  * The seam, kept as narrow as `planner/db.ts`'s.
@@ -25,7 +25,7 @@
25
25
  * clone. Four columns of one table do not need an ORM, and this package
26
26
  * already talks to Postgres exactly this way (see `planner/db.ts`).
27
27
  *
28
- * `search` is a generated column, so this writes title/description/plainText
28
+ * `search` is a generated column, so this writes title/description/plainText/publishAt
29
29
  * and Postgres recomputes the vector.
30
30
  */
31
31
  import { confirm, log, spinner } from "@clack/prompts";
@@ -70,22 +70,24 @@ export function isLocalDatabase(url) {
70
70
  */
71
71
  export async function indexPages(db, pages) {
72
72
  const values = pages
73
- .map((_, i) => `($${i * 4 + 1}, $${i * 4 + 2}, $${i * 4 + 3}, $${i * 4 + 4})`)
73
+ .map((_, i) => `($${i * 5 + 1}, $${i * 5 + 2}, $${i * 5 + 3}, $${i * 5 + 4}, $${i * 5 + 5}::timestamptz)`)
74
74
  .join(", ");
75
75
  const params = pages.flatMap((page) => [
76
76
  page.path,
77
77
  page.title,
78
78
  page.description,
79
79
  page.plainText,
80
+ page.publishAt ?? null,
80
81
  ]);
81
82
  await db.run("begin", []);
82
83
  try {
83
- await db.run(`insert into platform."docsPages" (path, title, description, "plainText")
84
+ await db.run(`insert into platform."docsPages" (path, title, description, "plainText", "publishAt")
84
85
  values ${values}
85
86
  on conflict (path) do update set
86
87
  title = excluded.title,
87
88
  description = excluded.description,
88
89
  "plainText" = excluded."plainText",
90
+ "publishAt" = excluded."publishAt",
89
91
  "updatedAt" = now()`, params);
90
92
  await db.run(`delete from platform."docsPages" where path <> all($1::text[])`, [pages.map((page) => page.path)]);
91
93
  await db.run("commit", []);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devdogsuga/devtools",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Contributor CLI for a DevDogsUGA checkout: database, env, images, emails, cron, deploy. Ships built JS; run via `pnpm dlx @devdogsuga/devtools` (or the `devtools`/`devtools-ci` bins once installed) from inside a DevDogsUGA clone.",
@@ -66,11 +66,11 @@
66
66
  "@vitest/coverage-v8": "^4.1.11",
67
67
  "react": "^19.2.8",
68
68
  "vitest": "^4.1.11",
69
+ "@devdogsuga/brand": "0.1.2",
69
70
  "@devdogsuga/config": "0.1.1",
70
71
  "@devdogsuga/db": "0.1.1",
71
72
  "@devdogsuga/env": "0.1.2",
72
- "@devdogsuga/events": "0.1.3",
73
- "@devdogsuga/brand": "0.1.2"
73
+ "@devdogsuga/events": "0.1.3"
74
74
  },
75
75
  "scripts": {
76
76
  "build": "tsc && node scripts/write-build-info.mjs",