@enrichlayer/el-linear 1.6.0 → 1.9.0
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/README.md +101 -5
- package/claude-skills/linear-operations/SKILL.md +55 -0
- package/dist/auth/oauth-app-config.d.ts +21 -0
- package/dist/auth/oauth-app-config.js +82 -0
- package/dist/auth/oauth-callback.js +14 -7
- package/dist/auth/oauth-fs.d.ts +22 -0
- package/dist/auth/oauth-fs.js +77 -6
- package/dist/auth/oauth-headless.d.ts +13 -8
- package/dist/auth/oauth-headless.js +18 -11
- package/dist/auth/oauth-storage.d.ts +11 -3
- package/dist/auth/oauth-storage.js +15 -8
- package/dist/auth/token-resolver.d.ts +9 -0
- package/dist/auth/token-resolver.js +57 -37
- package/dist/commands/init/defaults.d.ts +18 -1
- package/dist/commands/init/defaults.js +83 -2
- package/dist/commands/init/index.js +9 -1
- package/dist/commands/init/oauth.d.ts +10 -4
- package/dist/commands/init/oauth.js +32 -8
- package/dist/commands/init/token.d.ts +0 -8
- package/dist/commands/init/token.js +13 -1
- package/dist/commands/issues/branch.d.ts +17 -0
- package/dist/commands/issues/branch.js +40 -0
- package/dist/commands/issues/description.d.ts +89 -0
- package/dist/commands/issues/description.js +187 -0
- package/dist/commands/issues.js +76 -222
- package/dist/commands/labels.js +17 -2
- package/dist/commands/profile/migrate-legacy.js +10 -33
- package/dist/commands/profile.js +1 -10
- package/dist/commands/projects.d.ts +5 -1
- package/dist/commands/projects.js +144 -64
- package/dist/commands/read-shortcut.d.ts +6 -0
- package/dist/commands/read-shortcut.js +6 -1
- package/dist/commands/refs.js +2 -1
- package/dist/commands/teams.js +12 -2
- package/dist/commands/templates.js +127 -1
- package/dist/commands/users.js +2 -1
- package/dist/config/config.d.ts +19 -0
- package/dist/config/config.js +31 -9
- package/dist/config/issue-validation.js +1 -1
- package/dist/config/paths.d.ts +12 -0
- package/dist/config/paths.js +45 -6
- package/dist/config/term-enforcer.js +1 -1
- package/dist/main.js +39 -3
- package/dist/queries/templates.d.ts +3 -0
- package/dist/queries/templates.js +43 -0
- package/dist/utils/auth.js +7 -9
- package/dist/utils/auto-link-references.js +15 -1
- package/dist/utils/disk-cache.d.ts +51 -0
- package/dist/utils/disk-cache.js +179 -0
- package/dist/utils/formatters/summary.d.ts +62 -0
- package/dist/utils/formatters/summary.js +755 -0
- package/dist/utils/graphql-issues-service.d.ts +106 -3
- package/dist/utils/graphql-issues-service.js +51 -37
- package/dist/utils/issue-reference-extractor.d.ts +9 -1
- package/dist/utils/issue-reference-extractor.js +16 -9
- package/dist/utils/issue-reference-wrapper.js +1 -54
- package/dist/utils/linear-service.d.ts +7 -3
- package/dist/utils/linear-service.js +27 -5
- package/dist/utils/markdown-prosemirror.js +17 -1
- package/dist/utils/mention-resolver.js +17 -5
- package/dist/utils/output.d.ts +5 -1
- package/dist/utils/output.js +28 -1
- package/dist/utils/protected-ranges.d.ts +33 -0
- package/dist/utils/protected-ranges.js +73 -0
- package/dist/utils/table-formatter.d.ts +36 -0
- package/dist/utils/table-formatter.js +46 -24
- package/dist/utils/validators.d.ts +9 -1
- package/dist/utils/validators.js +10 -0
- package/package.json +1 -1
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Human-readable summary formatters for the `--format summary` output mode.
|
|
3
|
+
*
|
|
4
|
+
* These are pure functions: each takes the same shape that the JSON output
|
|
5
|
+
* path receives (a single resource object or a `{ data, meta }` envelope)
|
|
6
|
+
* and returns a plain string suitable for terminal display.
|
|
7
|
+
*
|
|
8
|
+
* Why this exists: every consumer (humans and LLMs) was piping
|
|
9
|
+
* `el-linear ... | python -c 'json.load(...)'` or jq-based extraction to
|
|
10
|
+
* pull out title/state/assignee. This codifies that recurring shape as a
|
|
11
|
+
* first-class output mode, so callers don't reinvent it in shell.
|
|
12
|
+
*
|
|
13
|
+
* The summary format is intentionally stable — it's a contract, not a
|
|
14
|
+
* pretty-print. Field ordering and labels should not change across
|
|
15
|
+
* patch releases without a CHANGELOG entry.
|
|
16
|
+
*/
|
|
17
|
+
export declare function formatIssueSummary(issue: Record<string, unknown>): string;
|
|
18
|
+
export declare function formatIssueList(issues: unknown[]): string;
|
|
19
|
+
export declare function formatProjectSummary(project: Record<string, unknown>): string;
|
|
20
|
+
export declare function formatProjectList(projects: unknown[]): string;
|
|
21
|
+
export declare function formatCommentSummary(comment: Record<string, unknown>): string;
|
|
22
|
+
export declare function formatCommentList(comments: unknown[]): string;
|
|
23
|
+
export declare function formatCycleSummary(cycle: Record<string, unknown>): string;
|
|
24
|
+
export declare function formatCycleList(cycles: unknown[]): string;
|
|
25
|
+
export declare function formatMilestoneSummary(milestone: Record<string, unknown>): string;
|
|
26
|
+
export declare function formatMilestoneList(milestones: unknown[]): string;
|
|
27
|
+
export declare function formatTeamList(teams: unknown[]): string;
|
|
28
|
+
export declare function formatLabelList(labels: unknown[]): string;
|
|
29
|
+
export declare function formatUserSummary(user: Record<string, unknown>): string;
|
|
30
|
+
export declare function formatUserList(users: unknown[]): string;
|
|
31
|
+
export declare function formatDocumentSummary(doc: Record<string, unknown>): string;
|
|
32
|
+
export declare function formatDocumentList(docs: unknown[]): string;
|
|
33
|
+
export declare function formatTemplateSummary(tpl: Record<string, unknown>): string;
|
|
34
|
+
export declare function formatTemplateList(tpls: unknown[]): string;
|
|
35
|
+
export declare function formatAttachmentList(attachments: unknown[]): string;
|
|
36
|
+
export declare function formatReleaseSummary(release: Record<string, unknown>): string;
|
|
37
|
+
export declare function formatReleaseList(releases: unknown[]): string;
|
|
38
|
+
export declare function formatSearchResultList(results: unknown[]): string;
|
|
39
|
+
/**
|
|
40
|
+
* Generic fallback for resources we don't have a dedicated formatter for
|
|
41
|
+
* yet (e.g. profile/config/template/document). Renders any object as a
|
|
42
|
+
* label-padded key/value block, with a "..." footer hinting at JSON for
|
|
43
|
+
* the full payload. Lists fall back to a simple bulleted list.
|
|
44
|
+
*/
|
|
45
|
+
export declare function formatGenericSummary(value: unknown): string;
|
|
46
|
+
export type ResourceKind = "issue" | "issue-list" | "project" | "project-list" | "comment" | "comment-list" | "cycle" | "cycle-list" | "milestone" | "milestone-list" | "team-list" | "label-list" | "user" | "user-list" | "document" | "document-list" | "template" | "template-list" | "attachment-list" | "release" | "release-list" | "search-result-list" | "empty-list" | "generic";
|
|
47
|
+
/**
|
|
48
|
+
* Heuristic — used by the central `outputSuccess` path which doesn't know
|
|
49
|
+
* which command produced the payload. Looks at the shape of the data to
|
|
50
|
+
* pick a formatter.
|
|
51
|
+
*
|
|
52
|
+
* Single-resource detection: uses signature fields (e.g. `identifier` +
|
|
53
|
+
* `state` for issues, `name` + `progress` for projects). When a payload
|
|
54
|
+
* doesn't match any known shape we fall through to `formatGenericSummary`.
|
|
55
|
+
*/
|
|
56
|
+
export declare function inferKindFromPayload(value: unknown): ResourceKind;
|
|
57
|
+
/**
|
|
58
|
+
* Central dispatch: given a resource kind and payload, return the
|
|
59
|
+
* formatted string. The payload for list kinds may be either the raw
|
|
60
|
+
* array or a `{ data: [...] }` envelope — both are handled.
|
|
61
|
+
*/
|
|
62
|
+
export declare function dispatch(kind: ResourceKind, payload: unknown): string;
|