@hiroleague/taskmanager 0.0.1 → 0.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.
- package/LICENSE +21 -0
- package/README.md +41 -52
- package/dist/assets/architecture-YZFGNWBL-C1MoQeSs.js +1 -0
- package/dist/assets/{architectureDiagram-Q4EWVU46-DSQ1_74_.js → architectureDiagram-Q4EWVU46-DUEfvDBu.js} +1 -1
- package/dist/assets/{blockDiagram-DXYQGD6D-DfOGNphI.js → blockDiagram-DXYQGD6D-DQzEOPT2.js} +1 -1
- package/dist/assets/{chunk-2KRD3SAO-9yt00aGC.js → chunk-2KRD3SAO-C2e-_49I.js} +1 -1
- package/dist/assets/{chunk-4TB4RGXK-DF8yJBFl.js → chunk-4TB4RGXK-AZq3s1Dh.js} +1 -1
- package/dist/assets/{chunk-67CJDMHE-5wFKo04G.js → chunk-67CJDMHE-B1-M78qu.js} +1 -1
- package/dist/assets/{chunk-7N4EOEYR-BRRGX_NC.js → chunk-7N4EOEYR-D7mYFpz-.js} +1 -1
- package/dist/assets/{chunk-AA7GKIK3-DUZv_pNI.js → chunk-AA7GKIK3-VWI9k39i.js} +1 -1
- package/dist/assets/{chunk-CIAEETIT-mA5aM_d7.js → chunk-CIAEETIT-hnu4zamm.js} +1 -1
- package/dist/assets/{chunk-FOC6F5B3-B-cqGCPC.js → chunk-FOC6F5B3-BJsh9nO9.js} +1 -1
- package/dist/assets/{chunk-K5T4RW27-BLRDzioh.js → chunk-K5T4RW27-BLIPdXaZ.js} +1 -1
- package/dist/assets/{chunk-KGLVRYIC-CTkQSeKy.js → chunk-KGLVRYIC-DvaW2TkT.js} +1 -1
- package/dist/assets/{chunk-LIHQZDEY-Cf34Nu3J.js → chunk-LIHQZDEY-CUsM0M11.js} +1 -1
- package/dist/assets/{chunk-ORNJ4GCN-D3uXgbay.js → chunk-ORNJ4GCN-CfluNV0_.js} +1 -1
- package/dist/assets/{chunk-OYMX7WX6-syQho5jf.js → chunk-OYMX7WX6-CkWzw4JX.js} +1 -1
- package/dist/assets/{classDiagram-6PBFFD2Q-CotFZI8-.js → classDiagram-6PBFFD2Q-Dx_f-9b7.js} +1 -1
- package/dist/assets/{classDiagram-v2-HSJHXN6E-DAPzeDGn.js → classDiagram-v2-HSJHXN6E-CSfvZ-nt.js} +1 -1
- package/dist/assets/clone-CXokakwV.js +1 -0
- package/dist/assets/{dagre-rhyPjnsQ.js → dagre-Do0eD9eI.js} +1 -1
- package/dist/assets/{dagre-KV5264BT-BBqulDtd.js → dagre-KV5264BT-lveZDhBf.js} +1 -1
- package/dist/assets/{diagram-5BDNPKRD-Ky3EXXj0.js → diagram-5BDNPKRD-Dq5yM_uY.js} +1 -1
- package/dist/assets/{diagram-G4DWMVQ6-t7LbT0Uz.js → diagram-G4DWMVQ6-D-SYOmKm.js} +1 -1
- package/dist/assets/{diagram-MMDJMWI5-CdnLXEMx.js → diagram-MMDJMWI5-lU5t9BZA.js} +1 -1
- package/dist/assets/{diagram-TYMM5635-CnzTqJBM.js → diagram-TYMM5635-6tfUbY3R.js} +1 -1
- package/dist/assets/{erDiagram-SMLLAGMA-BN5eJerP.js → erDiagram-SMLLAGMA-dx09stuy.js} +1 -1
- package/dist/assets/{flatten-C5NL-f24.js → flatten-B2BZ0pzY.js} +1 -1
- package/dist/assets/{flowDiagram-DWJPFMVM-CbFskc8S.js → flowDiagram-DWJPFMVM-CJi2WISS.js} +1 -1
- package/dist/assets/gitGraph-7Q5UKJZL-BXTuQaDM.js +1 -0
- package/dist/assets/{gitGraphDiagram-UUTBAWPF-wpqI2kyI.js → gitGraphDiagram-UUTBAWPF-Bjj94M12.js} +1 -1
- package/dist/assets/{graphlib-COiJG5Qv.js → graphlib-BIlXYGdM.js} +1 -1
- package/dist/assets/{index-lyyIVcc_.js → index-CZZuue3D.js} +5 -5
- package/dist/assets/info-OMHHGYJF-BeeKt8-X.js +1 -0
- package/dist/assets/{infoDiagram-42DDH7IO-BbvTdpSV.js → infoDiagram-42DDH7IO-wq_opQKO.js} +1 -1
- package/dist/assets/{ishikawaDiagram-UXIWVN3A-Epc23N_0.js → ishikawaDiagram-UXIWVN3A-Cnc1bwBo.js} +1 -1
- package/dist/assets/{kanban-definition-6JOO6SKY-C8dW_26n.js → kanban-definition-6JOO6SKY-CwHbIze0.js} +1 -1
- package/dist/assets/{mermaid-parser.core-6Tn8epr_.js → mermaid-parser.core-DrLhKJ48.js} +2 -2
- package/dist/assets/{mindmap-definition-QFDTVHPH-CvpNtrKT.js → mindmap-definition-QFDTVHPH-DswAJiEd.js} +1 -1
- package/dist/assets/packet-4T2RLAQJ-DQ-H9_jd.js +1 -0
- package/dist/assets/pie-ZZUOXDRM-BSj0Jsyj.js +1 -0
- package/dist/assets/{pieDiagram-DEJITSTG-eENymoXZ.js → pieDiagram-DEJITSTG-DgQTCddl.js} +1 -1
- package/dist/assets/radar-PYXPWWZC-B7-oRPFL.js +1 -0
- package/dist/assets/{reduce-BDOBPIXr.js → reduce-Uumu9GdR.js} +1 -1
- package/dist/assets/{requirementDiagram-MS252O5E-CmRO3hLp.js → requirementDiagram-MS252O5E-D1moa23Z.js} +1 -1
- package/dist/assets/{sequenceDiagram-FGHM5R23-B7qNcwNo.js → sequenceDiagram-FGHM5R23-Dvhj7HGn.js} +1 -1
- package/dist/assets/{stateDiagram-FHFEXIEX-CYfGMoR8.js → stateDiagram-FHFEXIEX-Dx5CjenB.js} +1 -1
- package/dist/assets/{stateDiagram-v2-QKLJ7IA2-CO1W_n55.js → stateDiagram-v2-QKLJ7IA2-C_PkrTdc.js} +1 -1
- package/dist/assets/{timeline-definition-GMOUNBTQ-CQWqDPGG.js → timeline-definition-GMOUNBTQ-z-IncVmK.js} +1 -1
- package/dist/assets/treeView-SZITEDCU-CFXle9Az.js +1 -0
- package/dist/assets/treemap-W4RFUUIX-CAW3vWh8.js +1 -0
- package/dist/assets/{vennDiagram-DHZGUBPP-BjTbuhcb.js → vennDiagram-DHZGUBPP-CT1ehozU.js} +1 -1
- package/dist/assets/wardley-RL74JXVD-7q3ju4kc.js +1 -0
- package/dist/assets/{wardleyDiagram-NUSXRM2D-DNhPIFCg.js → wardleyDiagram-NUSXRM2D-D-kouujI.js} +1 -1
- package/dist/assets/{xychartDiagram-5P7HB3ND-BDblAZ11.js → xychartDiagram-5P7HB3ND-D1lnM0pL.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +101 -92
- package/scripts/postinstall-message.mjs +160 -0
- package/scripts/stubs/node-domexception/index.cjs +18 -0
- package/scripts/stubs/node-domexception/package.json +7 -0
- package/skills/hiro-task-manager-cli/SKILL.md +97 -0
- package/skills/hiro-task-manager-cli/reference/boards.md +143 -0
- package/skills/hiro-task-manager-cli/reference/cli-access-policy.md +72 -0
- package/skills/hiro-task-manager-cli/reference/errors.md +85 -0
- package/skills/hiro-task-manager-cli/reference/lists.md +106 -0
- package/skills/hiro-task-manager-cli/reference/releases.md +87 -0
- package/skills/hiro-task-manager-cli/reference/search.md +38 -0
- package/skills/hiro-task-manager-cli/reference/statuses.md +25 -0
- package/skills/hiro-task-manager-cli/reference/tasks.md +144 -0
- package/skills/hiro-task-manager-cli/reference/trash.md +50 -0
- package/src/cli/bootstrap/launcher.test.ts +66 -0
- package/src/cli/bootstrap/launcher.ts +375 -35
- package/src/cli/bootstrap/program.ts +4 -0
- package/src/cli/bootstrap/runtime.test.ts +15 -0
- package/src/cli/bootstrap/runtime.ts +27 -1
- package/src/cli/commands/query.ts +56 -56
- package/src/cli/commands/server.ts +27 -19
- package/src/cli/handlers/boards.test.ts +669 -669
- package/src/cli/handlers/cli-wiring.test.ts +1 -1
- package/src/cli/handlers/search.test.ts +374 -374
- package/src/cli/handlers/search.ts +17 -17
- package/src/cli/handlers/server.test.ts +55 -13
- package/src/cli/handlers/server.ts +16 -3
- package/src/cli/lib/api-client.test.ts +35 -2
- package/src/cli/lib/api-client.ts +43 -10
- package/src/cli/lib/cli-http-errors.test.ts +85 -85
- package/src/cli/lib/command-helpers.ts +161 -154
- package/src/cli/lib/config.ts +4 -0
- package/src/cli/lib/launcherUi.ts +166 -0
- package/src/cli/lib/process.test.ts +24 -5
- package/src/cli/lib/process.ts +86 -55
- package/src/cli/ports/process.ts +8 -2
- package/src/cli/subprocess.real-stack.test.ts +611 -598
- package/src/cli/subprocess.smoke.test.ts +954 -969
- package/src/cli/types/config.ts +2 -6
- package/src/client/components/auth/AuthScreen.tsx +3 -3
- package/src/client/components/board/BoardStatsChips.tsx +233 -233
- package/src/client/components/board/BoardStatsContext.tsx +41 -41
- package/src/client/components/board/boardHeaderButtonStyles.ts +38 -38
- package/src/client/components/board/shortcuts/useBoardShortcutKeydown.ts +49 -49
- package/src/client/components/board/useBoardCanvasPanScroll.ts +108 -108
- package/src/client/components/board/useBoardTaskContainerDroppableReact.ts +33 -33
- package/src/client/components/board/useBoardTaskSortableReact.ts +26 -26
- package/src/client/components/multi-select.tsx +1206 -1206
- package/src/client/components/routing/BoardPage.tsx +20 -20
- package/src/client/components/routing/NavigationRegistrar.tsx +13 -13
- package/src/client/components/settings/SettingsPage.tsx +1 -1
- package/src/client/components/task/TaskCard.tsx +643 -643
- package/src/client/components/ui/badge.tsx +49 -49
- package/src/client/components/ui/button.tsx +65 -65
- package/src/client/components/ui/command.tsx +193 -193
- package/src/client/components/ui/dialog.tsx +163 -163
- package/src/client/components/ui/input-group.tsx +155 -155
- package/src/client/components/ui/input.tsx +19 -19
- package/src/client/components/ui/popover.tsx +87 -87
- package/src/client/components/ui/separator.tsx +28 -28
- package/src/client/components/ui/textarea.tsx +18 -18
- package/src/client/index.css +248 -248
- package/src/client/lib/appNavigate.ts +16 -16
- package/src/client/lib/taskCardDate.ts +111 -111
- package/src/client/lib/utils.ts +6 -6
- package/src/server/auth.ts +351 -302
- package/src/server/bootstrapDev.ts +11 -2
- package/src/server/bootstrapInstalled.ts +6 -1
- package/src/server/index.ts +33 -7
- package/src/server/migrations/013_cli_policy_and_provenance.ts +2 -2
- package/src/server/migrations/019_cli_global_create_board_default_on.ts +14 -0
- package/src/server/migrations/registry.ts +43 -41
- package/src/server/parseBootstrapProfile.ts +42 -0
- package/src/server/storage/cliPolicy.ts +2 -1
- package/src/shared/runtimeConfig.ts +256 -237
- package/src/shared/runtimeIdentity.test.ts +47 -0
- package/src/shared/runtimeIdentity.ts +35 -0
- package/src/shared/serverStatus.ts +21 -0
- package/src/shared/skillsInstall.ts +71 -0
- package/src/shared/terminalColors.ts +24 -0
- package/dist/assets/architecture-YZFGNWBL-3h1eIYfB.js +0 -1
- package/dist/assets/clone-BRQpYu_n.js +0 -1
- package/dist/assets/gitGraph-7Q5UKJZL-CG8f8JF7.js +0 -1
- package/dist/assets/info-OMHHGYJF-C8_SHoRO.js +0 -1
- package/dist/assets/packet-4T2RLAQJ-BvpAX0kJ.js +0 -1
- package/dist/assets/pie-ZZUOXDRM-Ow26Yf-E.js +0 -1
- package/dist/assets/radar-PYXPWWZC-e_ron5jQ.js +0 -1
- package/dist/assets/treeView-SZITEDCU-DsEr3xeq.js +0 -1
- package/dist/assets/treemap-W4RFUUIX-DV7nk2AB.js +0 -1
- package/dist/assets/wardley-RL74JXVD-CrrFU9AE.js +0 -1
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { startTaskManagerServer } from "./index";
|
|
2
|
+
import {
|
|
3
|
+
parseBootstrapDevFlagFromArgv,
|
|
4
|
+
parseBootstrapPortFromArgv,
|
|
5
|
+
parseBootstrapProfileFromArgv,
|
|
6
|
+
} from "./parseBootstrapProfile";
|
|
7
|
+
|
|
8
|
+
// --dev flag explicitly sets dev runtime; without it, defaults to installed.
|
|
9
|
+
const isDev = parseBootstrapDevFlagFromArgv();
|
|
2
10
|
|
|
3
11
|
await startTaskManagerServer({
|
|
4
|
-
kind: "dev",
|
|
5
|
-
profile:
|
|
12
|
+
kind: isDev ? "dev" : "installed",
|
|
13
|
+
profile: parseBootstrapProfileFromArgv(),
|
|
14
|
+
port: parseBootstrapPortFromArgv(),
|
|
6
15
|
});
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { startTaskManagerServer } from "./index";
|
|
2
|
+
import {
|
|
3
|
+
parseBootstrapPortFromArgv,
|
|
4
|
+
parseBootstrapProfileFromArgv,
|
|
5
|
+
} from "./parseBootstrapProfile";
|
|
2
6
|
|
|
3
7
|
await startTaskManagerServer({
|
|
4
8
|
kind: "installed",
|
|
5
|
-
profile:
|
|
9
|
+
profile: parseBootstrapProfileFromArgv(),
|
|
10
|
+
port: parseBootstrapPortFromArgv(),
|
|
6
11
|
});
|
package/src/server/index.ts
CHANGED
|
@@ -8,6 +8,11 @@ import {
|
|
|
8
8
|
setRuntimeConfigSelection,
|
|
9
9
|
type RuntimeKind,
|
|
10
10
|
} from "../shared/runtimeConfig";
|
|
11
|
+
import { resolveRuntimeSource } from "../shared/runtimeIdentity";
|
|
12
|
+
import {
|
|
13
|
+
buildLocalServerUrl,
|
|
14
|
+
type RunningServerStatus,
|
|
15
|
+
} from "../shared/serverStatus";
|
|
11
16
|
import { authMiddleware, requireWebSession, type AppBindings } from "./auth";
|
|
12
17
|
import { cliBoardReadError } from "./cliPolicyGuard";
|
|
13
18
|
import { getDb, runMigrations } from "./db";
|
|
@@ -23,6 +28,20 @@ import { ensureDataDir, entryByIdOrSlug } from "./storage";
|
|
|
23
28
|
|
|
24
29
|
export function createTaskManagerApp(kind: RuntimeKind): Hono<AppBindings> {
|
|
25
30
|
const app = new Hono<AppBindings>();
|
|
31
|
+
const source = resolveRuntimeSource(import.meta.url);
|
|
32
|
+
// Keep `/api/health` and CLI `server status` on the exact same payload so
|
|
33
|
+
// users can compare them directly without translating field names.
|
|
34
|
+
const healthStatus = (): RunningServerStatus => {
|
|
35
|
+
const port = resolvePort({ kind });
|
|
36
|
+
return {
|
|
37
|
+
pid: process.pid,
|
|
38
|
+
port,
|
|
39
|
+
running: true,
|
|
40
|
+
runtime: kind,
|
|
41
|
+
source,
|
|
42
|
+
url: buildLocalServerUrl(port),
|
|
43
|
+
};
|
|
44
|
+
};
|
|
26
45
|
|
|
27
46
|
// Keep dev auth close to production, but allow the Vite origin to talk to the
|
|
28
47
|
// API directly for EventSource and fetch during local development.
|
|
@@ -37,7 +56,7 @@ export function createTaskManagerApp(kind: RuntimeKind): Hono<AppBindings> {
|
|
|
37
56
|
}
|
|
38
57
|
|
|
39
58
|
app.use("/api/*", authMiddleware);
|
|
40
|
-
app.get("/api/health", (c) => c.json(
|
|
59
|
+
app.get("/api/health", (c) => c.json(healthStatus()));
|
|
41
60
|
app.get("/api/events", async (c) => {
|
|
42
61
|
const rawBoardId = c.req.query("boardId");
|
|
43
62
|
if (rawBoardId != null && !/^\d+$/.test(rawBoardId)) {
|
|
@@ -65,9 +84,10 @@ export function createTaskManagerApp(kind: RuntimeKind): Hono<AppBindings> {
|
|
|
65
84
|
app.route("/api/notifications", notificationsRoute);
|
|
66
85
|
app.route("/api/search", searchRoute);
|
|
67
86
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
87
|
+
// Installed mode requires a built frontend; dev mode serves it as an
|
|
88
|
+
// optional fallback so the server URL is not a dead 404 if dist/ exists.
|
|
89
|
+
const distDir = resolveInstalledDistDir();
|
|
90
|
+
if (kind === "installed" || existsSync(path.join(distDir, "index.html"))) {
|
|
71
91
|
app.use("/*", serveStatic({ root: distDir }));
|
|
72
92
|
|
|
73
93
|
app.get("*", async () => {
|
|
@@ -100,10 +120,12 @@ function assertInstalledDistReady(): void {
|
|
|
100
120
|
export async function startTaskManagerServer(options: {
|
|
101
121
|
kind: RuntimeKind;
|
|
102
122
|
profile?: string;
|
|
123
|
+
port?: number;
|
|
103
124
|
}): Promise<ReturnType<typeof Bun.serve>> {
|
|
104
125
|
setRuntimeConfigSelection({
|
|
105
126
|
kind: options.kind,
|
|
106
127
|
profile: options.profile,
|
|
128
|
+
port: options.port,
|
|
107
129
|
});
|
|
108
130
|
|
|
109
131
|
await ensureDataDir();
|
|
@@ -123,6 +145,7 @@ export async function startTaskManagerServer(options: {
|
|
|
123
145
|
port: resolvePort({
|
|
124
146
|
kind: options.kind,
|
|
125
147
|
profile: options.profile,
|
|
148
|
+
port: options.port,
|
|
126
149
|
}),
|
|
127
150
|
fetch: app.fetch,
|
|
128
151
|
// SSE keeps requests open by design, so raise the idle timeout above the
|
|
@@ -130,9 +153,12 @@ export async function startTaskManagerServer(options: {
|
|
|
130
153
|
idleTimeout: 30,
|
|
131
154
|
});
|
|
132
155
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
156
|
+
// Let the installed launcher print its own startup status so first-run output stays compact.
|
|
157
|
+
if (process.env.TASKMANAGER_SILENT_STARTUP_LOG !== "1") {
|
|
158
|
+
console.log(
|
|
159
|
+
`${options.kind === "installed" ? "TaskManager" : "TaskManager dev API"} server listening on http://localhost:${server.port}`,
|
|
160
|
+
);
|
|
161
|
+
}
|
|
136
162
|
|
|
137
163
|
return server;
|
|
138
164
|
}
|
|
@@ -18,10 +18,10 @@ ALTER TABLE task ADD COLUMN created_by_label TEXT;
|
|
|
18
18
|
|
|
19
19
|
CREATE TABLE cli_global_policy (
|
|
20
20
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
21
|
-
create_board INTEGER NOT NULL DEFAULT
|
|
21
|
+
create_board INTEGER NOT NULL DEFAULT 1
|
|
22
22
|
);
|
|
23
23
|
|
|
24
|
-
INSERT INTO cli_global_policy (id, create_board) VALUES (1,
|
|
24
|
+
INSERT INTO cli_global_policy (id, create_board) VALUES (1, 1);
|
|
25
25
|
|
|
26
26
|
CREATE TABLE board_cli_policy (
|
|
27
27
|
board_id INTEGER PRIMARY KEY REFERENCES board(id) ON DELETE CASCADE,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Database } from "bun:sqlite";
|
|
2
|
+
import type { Migration } from "./types";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Default global CLI `create_board` is now on (migration 013 originally seeded off).
|
|
6
|
+
* Updates existing databases that already applied the old seed.
|
|
7
|
+
*/
|
|
8
|
+
export const migration019: Migration = {
|
|
9
|
+
version: 19,
|
|
10
|
+
name: "019_cli_global_create_board_default_on",
|
|
11
|
+
up(db: Database): void {
|
|
12
|
+
db.run("UPDATE cli_global_policy SET create_board = 1 WHERE id = 1");
|
|
13
|
+
},
|
|
14
|
+
};
|
|
@@ -1,41 +1,43 @@
|
|
|
1
|
-
import { migration001 } from "./001_initial";
|
|
2
|
-
import { migration002 } from "./002_closed_at";
|
|
3
|
-
import { migration003 } from "./003_task_search_fts5";
|
|
4
|
-
import { migration004 } from "./004_task_search_extended";
|
|
5
|
-
import { migration005 } from "./005_task_priorities";
|
|
6
|
-
import { migration006 } from "./006_task_group_emoji";
|
|
7
|
-
import { migration007 } from "./007_task_emoji";
|
|
8
|
-
import { migration008 } from "./008_list_emoji";
|
|
9
|
-
import { migration009 } from "./009_board_emoji";
|
|
10
|
-
import { migration010 } from "./010_celebration_sounds_muted";
|
|
11
|
-
import { migration011 } from "./011_board_cli_access";
|
|
12
|
-
import { migration012 } from "./012_notification_event";
|
|
13
|
-
import { migration013 } from "./013_cli_policy_and_provenance";
|
|
14
|
-
import { migration014 } from "./014_drop_board_cli_access";
|
|
15
|
-
import { migration015 } from "./015_trash_deleted_at";
|
|
16
|
-
import { migration016 } from "./016_task_group_sort_and_board_defaults";
|
|
17
|
-
import { migration017 } from "./017_task_priority_none_default";
|
|
18
|
-
import { migration018 } from "./018_board_releases";
|
|
19
|
-
import
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
1
|
+
import { migration001 } from "./001_initial";
|
|
2
|
+
import { migration002 } from "./002_closed_at";
|
|
3
|
+
import { migration003 } from "./003_task_search_fts5";
|
|
4
|
+
import { migration004 } from "./004_task_search_extended";
|
|
5
|
+
import { migration005 } from "./005_task_priorities";
|
|
6
|
+
import { migration006 } from "./006_task_group_emoji";
|
|
7
|
+
import { migration007 } from "./007_task_emoji";
|
|
8
|
+
import { migration008 } from "./008_list_emoji";
|
|
9
|
+
import { migration009 } from "./009_board_emoji";
|
|
10
|
+
import { migration010 } from "./010_celebration_sounds_muted";
|
|
11
|
+
import { migration011 } from "./011_board_cli_access";
|
|
12
|
+
import { migration012 } from "./012_notification_event";
|
|
13
|
+
import { migration013 } from "./013_cli_policy_and_provenance";
|
|
14
|
+
import { migration014 } from "./014_drop_board_cli_access";
|
|
15
|
+
import { migration015 } from "./015_trash_deleted_at";
|
|
16
|
+
import { migration016 } from "./016_task_group_sort_and_board_defaults";
|
|
17
|
+
import { migration017 } from "./017_task_priority_none_default";
|
|
18
|
+
import { migration018 } from "./018_board_releases";
|
|
19
|
+
import { migration019 } from "./019_cli_global_create_board_default_on";
|
|
20
|
+
import type { Migration } from "./types";
|
|
21
|
+
|
|
22
|
+
/** Numbered migrations, ascending by version. */
|
|
23
|
+
export const migrations: Migration[] = [
|
|
24
|
+
migration001,
|
|
25
|
+
migration002,
|
|
26
|
+
migration003,
|
|
27
|
+
migration004,
|
|
28
|
+
migration005,
|
|
29
|
+
migration006,
|
|
30
|
+
migration007,
|
|
31
|
+
migration008,
|
|
32
|
+
migration009,
|
|
33
|
+
migration010,
|
|
34
|
+
migration011,
|
|
35
|
+
migration012,
|
|
36
|
+
migration013,
|
|
37
|
+
migration014,
|
|
38
|
+
migration015,
|
|
39
|
+
migration016,
|
|
40
|
+
migration017,
|
|
41
|
+
migration018,
|
|
42
|
+
migration019,
|
|
43
|
+
];
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads `--profile <name>` from argv for server bootstrap entrypoints.
|
|
3
|
+
* Parent CLIs pass the resolved profile this way instead of any profile env var.
|
|
4
|
+
*/
|
|
5
|
+
export function parseBootstrapProfileFromArgv(): string | undefined {
|
|
6
|
+
const argv = process.argv.slice(2);
|
|
7
|
+
const i = argv.indexOf("--profile");
|
|
8
|
+
if (i >= 0) {
|
|
9
|
+
const next = argv[i + 1]?.trim();
|
|
10
|
+
if (next) return next;
|
|
11
|
+
}
|
|
12
|
+
const eq = argv.find((a) => a.startsWith("--profile="));
|
|
13
|
+
if (eq) {
|
|
14
|
+
const v = eq.slice("--profile=".length).trim();
|
|
15
|
+
if (v) return v;
|
|
16
|
+
}
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Reads `--port <n>` from argv for server bootstrap entrypoints (no port env var). */
|
|
21
|
+
export function parseBootstrapPortFromArgv(): number | undefined {
|
|
22
|
+
const argv = process.argv.slice(2);
|
|
23
|
+
const i = argv.indexOf("--port");
|
|
24
|
+
if (i >= 0) {
|
|
25
|
+
const next = argv[i + 1]?.trim();
|
|
26
|
+
if (next) {
|
|
27
|
+
const parsed = Number(next);
|
|
28
|
+
if (Number.isInteger(parsed) && parsed > 0) return parsed;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
const eq = argv.find((a) => a.startsWith("--port="));
|
|
32
|
+
if (eq) {
|
|
33
|
+
const parsed = Number(eq.slice("--port=".length).trim());
|
|
34
|
+
if (Number.isInteger(parsed) && parsed > 0) return parsed;
|
|
35
|
+
}
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Reads `--dev` flag from argv for server bootstrap entrypoints. */
|
|
40
|
+
export function parseBootstrapDevFlagFromArgv(): boolean {
|
|
41
|
+
return process.argv.slice(2).includes("--dev");
|
|
42
|
+
}
|
|
@@ -61,7 +61,8 @@ export function readCliGlobalPolicy(): CliGlobalPolicy {
|
|
|
61
61
|
const row = db
|
|
62
62
|
.query("SELECT create_board FROM cli_global_policy WHERE id = 1")
|
|
63
63
|
.get() as { create_board: number } | null;
|
|
64
|
-
|
|
64
|
+
// Missing row should not happen after migrations; default matches seeded `create_board` (on).
|
|
65
|
+
return { createBoard: row ? row.create_board !== 0 : true };
|
|
65
66
|
}
|
|
66
67
|
|
|
67
68
|
export function setCliGlobalCreateBoard(enabled: boolean): void {
|