@danypops/tickets 0.8.2 → 0.8.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danypops/tickets",
3
- "version": "0.8.2",
3
+ "version": "0.8.4",
4
4
  "description": "Unified CLI, daemon, and TypeScript library for issue tracking across GitHub, GitLab, and Jira.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -24,9 +24,9 @@
24
24
  "typecheck": "tsc --noEmit"
25
25
  },
26
26
  "dependencies": {
27
- "@danypops/vehicle-core": "^0.1.1",
28
- "@danypops/vehicle-server": "^0.2.1",
29
- "@danypops/vehicle-client": "^0.1.1",
27
+ "@danypops/vehicle-core": "^0.10.0",
28
+ "@danypops/vehicle-server": "^0.13.0",
29
+ "@danypops/vehicle-client": "^0.5.0",
30
30
  "@danypops/enigma-client": "^0.3.0",
31
31
  "@gitbeaker/rest": "^43.8.0",
32
32
  "commander": "^12.1.0",
@@ -23,7 +23,7 @@ import {
23
23
  type VehicleEffect,
24
24
  } from "@danypops/vehicle-core";
25
25
  import { VehicleRegistry } from "@danypops/vehicle-server";
26
- import type { BackendCapabilities, TicketService } from "../application/service.js";
26
+ import type { BackendCapabilities, TicketService } from "../issue/service.js";
27
27
  import type { TicketOperation } from "../rpc/ops.js";
28
28
  import { TICKET_OP_HANDLERS, type TicketsAppDeps } from "../rpc/server.js";
29
29
 
package/src/cli/index.ts CHANGED
@@ -13,8 +13,8 @@ import { loginWithGitLabDeviceFlow } from "../auth/gitlab-oauth.js";
13
13
  import { loginWithJiraAuthorizationCode } from "../auth/jira-oauth.js";
14
14
  import { promptMaskedSecret } from "../auth/masked-prompt.js";
15
15
  import { deleteToken, isTokenFresh, listStoredBackends, loadToken, saveToken } from "../auth/token-store.js";
16
- import type { CreateInput, ListFilter, Priority, Status, UpdateInput } from "../domain/issue.js";
17
- import { parseStatus } from "../domain/issue.js";
16
+ import type { CreateInput, ListFilter, Priority, Status, UpdateInput } from "../issue/issue.js";
17
+ import { parseStatus } from "../issue/issue.js";
18
18
  import { installTicketsService, systemctlTickets, systemdUnitPath } from "./systemd-service.js";
19
19
  import { createTicketsClient, type TicketsRpcClient } from "./tickets-client.js";
20
20
 
@@ -10,11 +10,11 @@ import { type TryEnigmaCredential, tryEnigmaCredential } from "@danypops/enigma-
10
10
  import type { MaintenanceTask } from "@danypops/vehicle-server/daemon";
11
11
  import type { Logger } from "@danypops/vehicle-server/logging";
12
12
  import { parse as parseYaml } from "yaml";
13
- import type { TicketService } from "../application/service.js";
14
13
  import { isTokenFresh, loadToken } from "../auth/token-store.js";
15
- import type { IssueRepository } from "../domain/repository.js";
16
14
  import { GitHubRepository } from "../github/github.js";
17
15
  import { GitLabRepository } from "../gitlab/gitlab.js";
16
+ import type { IssueRepository } from "../issue/repository.js";
17
+ import type { TicketService } from "../issue/service.js";
18
18
  import { JiraRepository } from "../jira/jira.js";
19
19
 
20
20
  export interface BackendConfig {
@@ -21,8 +21,8 @@
21
21
 
22
22
  import { RequestError } from "@octokit/request-error";
23
23
  import { Octokit } from "octokit";
24
- import { ApiError, AuthRequiredError, IssueNotFoundError } from "../domain/errors.js";
25
- import type { Comment, CreateInput, Issue, ListFilter, parsePriority, Status, UpdateInput } from "../domain/issue.js";
24
+ import { ApiError, AuthRequiredError, IssueNotFoundError } from "../issue/errors.js";
25
+ import type { Comment, CreateInput, Issue, ListFilter, parsePriority, Status, UpdateInput } from "../issue/issue.js";
26
26
 
27
27
  const DEFAULT_TIMEOUT_MS = 30_000;
28
28
 
@@ -14,8 +14,8 @@
14
14
  import { isIP } from "node:net";
15
15
  import { GitbeakerRequestError, type RequesterType, type ResourceOptions } from "@gitbeaker/requester-utils";
16
16
  import { Gitlab } from "@gitbeaker/rest";
17
- import { ApiError, AuthRequiredError, InvalidUrlError, IssueNotFoundError } from "../domain/errors.js";
18
- import type { Comment, CreateInput, Issue, ListFilter, parsePriority, Status, UpdateInput } from "../domain/issue.js";
17
+ import { ApiError, AuthRequiredError, InvalidUrlError, IssueNotFoundError } from "../issue/errors.js";
18
+ import type { Comment, CreateInput, Issue, ListFilter, parsePriority, Status, UpdateInput } from "../issue/issue.js";
19
19
 
20
20
  export interface GitLabOptions {
21
21
  projectId: string;
@@ -1,4 +1,4 @@
1
- import { ApiError, IssueNotFoundError } from "./domain/errors.js";
1
+ import { ApiError, IssueNotFoundError } from "./issue/errors.js";
2
2
 
3
3
  export type FetchLike = typeof fetch;
4
4
 
package/src/index.ts CHANGED
@@ -1,4 +1,3 @@
1
- export { NotSupportedError, TicketService, UnknownBackendError } from "./application/service.js";
2
1
  export { openUrl } from "./auth/browser.js";
3
2
  // Delegated OAuth (device flow for GitHub/GitLab, authorization code for Jira)
4
3
  // — see RESEARCH.md for why each backend gets a different flow.
@@ -24,11 +23,12 @@ export {
24
23
  defaultConfigPath,
25
24
  loadConfig,
26
25
  } from "./config/config.js";
27
- export * from "./domain/errors.js";
28
- export * from "./domain/issue.js";
29
- export * from "./domain/repository.js";
30
26
  export { type GitHubOptions, GitHubRepository } from "./github/github.js";
31
27
  export { type GitLabOptions, GitLabRepository } from "./gitlab/gitlab.js";
28
+ export * from "./issue/errors.js";
29
+ export * from "./issue/issue.js";
30
+ export * from "./issue/repository.js";
31
+ export { NotSupportedError, TicketService, UnknownBackendError } from "./issue/service.js";
32
32
  export { type JiraOptions, JiraRepository } from "./jira/jira.js";
33
33
  export type { TicketOperation, TicketOpInputs, TicketOpOutputs } from "./rpc/ops.js";
34
34
  export type { FocusStatus, TicketFocusState } from "./sqlite/focus.js";
@@ -4,8 +4,8 @@
4
4
  * routes every call to the named backend's repository. Depends only on ports,
5
5
  * never on a concrete adapter.
6
6
  */
7
- import type { Comment, CreateInput, Issue, ListFilter, UpdateInput } from "../domain/issue.js";
8
- import { parseRef } from "../domain/issue.js";
7
+ import type { Comment, CreateInput, Issue, ListFilter, UpdateInput } from "./issue.js";
8
+ import { parseRef } from "./issue.js";
9
9
  import {
10
10
  hasBoardFilterDiscovery,
11
11
  hasBoardQuickFilterDiscovery,
@@ -16,8 +16,8 @@ import {
16
16
  hasSyncScopeExpansion,
17
17
  hasTemplateDiscovery,
18
18
  type IssueRepository,
19
- } from "../domain/repository.js";
20
- import type { Template } from "../domain/template.js";
19
+ } from "./repository.js";
20
+ import type { Template } from "./template.js";
21
21
 
22
22
  export interface BackendCapabilities {
23
23
  readonly name: string;
package/src/jira/jira.ts CHANGED
@@ -16,10 +16,10 @@
16
16
  import type { AxiosAdapter } from "axios";
17
17
  import type { HttpException, Config as JiraClientConfig } from "jira.js";
18
18
  import { AgileClient, Version2Client } from "jira.js";
19
- import { ApiError, IssueNotFoundError } from "../domain/errors.js";
20
- import type { Comment, CreateInput, Issue, IssueLink, ListFilter, parsePriority, Status, UpdateInput } from "../domain/issue.js";
21
- import type { Template } from "../domain/template.js";
22
- import { buildTemplateBody, extractTemplateSections } from "../domain/template.js";
19
+ import { ApiError, IssueNotFoundError } from "../issue/errors.js";
20
+ import type { Comment, CreateInput, Issue, IssueLink, ListFilter, parsePriority, Status, UpdateInput } from "../issue/issue.js";
21
+ import type { Template } from "../issue/template.js";
22
+ import { buildTemplateBody, extractTemplateSections } from "../issue/template.js";
23
23
  import * as manifest from "./manifest.js";
24
24
 
25
25
  /**
@@ -444,7 +444,7 @@ export class JiraRepository {
444
444
  /**
445
445
  * Samples the most recently created issues for a project/issue-type pair
446
446
  * and extracts the description section headers common to all of them --
447
- * see ../domain/template.ts. Ported from emcee's TemplateService.DiscoverTemplate.
447
+ * see ../issue/template.ts. Ported from emcee's TemplateService.DiscoverTemplate.
448
448
  */
449
449
  async discoverTemplate(project: string, issueType: string, sampleSize = 5): Promise<Template | undefined> {
450
450
  const jql = `project = ${jqlQuote(project)} AND issuetype = ${jqlQuote(issueType)} ORDER BY created DESC`;
@@ -11,9 +11,9 @@ import { createLogger, type Logger } from "@danypops/vehicle-server/logging";
11
11
  import { ensureAuthToken, type PathEnvironment, resolveDaemonPaths } from "@danypops/vehicle-server/paths";
12
12
  import { checkpoint, openSqliteWithPragmas } from "@danypops/vehicle-server/storage";
13
13
  import { createTicketsVehicleRegistry, syncDiscoverAvailability } from "../agent-tools/tickets-vehicle.js";
14
- import { TicketService } from "../application/service.js";
15
14
  import { type BuildRepositories, buildRepositories, type Config, createBackendRefreshTask, loadConfig } from "../config/config.js";
16
- import type { IssueRepository } from "../domain/repository.js";
15
+ import type { IssueRepository } from "../issue/repository.js";
16
+ import { TicketService } from "../issue/service.js";
17
17
  import { TICKETS_DAEMON_NAMES } from "../rpc/ops.js";
18
18
  import { buildApp, type TicketsAppDeps } from "../rpc/server.js";
19
19
  import { FOCUS_MIGRATIONS, FocusStore } from "../sqlite/focus.js";
@@ -8,7 +8,7 @@
8
8
 
9
9
  import type { MaintenanceTask } from "@danypops/vehicle-server/daemon";
10
10
  import type { Logger } from "@danypops/vehicle-server/logging";
11
- import type { TicketService } from "../application/service.js";
11
+ import type { TicketService } from "../issue/service.js";
12
12
  import type { Ledger } from "../sqlite/ledger.js";
13
13
 
14
14
  const DEFAULT_SYNC_LIMIT = 50;
package/src/rpc/ops.ts CHANGED
@@ -4,8 +4,8 @@
4
4
  * whatever consumes this package). Pure types, zero runtime imports, safe to
5
5
  * import from either side without pulling in bun:sqlite or Bun.serve.
6
6
  */
7
- import type { Comment, CreateInput, Issue, ListFilter, UpdateInput } from "../domain/issue.js";
8
- import type { Template } from "../domain/template.js";
7
+ import type { Comment, CreateInput, Issue, ListFilter, UpdateInput } from "../issue/issue.js";
8
+ import type { Template } from "../issue/template.js";
9
9
  import type { TicketFocusState } from "../sqlite/focus.js";
10
10
  import type { SavedQuery } from "../sqlite/saved-queries.js";
11
11
 
package/src/rpc/server.ts CHANGED
@@ -11,9 +11,9 @@ import type { VehicleRegistry } from "@danypops/vehicle-server";
11
11
  import { createVehicleHttpApp } from "@danypops/vehicle-server/http";
12
12
  import type { Logger } from "@danypops/vehicle-server/logging";
13
13
  import { errorResponse, healthResponse, jsonResponse, readyResponse, requireBearerToken } from "@danypops/vehicle-server/rpc-http";
14
- import { NotSupportedError, type TicketService, UnknownBackendError } from "../application/service.js";
15
- import { AuthRequiredError, IssueNotFoundError } from "../domain/errors.js";
16
- import { parseRef } from "../domain/issue.js";
14
+ import { AuthRequiredError, IssueNotFoundError } from "../issue/errors.js";
15
+ import { parseRef } from "../issue/issue.js";
16
+ import { NotSupportedError, type TicketService, UnknownBackendError } from "../issue/service.js";
17
17
  import { FocusError, type FocusStore } from "../sqlite/focus.js";
18
18
  import type { Ledger } from "../sqlite/ledger.js";
19
19
  import { SavedQueryNotFoundError, type SavedQueryStore } from "../sqlite/saved-queries.js";
@@ -8,7 +8,7 @@
8
8
  */
9
9
  import type { Database } from "bun:sqlite";
10
10
  import type { Migration } from "@danypops/vehicle-server/storage";
11
- import type { Issue } from "../domain/issue.js";
11
+ import type { Issue } from "../issue/issue.js";
12
12
 
13
13
  export const LEDGER_MIGRATIONS: Migration[] = [
14
14
  {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Saved queries — a name plus a raw query string (Jira JQL today; the backend
3
- * decides what "raw query" means via domain/repository.ts's RawQueryable) that
3
+ * decides what "raw query" means via issue/repository.ts's RawQueryable) that
4
4
  * can be run again by name instead of re-typing the query every time. This is
5
5
  * how a board/backlog view (e.g. a Jira board's quickFilter, or its backlog's
6
6
  * customFilter) becomes something the CLI/TUI/tool surface can browse
File without changes
File without changes
File without changes
File without changes