pm-jira 2026.6.1 → 2026.6.3

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/CHANGELOG.md CHANGED
@@ -1,6 +1,40 @@
1
1
  # Changelog
2
2
 
3
- ## 2026.6.1 - 2026-06-01
3
+ ## 2026.6.3 - 2026-06-03
4
+
5
+ ### Added
6
+
7
+ - pm-jira: deepen filters/dry-run/field-mapping/validate/hooks \(enhancement brief 2026-06-03\) ([pm-jira-i7fd](https://github.com/unbraind/pm-jira/blob/main/.agents/pm/features/pm-jira-i7fd.toon))
8
+ - pm-jira: domain-max SDK enhancement \(idempotent import, preflight, rate-limit backoff\) ([pm-jira-4804](https://github.com/unbraind/pm-jira/blob/main/.agents/pm/features/pm-jira-4804.toon))
9
+ - export-on-write hook \(opt-in\) + add 'hooks' capability ([pm-jira-65ao](https://github.com/unbraind/pm-jira/blob/main/.agents/pm/tasks/pm-jira-65ao.toon))
10
+
11
+ ### Changed
12
+
13
+ - Idempotent import: match on Jira key, update instead of duplicate; persist jira\_key/jira\_url ([pm-jira-3b0b](https://github.com/unbraind/pm-jira/blob/main/.agents/pm/tasks/pm-jira-3b0b.toon))
14
+
15
+ ### Other
16
+
17
+ - Production-readiness audit 2026-05-28 ([pm-jira-fc13](https://github.com/unbraind/pm-jira/blob/main/.agents/pm/tasks/pm-jira-fc13.toon))
18
+ - preflight capability: pm jira preflight command + registerPreflight guard ([pm-jira-vfb3](https://github.com/unbraind/pm-jira/blob/main/.agents/pm/tasks/pm-jira-vfb3.toon))
19
+ - Robustness: 429/503 rate-limit backoff + Retry-After on GET/POST ([pm-jira-2up8](https://github.com/unbraind/pm-jira/blob/main/.agents/pm/tasks/pm-jira-2up8.toon))
20
+ - manifest capabilities correctness + README + tests + functional verification ([pm-jira-lu1f](https://github.com/unbraind/pm-jira/blob/main/.agents/pm/tasks/pm-jira-lu1f.toon))
21
+ - Filters: --assignee augments default JQL ([pm-jira-ia8o](https://github.com/unbraind/pm-jira/blob/main/.agents/pm/tasks/pm-jira-ia8o.toon))
22
+ - Decision: what needs live Jira creds \(not exercisable here\) ([pm-jira-49oh](https://github.com/unbraind/pm-jira/blob/main/.agents/pm/tasks/pm-jira-49oh.toon))
23
+ - Decision: hook policy \(best-effort, opt-in, no auto-push\) ([pm-jira-h5wu](https://github.com/unbraind/pm-jira/blob/main/.agents/pm/tasks/pm-jira-h5wu.toon))
24
+ - Decision: field-mapping model ([pm-jira-7y1y](https://github.com/unbraind/pm-jira/blob/main/.agents/pm/tasks/pm-jira-7y1y.toon))
25
+ - Manifest capability correctness + README ([pm-jira-wsn0](https://github.com/unbraind/pm-jira/blob/main/.agents/pm/tasks/pm-jira-wsn0.toon))
26
+ - pm jira validate diagnostics \(--json, no secret leak\) ([pm-jira-4dfb](https://github.com/unbraind/pm-jira/blob/main/.agents/pm/tasks/pm-jira-4dfb.toon))
27
+ - Field-mapping depth + --map override \(both directions\) ([pm-jira-7bmf](https://github.com/unbraind/pm-jira/blob/main/.agents/pm/tasks/pm-jira-7bmf.toon))
28
+ - --dry-run on import AND export \(no-network\), with strace proof ([pm-jira-4r5q](https://github.com/unbraind/pm-jira/blob/main/.agents/pm/tasks/pm-jira-4r5q.toon))
29
+ - JQL builder + convenience filters \(--assignee/--issue-type/--label/--updated-since\) ([pm-jira-ko1c](https://github.com/unbraind/pm-jira/blob/main/.agents/pm/tasks/pm-jira-ko1c.toon))
30
+
31
+ ## 2026.06.02 - 2026-06-02
32
+
33
+ ### Added
34
+
35
+ - Adopt full SDK surface: jira import/export + schema fields + flags ([pm-jira-27sk](https://github.com/unbraind/pm-jira/blob/main/.agents/pm/features/pm-jira-27sk.toon))
36
+
37
+ ## 2026.06.01 - 2026-06-01
4
38
 
5
39
  ### Fixed
6
40
 
package/README.md CHANGED
@@ -4,12 +4,17 @@ A [pm-cli](https://github.com/unbraind/pm-cli) extension that syncs Jira issues
4
4
 
5
5
  ## Features
6
6
 
7
- - Sync issues from any Jira project into pm items with full deduplication
8
- - Custom JQL support for fine-grained control over what gets synced
9
- - Automatic mapping of Jira statuses and priorities to pm equivalents
10
- - Labels and fix versions mapped as pm tags
11
- - Dry-run mode to preview changes before writing
12
- - Works as both a `pm jira sync` command and a `jira-sync` importer
7
+ - Pull issues from any Jira project into pm items via `pm jira import` or `pm jira sync`
8
+ - Export pm items back out as Jira create payloads via `pm jira export` (preview, or `--push` to create issues)
9
+ - **Convenience JQL filters** `--project`, `--status`, `--assignee`, `--issue-type`, `--label`, `--updated-since` compose into a single JQL query (or pass full `--jql` to override)
10
+ - **Rich field mapping** Jira status (by name, with a `statusCategory` fallback for custom workflows), priority, issue type → pm type, labels/fix-versions → tags, assignee → tag; configurable with `--status-map` and a general `--map jiraField=pmField`
11
+ - **`--dry-run` everywhere** both import and export print the exact request / mutations they *would* make and perform **no network call** (the offline-testable, creds-free path)
12
+ - **`pm jira validate`** report Jira credential/base-URL readiness without leaking any secret (hostname-only preview); `--json` aware
13
+ - Optional, opt-in **export-on-write hook** (`PM_JIRA_PUSH_ON_WRITE`) — best-effort, never breaks your pm command, no-op without credentials
14
+ - Jira provenance (key + browse URL) persisted in the item description and declared as `jira_key` / `jira_url` schema fields; on export, items that already carry a Jira key become an `update` (PUT) instead of a duplicate create
15
+ - Works as a `pm jira sync`/`pm jira import` command, a `pm jira export` exporter, and a config-driven `jira-sync` importer
16
+
17
+ > **Which features need live Jira credentials?** Everything except the actual network round-trip is usable and testable offline. Building JQL, previewing requests/mutations with `--dry-run`, field mapping in both directions, and `pm jira validate` all work with **no creds and no network**. You only need `JIRA_BASE_URL` / `JIRA_EMAIL` / `JIRA_API_TOKEN` for: a real import fetch, `pm jira export --push` (creating/updating issues), and live reachability.
13
18
 
14
19
  ## Installation
15
20
 
@@ -74,17 +79,111 @@ pm jira sync --project PROJ --status wip
74
79
  pm jira sync --project PROJ --max-results 100 --status todo --dry-run
75
80
  ```
76
81
 
77
- ### Flags
82
+ ### Command / Importer: `pm jira import`
78
83
 
79
- | Flag | Alias | Type | Default | Description |
80
- |---|---|---|---|---|
81
- | `--project` | `-p` | string | — | Jira project key (e.g. `PROJ`). Used to build default JQL. |
82
- | `--jql` | `-q` | string | — | Custom JQL query. Overrides `--project` default JQL. |
83
- | `--max-results` | `-n` | number | `500` | Maximum number of issues to sync. |
84
- | `--dry-run` | — | boolean | `false` | Preview what would be synced without writing. |
85
- | `--status` | `-s` | string | — | Filter by mapped pm status (`todo`, `wip`, `done`, `blocked`). |
84
+ `pm jira import` is the native importer pipeline equivalent of `pm jira sync` — it
85
+ pulls issues via JQL and creates pm items. Both share the same flags and logic.
86
86
 
87
- ### Importer: `jira-sync`
87
+ ```bash
88
+ # Pull all open issues from a project
89
+ pm jira import --project PROJ
90
+
91
+ # Use a custom Jira host (instead of JIRA_BASE_URL) + custom JQL
92
+ pm jira import --host https://company.atlassian.net --jql "project = PROJ AND assignee = currentUser()"
93
+
94
+ # Override status mapping
95
+ pm jira import --project PROJ --status-map "QA=blocked,Done=closed"
96
+ ```
97
+
98
+ ### Pull flags (`pm jira sync` / `pm jira import`)
99
+
100
+ | Flag | Type | Default | Description |
101
+ |---|---|---|---|
102
+ | `--project` | string | — | Jira project key (e.g. `PROJ`). Composed into JQL. |
103
+ | `--jql` | string | — | Custom JQL query. Used verbatim; overrides all convenience filters below. |
104
+ | `--status` | string | — | Filter by pm status (`open`/`in_progress`/`closed`/`blocked`, mapped to a `statusCategory` clause) or a raw Jira status name. Also filters imported items client-side. |
105
+ | `--assignee` | string | — | Filter by assignee (accountId, name, or a function like `currentUser()`). |
106
+ | `--issue-type` | string | — | Filter by Jira issue type (e.g. `Bug`). |
107
+ | `--label` | string | — | Filter by Jira label. |
108
+ | `--updated-since` | string | — | Filter by updated date, relative (`-7d`) or absolute (`2026-01-01`). |
109
+ | `--status-map` | string | — | Override status mapping, e.g. `"In Review=in_progress,QA=blocked"`. |
110
+ | `--map` | string | — | Override field mapping, e.g. `"issuetype=Task,assignee=skip"`. |
111
+ | `--host` | string | `$JIRA_BASE_URL` | Jira base URL override. |
112
+ | `--max-results` | number | `500` | Maximum number of issues to pull. |
113
+ | `--dry-run` | boolean | `false` | Print the JQL + exact GET request that would run; **no network call**. |
114
+
115
+ When no `--jql` is given, the convenience filters are AND-combined; if you don't
116
+ filter on status, a `statusCategory != Done` clause is appended so an unscoped
117
+ pull stays focused on active work (the historical default).
118
+
119
+ #### `--map` field overrides
120
+
121
+ `--map` accepts a comma list of `jiraField=pmTarget` pairs. Recognized Jira-side
122
+ keys: `status`, `statuscategory`, `priority`, `issuetype` (alias `type`),
123
+ `labels`, `assignee`, `duedate`. Examples:
124
+
125
+ ```bash
126
+ # Pin every imported item's type, and skip the assignee tag
127
+ pm jira import --project PROJ --map "issuetype=Task,assignee=skip"
128
+
129
+ # Force a pm status regardless of the Jira workflow state
130
+ pm jira import --project PROJ --map "status=in_progress"
131
+ ```
132
+
133
+ ### Exporter: `pm jira export`
134
+
135
+ Render pm items as Jira create payloads. Prints JSON by default; with `--push`
136
+ (and credentials + `--project`) it POSTs each payload to Jira's create-issue API.
137
+
138
+ ```bash
139
+ # Preview the Jira create payloads for all pm items (no network, no creds needed)
140
+ pm jira export --project PROJ
141
+
142
+ # Print the exact mutations that WOULD run (create vs update), no network/creds
143
+ pm jira export --project PROJ --dry-run
144
+
145
+ # Derive Jira issuetype + priority from each pm item's type/priority
146
+ pm jira export --project PROJ --rich --dry-run
147
+
148
+ # Actually create the issues in Jira (requires creds + --project)
149
+ pm jira export --push --project PROJ
150
+ ```
151
+
152
+ | Flag | Type | Default | Description |
153
+ |---|---|---|---|
154
+ | `--project` | string | — | Target Jira project key for created issues (required for `--push`). |
155
+ | `--map` | string | — | Override field mapping, e.g. `"issuetype=Story"`. |
156
+ | `--rich` | boolean | `false` | Derive Jira `issuetype` + `priority` from the pm item type/priority. |
157
+ | `--dry-run` | boolean | `false` | Print the Jira POST/PUT mutations that would run; **no network call**. |
158
+ | `--host` | string | `$JIRA_BASE_URL` | Jira base URL override. |
159
+ | `--push` | boolean | `false` | POST payloads to Jira (requires credentials + `--project`). |
160
+
161
+ Items whose description carries a `Jira <KEY>: <url>` provenance marker (added on
162
+ import) are matched back to their upstream issue: `--dry-run` shows them as an
163
+ `update` (PUT), and `--push` **skips** them so a re-export never duplicates an
164
+ existing Jira issue (only items without a key are created).
165
+
166
+ ### Command: `pm jira validate`
167
+
168
+ Report whether pm-jira has the credentials/base URL it needs — **without making
169
+ a network call and without leaking any secret value** (it prints a hostname-only
170
+ preview, never the token or email):
171
+
172
+ ```bash
173
+ pm jira validate # human-readable readiness summary
174
+ pm jira validate --json # structured object: { ready, baseUrlPresent, ... }
175
+ pm jira validate --host https://company.atlassian.net
176
+ ```
177
+
178
+ ### Export-on-write hook (opt-in)
179
+
180
+ Setting `PM_JIRA_PUSH_ON_WRITE=1` activates a best-effort `onWrite` hook. It is a
181
+ strict no-op unless both the env flag is truthy **and** Jira credentials are
182
+ present, and it can never fail your `pm` command (the pm hook runtime swallows
183
+ any error). It intentionally does **not** auto-POST on every write; use the
184
+ explicit, reviewable `pm jira export --push` to mirror items upstream.
185
+
186
+ ### Importer: `jira-sync` (config-driven)
88
187
 
89
188
  Use the `jira-sync` importer in your pm-cli config for automated syncing:
90
189
 
@@ -116,13 +215,31 @@ Credentials are read from environment variables or from the importer config:
116
215
 
117
216
  ## Status Mapping
118
217
 
218
+ The default mapping (override per-status with `--status-map`):
219
+
119
220
  | Jira Status | pm Status |
120
221
  |---|---|
121
- | To Do, Open, Backlog, (any other) | `todo` |
122
- | In Progress, In Review, In Development, Code Review | `wip` |
123
- | Done, Resolved, Closed, Complete, Completed | `done` |
222
+ | To Do, Open, Backlog, (any other) | `open` |
223
+ | In Progress, In Review, In Development, Code Review | `in_progress` |
224
+ | Done, Resolved, Closed, Complete, Completed | `closed` |
124
225
  | Blocked | `blocked` |
125
226
 
227
+ When the Jira status *name* is unrecognized (custom workflows), pm-jira falls
228
+ back to the issue's `statusCategory` bucket: `new` → `open`, `indeterminate` →
229
+ `in_progress`, `done` → `closed`.
230
+
231
+ ### Issue type mapping
232
+
233
+ | Jira Issue Type | pm Type |
234
+ |---|---|
235
+ | Bug, Defect | `Bug` |
236
+ | Story, Epic | `Feature` |
237
+ | Task, Sub-task | `Task` |
238
+ | (any other) | `Issue` |
239
+
240
+ Override with `--map issuetype=<pmType>` (import) or `--map issuetype=<jiraType>`
241
+ (export, with `--rich`).
242
+
126
243
  ## Priority Mapping
127
244
 
128
245
  | Jira Priority | pm Priority |
@@ -134,19 +251,20 @@ Credentials are read from environment variables or from the importer config:
134
251
 
135
252
  ## Item Structure
136
253
 
137
- Each synced item uses `${PROJECT}-${NUMBER}` as the idSuffix for deduplication (e.g. `PROJ-123`). Running sync again updates existing items rather than creating duplicates.
138
-
139
- Items include:
254
+ Each imported item includes:
140
255
 
141
256
  - **title**: `[PROJ-123] Issue summary`
142
257
  - **body**: Issue description (converted from Atlassian Document Format to plain text)
258
+ - **description**: A provenance marker `Jira PROJ-123: https://…/browse/PROJ-123` so the
259
+ Jira key + URL survive round-trips and power `pm jira export`. The extension also
260
+ declares `jira_key` and `jira_url` as optional item schema fields (capability `schema`).
143
261
  - **status**: Mapped from Jira status (see table above)
144
262
  - **priority**: Mapped from Jira priority (see table above)
145
263
  - **tags**: Jira labels + fix version names
146
- - **meta.jira_key**: Original Jira issue key (e.g. `PROJ-123`)
147
- - **meta.jira_project**: Jira project key (e.g. `PROJ`)
148
- - **meta.jira_assignee**: Assignee display name (if set)
149
- - **meta.jira_duedate**: Due date in `YYYY-MM-DD` format (if set)
264
+ - **deadline**: Jira due date (`YYYY-MM-DD`), if set
265
+
266
+ > Note: pm's `create` has no generic custom-field setter for a standalone extension, so
267
+ > provenance is stored in the description marker rather than as structured metadata.
150
268
 
151
269
  ## JQL Examples
152
270
 
@@ -185,9 +303,9 @@ npm run dev
185
303
 
186
304
  ## Requirements
187
305
 
188
- - Node.js 18+ (uses native `https` module and `Buffer`)
189
- - pm-cli `>=2026.5.0`
190
- - TypeScript 5.x (dev dependency)
306
+ - Node.js 20+ (uses native `https` module and `Buffer`)
307
+ - pm-cli `>=2026.5.31`
308
+ - TypeScript 6.x (dev dependency)
191
309
 
192
310
  ## License
193
311
 
package/dist/index.d.ts CHANGED
@@ -1,9 +1,198 @@
1
+ export declare const EXIT_CODE: {
2
+ readonly GENERIC_FAILURE: 1;
3
+ readonly USAGE: 2;
4
+ readonly NOT_FOUND: 3;
5
+ };
6
+ export declare class CommandError extends Error {
7
+ exitCode: number;
8
+ constructor(message: string, exitCode?: number);
9
+ }
10
+ interface JiraIssue {
11
+ key: string;
12
+ fields: {
13
+ summary: string;
14
+ description?: {
15
+ type: string;
16
+ content?: Array<{
17
+ type: string;
18
+ content?: Array<{
19
+ type: string;
20
+ text?: string;
21
+ }>;
22
+ }>;
23
+ } | null;
24
+ status: {
25
+ name: string;
26
+ statusCategory: {
27
+ key: string;
28
+ };
29
+ };
30
+ priority?: {
31
+ name: string;
32
+ } | null;
33
+ labels?: string[];
34
+ assignee?: {
35
+ displayName: string;
36
+ emailAddress: string;
37
+ } | null;
38
+ duedate?: string | null;
39
+ fixVersions?: Array<{
40
+ name: string;
41
+ }>;
42
+ issuetype?: {
43
+ name: string;
44
+ } | null;
45
+ };
46
+ }
47
+ type PmPriority = 1 | 2 | 3 | 4;
48
+ type PmStatus = "open" | "in_progress" | "closed" | "blocked";
49
+ export declare function mapJiraPriority(jiraPriority: string | undefined): PmPriority;
50
+ export declare function mapJiraStatus(jiraStatus: string, statusMap?: Record<string, PmStatus>): PmStatus;
51
+ export declare function mapJiraStatusCategory(categoryKey: string | undefined): PmStatus;
52
+ export declare function mapJiraIssueType(jiraType: string | undefined): string;
53
+ export declare function mapPmPriorityToJira(priority: PmPriority | number | undefined): string;
54
+ export type FieldMap = Record<string, string>;
55
+ export declare function parseFieldMap(raw: string | undefined): FieldMap | undefined;
56
+ export declare function parseStatusMap(raw: string | undefined): Record<string, PmStatus> | undefined;
57
+ export interface JqlFilters {
58
+ jql?: string;
59
+ project?: string;
60
+ status?: string;
61
+ assignee?: string;
62
+ issueType?: string;
63
+ label?: string;
64
+ updatedSince?: string;
65
+ }
66
+ export declare function jqlQuote(value: string): string;
67
+ export declare function buildJql(filters: JqlFilters): string;
68
+ export declare function readJqlFilters(options: Record<string, unknown>): JqlFilters;
69
+ export declare function adfToPlainText(node: JiraIssue["fields"]["description"] | {
70
+ type: string;
71
+ content?: unknown[];
72
+ text?: string;
73
+ } | null | undefined): string;
74
+ export declare function plainTextToAdf(text: string): {
75
+ type: "doc";
76
+ version: 1;
77
+ content: Array<{
78
+ type: "paragraph";
79
+ content: Array<{
80
+ type: "text";
81
+ text: string;
82
+ }>;
83
+ }>;
84
+ };
85
+ export declare function jiraProvenance(key: string, browseUrl: string): string;
86
+ export declare function extractJiraKey(text: string | undefined): {
87
+ key: string;
88
+ url: string;
89
+ } | undefined;
1
90
  export declare function readStringOption(options: Record<string, unknown>, kebab: string): string | undefined;
2
91
  export declare function readNumberOption(options: Record<string, unknown>, kebab: string): number | undefined;
3
92
  export declare function readBooleanOption(options: Record<string, unknown>, kebab: string): boolean;
4
93
  export declare function optionString(options: Record<string, unknown>, ...keys: string[]): string | undefined;
5
94
  export declare function optionInt(options: Record<string, unknown>, defaultValue: number, ...keys: string[]): number;
6
95
  export declare function optionEnabled(options: Record<string, unknown>, ...keys: string[]): boolean;
96
+ export interface JiraCreds {
97
+ baseUrl: string;
98
+ email: string;
99
+ token: string;
100
+ authHeader: string;
101
+ }
102
+ export declare function resolveCreds(options: Record<string, unknown>, envLike?: NodeJS.ProcessEnv): JiraCreds;
103
+ export interface CredDiagnostics {
104
+ ready: boolean;
105
+ baseUrlPresent: boolean;
106
+ emailPresent: boolean;
107
+ tokenPresent: boolean;
108
+ baseUrlSource: "option" | "env" | "none";
109
+ hostPreview?: string;
110
+ missing: string[];
111
+ }
112
+ export declare function diagnoseCreds(options: Record<string, unknown>, envLike?: NodeJS.ProcessEnv): CredDiagnostics;
113
+ export interface IssueToItem {
114
+ title: string;
115
+ status: PmStatus;
116
+ priority: PmPriority;
117
+ type: string;
118
+ body: string;
119
+ tags: string[];
120
+ deadline?: string;
121
+ description: string;
122
+ jiraKey: string;
123
+ jiraUrl: string;
124
+ }
125
+ export interface IssueMapOptions {
126
+ statusMap?: Record<string, PmStatus>;
127
+ fieldMap?: FieldMap;
128
+ }
129
+ export declare function issueToItem(issue: JiraIssue, baseUrl: string, optionsOrStatusMap?: IssueMapOptions | Record<string, PmStatus>): IssueToItem;
130
+ export interface JiraSearchRequest {
131
+ method: "GET";
132
+ url: string;
133
+ fields: string;
134
+ }
135
+ export declare function buildSearchRequest(baseUrl: string, jql: string, startAt: number, maxResults: number): JiraSearchRequest;
136
+ interface PmItem {
137
+ id?: string;
138
+ title?: string;
139
+ status?: string;
140
+ body?: string;
141
+ description?: string;
142
+ tags?: string[];
143
+ priority?: number;
144
+ type?: string;
145
+ }
146
+ export declare function mapPmTypeToJira(pmType: string | undefined, override?: string): string;
147
+ export interface JiraCreatePayload {
148
+ fields: {
149
+ project?: {
150
+ key: string;
151
+ };
152
+ summary: string;
153
+ description: ReturnType<typeof plainTextToAdf>;
154
+ issuetype: {
155
+ name: string;
156
+ };
157
+ labels: string[];
158
+ priority?: {
159
+ name: string;
160
+ };
161
+ };
162
+ }
163
+ export interface PayloadOptions {
164
+ projectKey?: string;
165
+ fieldMap?: FieldMap;
166
+ richMapping?: boolean;
167
+ }
168
+ export declare function itemToJiraPayload(item: PmItem, projectKeyOrOptions?: string | PayloadOptions): JiraCreatePayload;
169
+ export interface ExportPlanEntry {
170
+ op: "create" | "update";
171
+ itemId?: string;
172
+ existingKey?: string;
173
+ method: "POST" | "PUT";
174
+ endpoint: string;
175
+ payload: JiraCreatePayload;
176
+ }
177
+ export interface ExportPlan {
178
+ baseUrl: string;
179
+ project?: string;
180
+ entries: ExportPlanEntry[];
181
+ }
182
+ export declare function buildExportPlan(items: PmItem[], baseUrl: string, opts?: {
183
+ projectKey?: string;
184
+ fieldMap?: FieldMap;
185
+ richMapping?: boolean;
186
+ }): ExportPlan;
187
+ export interface PushOnWriteDecision {
188
+ shouldPush: boolean;
189
+ reason: string;
190
+ }
191
+ export declare function decidePushOnWrite(hookCtx: {
192
+ path?: string;
193
+ scope?: string;
194
+ op?: string;
195
+ } | undefined, envLike?: NodeJS.ProcessEnv): PushOnWriteDecision;
7
196
  declare const _default: {
8
197
  name: string;
9
198
  version: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AA6IA,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,KAAK,EAAE,MAAM,GACZ,MAAM,GAAG,SAAS,CAKpB;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,KAAK,EAAE,MAAM,GACZ,MAAM,GAAG,SAAS,CAKpB;AAED,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,KAAK,EAAE,MAAM,GACZ,OAAO,CAQT;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAMpG;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAM3G;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAE1F;;;;;;AAsFD,wBA6PG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAmCA,eAAO,MAA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