@gitkraken/core-gitlens 0.46.0 → 0.48.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.
Files changed (74) hide show
  1. package/CHANGELOG.md +19 -1
  2. package/dist/git-cli/providers/branches.js +8 -4
  3. package/dist/git-cli/providers/branches.js.map +1 -1
  4. package/dist/plus/ai/providers/anthropicProvider.js +0 -20
  5. package/dist/plus/ai/providers/anthropicProvider.js.map +1 -1
  6. package/dist/plus/git-github/api/enterprisePullRequestMergePolicy.d.ts +31 -0
  7. package/dist/plus/git-github/api/enterprisePullRequestMergePolicy.js +166 -0
  8. package/dist/plus/git-github/api/enterprisePullRequestMergePolicy.js.map +1 -0
  9. package/dist/plus/git-github/api/github.d.ts +7 -4
  10. package/dist/plus/git-github/api/github.js +44 -14
  11. package/dist/plus/git-github/api/github.js.map +1 -1
  12. package/dist/plus/git-github/api/issueWrites.d.ts +1 -0
  13. package/dist/plus/git-github/api/issueWrites.js +5 -5
  14. package/dist/plus/git-github/api/issueWrites.js.map +1 -1
  15. package/dist/plus/git-github/api/pullRequestWrites.d.ts +7 -3
  16. package/dist/plus/git-github/api/pullRequestWrites.js +120 -67
  17. package/dist/plus/git-github/api/pullRequestWrites.js.map +1 -1
  18. package/dist/plus/integrations/authentication/configuredIntegrationService.d.ts +4 -4
  19. package/dist/plus/integrations/authentication/configuredIntegrationService.js +14 -14
  20. package/dist/plus/integrations/authentication/configuredIntegrationService.js.map +1 -1
  21. package/dist/plus/integrations/authentication/integrationAuthenticationService.js +3 -3
  22. package/dist/plus/integrations/authentication/integrationAuthenticationService.js.map +1 -1
  23. package/dist/plus/integrations/context.d.ts +4 -4
  24. package/dist/plus/integrations/index.d.ts +8 -4
  25. package/dist/plus/integrations/index.js +2 -1
  26. package/dist/plus/integrations/index.js.map +1 -1
  27. package/dist/plus/integrations/integrationService.d.ts +9 -2
  28. package/dist/plus/integrations/integrationService.js +95 -31
  29. package/dist/plus/integrations/integrationService.js.map +1 -1
  30. package/dist/plus/integrations/manager.d.ts +16 -4
  31. package/dist/plus/integrations/models/gitHostIntegration.js +7 -4
  32. package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -1
  33. package/dist/plus/integrations/models/integration.d.ts +2 -1
  34. package/dist/plus/integrations/models/integration.js +11 -4
  35. package/dist/plus/integrations/models/integration.js.map +1 -1
  36. package/dist/plus/integrations/models/issueTrackerWrites.d.ts +128 -0
  37. package/dist/plus/integrations/models/issueTrackerWrites.js +0 -0
  38. package/dist/plus/integrations/models/publicIntegration.d.ts +4 -0
  39. package/dist/plus/integrations/models/publicIntegration.js.map +1 -1
  40. package/dist/plus/integrations/providers/github.d.ts +19 -6
  41. package/dist/plus/integrations/providers/github.js +126 -53
  42. package/dist/plus/integrations/providers/github.js.map +1 -1
  43. package/dist/plus/integrations/providers/jira.js +1 -1
  44. package/dist/plus/integrations/providers/jiraIssueByKey.d.ts +2 -0
  45. package/dist/plus/integrations/providers/jiraIssueByKey.js +1 -1
  46. package/dist/plus/integrations/providers/jiraIssueByKey.js.map +1 -1
  47. package/dist/plus/integrations/providers/jiraIssueWriteErrors.d.ts +10 -0
  48. package/dist/plus/integrations/providers/jiraIssueWriteErrors.js +68 -0
  49. package/dist/plus/integrations/providers/jiraIssueWriteErrors.js.map +1 -0
  50. package/dist/plus/integrations/providers/jiraIssueWrites.d.ts +40 -0
  51. package/dist/plus/integrations/providers/jiraIssueWrites.js +397 -0
  52. package/dist/plus/integrations/providers/jiraIssueWrites.js.map +1 -0
  53. package/dist/plus/integrations/providers/providersApi.d.ts +4 -1
  54. package/dist/plus/integrations/providers/providersApi.js +21 -10
  55. package/dist/plus/integrations/providers/providersApi.js.map +1 -1
  56. package/dist/plus/integrations/utils/integration.utils.d.ts +1 -0
  57. package/dist/plus/integrations/utils/integration.utils.js +7 -1
  58. package/dist/plus/integrations/utils/integration.utils.js.map +1 -1
  59. package/dist/utils/date.d.ts +1 -0
  60. package/dist/utils/date.js +10 -1
  61. package/dist/utils/date.js.map +1 -1
  62. package/dist/utils/keys/keymapDispatcher.d.ts +12 -0
  63. package/dist/utils/keys/keymapDispatcher.js +33 -1
  64. package/dist/utils/keys/keymapDispatcher.js.map +1 -1
  65. package/dist/utils/pausedOperation.js +48 -16
  66. package/dist/utils/pausedOperation.js.map +1 -1
  67. package/dist/utils/plural.d.ts +1 -0
  68. package/dist/utils/plural.js +7 -2
  69. package/dist/utils/plural.js.map +1 -1
  70. package/dist/utils/wheel.d.ts +8 -0
  71. package/dist/utils/wheel.js +12 -0
  72. package/dist/utils/wheel.js.map +1 -0
  73. package/docs/integrations.md +80 -8
  74. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"plural.js","names":[],"sources":["../../../utils/src/plural.ts"],"sourcesContent":["import { getNumericFormat } from './date.js';\n\n/*\n * Plural forms for localized count messages.\n *\n * `formatPlural` resolves a translated template that may contain one or more ICU-style plural blocks:\n *\n * {selector, plural, branch{...} branch{...} ...}\n *\n * `selector` names an argument (a positional index such as `0`, or a property name such as `count`).\n * Each `branch` is one of the six CLDR plural categories (`zero`, `one`, `two`, `few`, `many`, `other`)\n * or an exact match `=N`. An `other` branch is required. Blocks may appear anywhere in the template, more\n * than once, and a branch body may itself contain another block (nested arbitrarily) as well as plain\n * `{placeholder}` references, including to its own block's selector. This module must not import\n * `vscode` or `@vscode/l10n` — it stays pure so the same helper works in the extension host, webviews and\n * packages. This grammar is re-implemented (not imported) by `scripts/localization.mjs`'s\n * `parsePluralBlocks`, since that validator is a plain `.mjs` script and cannot import this module — keep\n * the two in sync if the grammar changes.\n */\n\nlet pluralRules: Intl.PluralRules | undefined;\n\n/** Sets the UI locale used to categorize counts. `undefined` resets to the default (see {@link getPluralCategory}). */\nexport function setPluralLocale(locale: string | undefined): void {\n\tpluralRules = locale ? new Intl.PluralRules(locale) : undefined;\n}\n\n/**\n * Returns the CLDR plural category for `count` in the current UI locale. Until {@link setPluralLocale} is\n * called, the document language is used when there is a document (a host that only configures\n * `@vscode/l10n`, such as an external consumer of the graph packages, still gets its language's rules),\n * else English.\n */\nexport function getPluralCategory(count: number): Intl.LDMLPluralRule {\n\tpluralRules ??= new Intl.PluralRules(\n\t\t(typeof document !== 'undefined' ? document.documentElement.lang : undefined) || 'en',\n\t);\n\treturn pluralRules.select(count);\n}\n\ninterface PluralBlock {\n\t/** Index of the block's opening `{` in the text it was found in. */\n\treadonly start: number;\n\t/** Index just past the block's closing `}` in the text it was found in. */\n\treadonly end: number;\n\treadonly selector: string;\n\treadonly branches: ReadonlyMap<string, string>;\n\treadonly otherBranch: string;\n}\n\nclass MalformedPluralBlockError extends Error {}\n\nconst pluralBlockStart = /\\{\\s*([^{}\\s,][^{},]*?)\\s*,\\s*plural\\s*,/;\n\n/**\n * Finds the first top-level ICU-style plural block anywhere in `text`.\n *\n * Returns `undefined` when no `{selector, plural, ...}` prefix is present at all — plain text with no\n * block. Throws `MalformedPluralBlockError` when that prefix is present but the block cannot be parsed\n * (unbalanced braces, or no `other` branch); callers must catch this. Does not look inside a branch body\n * for a nested block — callers that need nested blocks resolved recurse on the branch body themselves.\n */\nfunction findPluralBlock(text: string): PluralBlock | undefined {\n\tconst match = pluralBlockStart.exec(text);\n\tif (match == null) return undefined;\n\n\tconst selector = match[1];\n\tconst branches = new Map<string, string>();\n\tlet index = match.index + match[0].length;\n\n\tfor (;;) {\n\t\twhile (index < text.length && /\\s/.test(text[index])) {\n\t\t\tindex++;\n\t\t}\n\n\t\tif (text[index] === '}') {\n\t\t\tconst otherBranch = branches.get('other');\n\t\t\tif (otherBranch == null) throw new MalformedPluralBlockError(`plural block without an \"other\" branch`);\n\n\t\t\treturn {\n\t\t\t\tstart: match.index,\n\t\t\t\tend: index + 1,\n\t\t\t\tselector: selector,\n\t\t\t\tbranches: branches,\n\t\t\t\totherBranch: otherBranch,\n\t\t\t};\n\t\t}\n\n\t\tconst braceIndex = text.indexOf('{', index);\n\t\tif (braceIndex === -1) throw new MalformedPluralBlockError('unterminated plural block');\n\n\t\tconst name = text.slice(index, braceIndex).trim();\n\t\tif (!name) throw new MalformedPluralBlockError('unterminated plural block');\n\n\t\tlet depth = 1;\n\t\tlet i = braceIndex + 1;\n\t\twhile (i < text.length && depth > 0) {\n\t\t\tif (text[i] === '{') {\n\t\t\t\tdepth++;\n\t\t\t} else if (text[i] === '}') {\n\t\t\t\tdepth--;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\tif (depth !== 0) throw new MalformedPluralBlockError('unbalanced braces in plural block');\n\n\t\tbranches.set(name, text.slice(braceIndex + 1, i - 1));\n\t\tindex = i;\n\t}\n}\n\nconst warned = new Set<string>();\n\nfunction warnOnce(key: string, message: string): void {\n\tif (warned.has(key)) return;\n\n\twarned.add(key);\n\tconsole.warn(message);\n}\n\n// Templates are catalog literals, so the distinct texts parsed over a session are few and are parsed\n// again on every render (graph rows, tooltips, tree nodes); a malformed text is warned about only once\n// because it is only ever parsed once.\nconst parsedBlocks = new Map<string, PluralBlock | undefined>();\n\nfunction findBlockOrWarn(text: string): PluralBlock | undefined {\n\tif (parsedBlocks.has(text)) return parsedBlocks.get(text);\n\n\tlet block: PluralBlock | undefined;\n\ttry {\n\t\tblock = findPluralBlock(text);\n\t} catch (ex) {\n\t\tif (!(ex instanceof MalformedPluralBlockError)) throw ex;\n\n\t\tconsole.warn(`formatPlural: malformed plural block in \"${text}\"; leaving it untouched`);\n\t}\n\n\tparsedBlocks.set(text, block);\n\treturn block;\n}\n\n/** Picks a branch for `block`: an exact `=N` match wins, then the CLDR category, then `other`. A\n * non-number (or missing) selector value is a caller mistake — it always resolves to `other`, warned\n * once per distinct block. */\nfunction selectBranch(block: PluralBlock, values: Record<string, unknown>, raw: string): string {\n\tconst value = values[block.selector];\n\tif (typeof value === 'number') {\n\t\treturn block.branches.get(`=${value}`) ?? block.branches.get(getPluralCategory(value)) ?? block.otherBranch;\n\t}\n\n\twarnOnce(raw, `formatPlural: selector \"${block.selector}\" is not a number; using the \"other\" branch`);\n\treturn block.otherBranch;\n}\n\nfunction toDisplayString(value: unknown): string {\n\tif (typeof value === 'number') return getNumericFormat()(value);\n\tif (typeof value === 'string') return value;\n\tif (typeof value === 'boolean' || typeof value === 'bigint') return String(value);\n\n\t// Not a value formatPlural() is documented to take (a count or a name) — render something rather\n\t// than crash on an object without a meaningful `toString()`.\n\treturn JSON.stringify(value) ?? '';\n}\n\nconst placeholderRegex = /\\{([^}]+)\\}/g;\n\nfunction substitutePlaceholders(text: string, values: Record<string, unknown>): string {\n\tif (!text) return text;\n\n\treturn text.replace(placeholderRegex, (match: string, key: string) => {\n\t\tconst value = values[key];\n\t\treturn value == null ? match : toDisplayString(value);\n\t});\n}\n\nfunction normalizeArgs(args: Record<string, unknown> | readonly unknown[]): Record<string, unknown> {\n\tif (Array.isArray(args)) return Object.fromEntries(args.map((value, index) => [String(index), value]));\n\n\treturn args as Record<string, unknown>;\n}\n\nfunction resolve(template: string, values: Record<string, unknown>): string {\n\tlet result = '';\n\tlet rest = template;\n\n\tfor (;;) {\n\t\tconst block = findBlockOrWarn(rest);\n\t\tif (block == null) break;\n\n\t\tresult += substitutePlaceholders(rest.slice(0, block.start), values);\n\t\tresult += resolve(selectBranch(block, values, rest.slice(block.start, block.end)), values);\n\t\trest = rest.slice(block.end);\n\t}\n\n\tresult += substitutePlaceholders(rest, values);\n\treturn result;\n}\n\n/**\n * Renders a localized template that may contain one or more ICU-style plural blocks (see the module\n * comment for the grammar). Every block is resolved for the current UI locale, including any nested\n * inside a chosen branch; plain `{placeholder}` text outside of and inside blocks is then substituted —\n * positional args map to `{0}`, `{1}`, …, an object's properties map by name, and an unknown placeholder\n * is left as-is. A numeric value is formatted with the date-locale number formatter, matching what count\n * messages have always formatted their counts with; anything else is stringified.\n */\nexport function formatPlural(template: string, args: Record<string, unknown> | readonly unknown[] = []): string {\n\treturn resolve(template, normalizeArgs(args));\n}\n"],"mappings":";;AAoBA,IAAI;;AAGJ,SAAgB,gBAAgB,QAAkC;CACjE,cAAc,SAAS,IAAI,KAA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SAAS,cAAc,MAA6E;CACnG,IAAI,MAAM,QAAQ,IAAI,GAAG,OAAO,OAAO,YAAY,KAAK,KAAK,OAAO,UAAU,CAAC,OAAO,KAAK,GAAG,KAAK,CAAC,CAAC;CAErG,OAAO;AACR;AAEA,SAAS,QAAQ,UAAkB,QAAyC;CAC3E,IAAI,SAAS;CACb,IAAI,OAAO;CAEX,SAAS;EACR,MAAM,QAAQ,gBAAgB,IAAI;EAClC,IAAI,SAAS,MAAM;EAEnB,UAAU,uBAAuB,KAAK,MAAM,GAAG,MAAM,KAAK,GAAG,MAAM;EACnE,UAAU,QAAQ,aAAa,OAAO,QAAQ,KAAK,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC,GAAG,MAAM;EACzF,OAAO,KAAK,MAAM,MAAM,GAAG;CAC5B;CAEA,UAAU,uBAAuB,MAAM,MAAM;CAC7C,OAAO;AACR;;;;;;;;;AAUA,SAAgB,aAAa,UAAkB,OAAqD,CAAC,GAAW;CAC/G,OAAO,QAAQ,UAAU,cAAc,IAAI,CAAC;AAC7C"}
1
+ {"version":3,"file":"plural.js","names":[],"sources":["../../../utils/src/plural.ts"],"sourcesContent":["import { getNumericFormat } from './date.js';\n\n/*\n * Plural forms for localized count messages.\n *\n * `formatPlural` resolves a translated template that may contain one or more ICU-style plural blocks:\n *\n * {selector, plural, branch{...} branch{...} ...}\n *\n * `selector` names an argument (a positional index such as `0`, or a property name such as `count`).\n * Each `branch` is one of the six CLDR plural categories (`zero`, `one`, `two`, `few`, `many`, `other`)\n * or an exact match `=N`. An `other` branch is required. Blocks may appear anywhere in the template, more\n * than once, and a branch body may itself contain another block (nested arbitrarily) as well as plain\n * `{placeholder}` references, including to its own block's selector. This module must not import\n * `vscode` or `@vscode/l10n` — it stays pure so the same helper works in the extension host, webviews and\n * packages. This grammar is re-implemented (not imported) by `scripts/localization.mjs`'s\n * `parsePluralBlocks`, since that validator is a plain `.mjs` script and cannot import this module — keep\n * the two in sync if the grammar changes.\n */\n\nlet pluralLocale: string | undefined;\nlet pluralRules: Intl.PluralRules | undefined;\n\n/** Sets the UI locale used to categorize counts. `undefined` resets to the default (see {@link getPluralCategory}). */\nexport function setPluralLocale(locale: string | undefined): void {\n\tpluralLocale = locale || undefined;\n\tpluralRules = pluralLocale != null ? new Intl.PluralRules(pluralLocale) : undefined;\n}\n\nexport function getPluralLocale(): string | undefined {\n\treturn pluralLocale;\n}\n\n/**\n * Returns the CLDR plural category for `count` in the current UI locale. Until {@link setPluralLocale} is\n * called, the document language is used when there is a document (a host that only configures\n * `@vscode/l10n`, such as an external consumer of the graph packages, still gets its language's rules),\n * else English.\n */\nexport function getPluralCategory(count: number): Intl.LDMLPluralRule {\n\tpluralRules ??= new Intl.PluralRules(\n\t\t(typeof document !== 'undefined' ? document.documentElement.lang : undefined) || 'en',\n\t);\n\treturn pluralRules.select(count);\n}\n\ninterface PluralBlock {\n\t/** Index of the block's opening `{` in the text it was found in. */\n\treadonly start: number;\n\t/** Index just past the block's closing `}` in the text it was found in. */\n\treadonly end: number;\n\treadonly selector: string;\n\treadonly branches: ReadonlyMap<string, string>;\n\treadonly otherBranch: string;\n}\n\nclass MalformedPluralBlockError extends Error {}\n\nconst pluralBlockStart = /\\{\\s*([^{}\\s,][^{},]*?)\\s*,\\s*plural\\s*,/;\n\n/**\n * Finds the first top-level ICU-style plural block anywhere in `text`.\n *\n * Returns `undefined` when no `{selector, plural, ...}` prefix is present at all — plain text with no\n * block. Throws `MalformedPluralBlockError` when that prefix is present but the block cannot be parsed\n * (unbalanced braces, or no `other` branch); callers must catch this. Does not look inside a branch body\n * for a nested block — callers that need nested blocks resolved recurse on the branch body themselves.\n */\nfunction findPluralBlock(text: string): PluralBlock | undefined {\n\tconst match = pluralBlockStart.exec(text);\n\tif (match == null) return undefined;\n\n\tconst selector = match[1];\n\tconst branches = new Map<string, string>();\n\tlet index = match.index + match[0].length;\n\n\tfor (;;) {\n\t\twhile (index < text.length && /\\s/.test(text[index])) {\n\t\t\tindex++;\n\t\t}\n\n\t\tif (text[index] === '}') {\n\t\t\tconst otherBranch = branches.get('other');\n\t\t\tif (otherBranch == null) throw new MalformedPluralBlockError(`plural block without an \"other\" branch`);\n\n\t\t\treturn {\n\t\t\t\tstart: match.index,\n\t\t\t\tend: index + 1,\n\t\t\t\tselector: selector,\n\t\t\t\tbranches: branches,\n\t\t\t\totherBranch: otherBranch,\n\t\t\t};\n\t\t}\n\n\t\tconst braceIndex = text.indexOf('{', index);\n\t\tif (braceIndex === -1) throw new MalformedPluralBlockError('unterminated plural block');\n\n\t\tconst name = text.slice(index, braceIndex).trim();\n\t\tif (!name) throw new MalformedPluralBlockError('unterminated plural block');\n\n\t\tlet depth = 1;\n\t\tlet i = braceIndex + 1;\n\t\twhile (i < text.length && depth > 0) {\n\t\t\tif (text[i] === '{') {\n\t\t\t\tdepth++;\n\t\t\t} else if (text[i] === '}') {\n\t\t\t\tdepth--;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\tif (depth !== 0) throw new MalformedPluralBlockError('unbalanced braces in plural block');\n\n\t\tbranches.set(name, text.slice(braceIndex + 1, i - 1));\n\t\tindex = i;\n\t}\n}\n\nconst warned = new Set<string>();\n\nfunction warnOnce(key: string, message: string): void {\n\tif (warned.has(key)) return;\n\n\twarned.add(key);\n\tconsole.warn(message);\n}\n\n// Templates are catalog literals, so the distinct texts parsed over a session are few and are parsed\n// again on every render (graph rows, tooltips, tree nodes); a malformed text is warned about only once\n// because it is only ever parsed once.\nconst parsedBlocks = new Map<string, PluralBlock | undefined>();\n\nfunction findBlockOrWarn(text: string): PluralBlock | undefined {\n\tif (parsedBlocks.has(text)) return parsedBlocks.get(text);\n\n\tlet block: PluralBlock | undefined;\n\ttry {\n\t\tblock = findPluralBlock(text);\n\t} catch (ex) {\n\t\tif (!(ex instanceof MalformedPluralBlockError)) throw ex;\n\n\t\tconsole.warn(`formatPlural: malformed plural block in \"${text}\"; leaving it untouched`);\n\t}\n\n\tparsedBlocks.set(text, block);\n\treturn block;\n}\n\n/** Picks a branch for `block`: an exact `=N` match wins, then the CLDR category, then `other`. A\n * non-number (or missing) selector value is a caller mistake — it always resolves to `other`, warned\n * once per distinct block. */\nfunction selectBranch(block: PluralBlock, values: Record<string, unknown>, raw: string): string {\n\tconst value = values[block.selector];\n\tif (typeof value === 'number') {\n\t\treturn block.branches.get(`=${value}`) ?? block.branches.get(getPluralCategory(value)) ?? block.otherBranch;\n\t}\n\n\twarnOnce(raw, `formatPlural: selector \"${block.selector}\" is not a number; using the \"other\" branch`);\n\treturn block.otherBranch;\n}\n\nfunction toDisplayString(value: unknown): string {\n\tif (typeof value === 'number') return getNumericFormat()(value);\n\tif (typeof value === 'string') return value;\n\tif (typeof value === 'boolean' || typeof value === 'bigint') return String(value);\n\n\t// Not a value formatPlural() is documented to take (a count or a name) — render something rather\n\t// than crash on an object without a meaningful `toString()`.\n\treturn JSON.stringify(value) ?? '';\n}\n\nconst placeholderRegex = /\\{([^}]+)\\}/g;\n\nfunction substitutePlaceholders(text: string, values: Record<string, unknown>): string {\n\tif (!text) return text;\n\n\treturn text.replace(placeholderRegex, (match: string, key: string) => {\n\t\tconst value = values[key];\n\t\treturn value == null ? match : toDisplayString(value);\n\t});\n}\n\nfunction normalizeArgs(args: Record<string, unknown> | readonly unknown[]): Record<string, unknown> {\n\tif (Array.isArray(args)) return Object.fromEntries(args.map((value, index) => [String(index), value]));\n\n\treturn args as Record<string, unknown>;\n}\n\nfunction resolve(template: string, values: Record<string, unknown>): string {\n\tlet result = '';\n\tlet rest = template;\n\n\tfor (;;) {\n\t\tconst block = findBlockOrWarn(rest);\n\t\tif (block == null) break;\n\n\t\tresult += substitutePlaceholders(rest.slice(0, block.start), values);\n\t\tresult += resolve(selectBranch(block, values, rest.slice(block.start, block.end)), values);\n\t\trest = rest.slice(block.end);\n\t}\n\n\tresult += substitutePlaceholders(rest, values);\n\treturn result;\n}\n\n/**\n * Renders a localized template that may contain one or more ICU-style plural blocks (see the module\n * comment for the grammar). Every block is resolved for the current UI locale, including any nested\n * inside a chosen branch; plain `{placeholder}` text outside of and inside blocks is then substituted —\n * positional args map to `{0}`, `{1}`, …, an object's properties map by name, and an unknown placeholder\n * is left as-is. A numeric value is formatted with the date-locale number formatter, matching what count\n * messages have always formatted their counts with; anything else is stringified.\n */\nexport function formatPlural(template: string, args: Record<string, unknown> | readonly unknown[] = []): string {\n\treturn resolve(template, normalizeArgs(args));\n}\n"],"mappings":";;AAoBA,IAAI;AACJ,IAAI;;AAGJ,SAAgB,gBAAgB,QAAkC;CACjE,eAAe,UAAU,KAAA;CACzB,cAAc,gBAAgB,OAAO,IAAI,KAAK,YAAY,YAAY,IAAI,KAAA;AAC3E;AAEA,SAAgB,kBAAsC;CACrD,OAAO;AACR;;;;;;;AAQA,SAAgB,kBAAkB,OAAoC;CACrE,gBAAgB,IAAI,KAAK,aACvB,OAAO,aAAa,cAAc,SAAS,gBAAgB,OAAO,KAAA,MAAc,IAClF;CACA,OAAO,YAAY,OAAO,KAAK;AAChC;AAYA,IAAM,4BAAN,cAAwC,MAAM,CAAC;AAE/C,MAAM,mBAAmB;;;;;;;;;AAUzB,SAAS,gBAAgB,MAAuC;CAC/D,MAAM,QAAQ,iBAAiB,KAAK,IAAI;CACxC,IAAI,SAAS,MAAM,OAAO,KAAA;CAE1B,MAAM,WAAW,MAAM;CACvB,MAAM,2BAAW,IAAI,IAAoB;CACzC,IAAI,QAAQ,MAAM,QAAQ,MAAM,EAAE,CAAC;CAEnC,SAAS;EACR,OAAO,QAAQ,KAAK,UAAU,KAAK,KAAK,KAAK,MAAM,GAClD;EAGD,IAAI,KAAK,WAAW,KAAK;GACxB,MAAM,cAAc,SAAS,IAAI,OAAO;GACxC,IAAI,eAAe,MAAM,MAAM,IAAI,0BAA0B,wCAAwC;GAErG,OAAO;IACN,OAAO,MAAM;IACb,KAAK,QAAQ;IACH;IACA;IACG;GACd;EACD;EAEA,MAAM,aAAa,KAAK,QAAQ,KAAK,KAAK;EAC1C,IAAI,eAAe,IAAI,M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AAO,UAAU,UAAU,OAAO,iBAAiB,CAAC,CAAC,KAAK;CAC9D,IAAI,OAAO,UAAU,UAAU,OAAO;CACtC,IAAI,OAAO,UAAU,aAAa,OAAO,UAAU,UAAU,OAAO,OAAO,KAAK;CAIhF,OAAO,KAAK,UAAU,KAAK,KAAK;AACjC;AAEA,MAAM,mBAAmB;AAEzB,SAAS,uBAAuB,MAAc,QAAyC;CACtF,IAAI,CAAC,MAAM,OAAO;CAElB,OAAO,KAAK,QAAQ,mBAAmB,OAAe,QAAgB;EACrE,MAAM,QAAQ,OAAO;EACrB,OAAO,SAAS,OAAO,QAAQ,gBAAgB,KAAK;CACrD,CAAC;AACF;AAEA,SAAS,cAAc,MAA6E;CACnG,IAAI,MAAM,QAAQ,IAAI,GAAG,OAAO,OAAO,YAAY,KAAK,KAAK,OAAO,UAAU,CAAC,OAAO,KAAK,GAAG,KAAK,CAAC,CAAC;CAErG,OAAO;AACR;AAEA,SAAS,QAAQ,UAAkB,QAAyC;CAC3E,IAAI,SAAS;CACb,IAAI,OAAO;CAEX,SAAS;EACR,MAAM,QAAQ,gBAAgB,IAAI;EAClC,IAAI,SAAS,MAAM;EAEnB,UAAU,uBAAuB,KAAK,MAAM,GAAG,MAAM,KAAK,GAAG,MAAM;EACnE,UAAU,QAAQ,aAAa,OAAO,QAAQ,KAAK,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC,GAAG,MAAM;EACzF,OAAO,KAAK,MAAM,MAAM,GAAG;CAC5B;CAEA,UAAU,uBAAuB,MAAM,MAAM;CAC7C,OAAO;AACR;;;;;;;;;AAUA,SAAgB,aAAa,UAAkB,OAAqD,CAAC,GAAW;CAC/G,OAAO,QAAQ,UAAU,cAAc,IAAI,CAAC;AAC7C"}
@@ -0,0 +1,8 @@
1
+ //#region ../utils/src/wheel.d.ts
2
+ /** CSS pixels per wheel "line" (`DOM_DELTA_LINE`) — the browser's default line-scroll step. */
3
+ export declare const wheelLineHeightPx = 16;
4
+ /** Normalizes a `WheelEvent` delta to CSS pixels. `pageExtentPx` is the viewport extent along the
5
+ * scrolled axis, used only for the (rare) `DOM_DELTA_PAGE` mode. */
6
+ export declare function normalizeWheelDelta(deltaMode: number, delta: number, pageExtentPx: number): number;
7
+ //#endregion
8
+ //# sourceMappingURL=wheel.d.ts.map
@@ -0,0 +1,12 @@
1
+ //#region ../utils/src/wheel.ts
2
+ /** CSS pixels per wheel "line" (`DOM_DELTA_LINE`) — the browser's default line-scroll step. */
3
+ const wheelLineHeightPx = 16;
4
+ /** Normalizes a `WheelEvent` delta to CSS pixels. `pageExtentPx` is the viewport extent along the
5
+ * scrolled axis, used only for the (rare) `DOM_DELTA_PAGE` mode. */
6
+ function normalizeWheelDelta(deltaMode, delta, pageExtentPx) {
7
+ return deltaMode === WheelEvent.DOM_DELTA_LINE ? delta * 16 : deltaMode === WheelEvent.DOM_DELTA_PAGE ? delta * pageExtentPx : delta;
8
+ }
9
+ //#endregion
10
+ export { normalizeWheelDelta, wheelLineHeightPx };
11
+
12
+ //# sourceMappingURL=wheel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wheel.js","names":[],"sources":["../../../utils/src/wheel.ts"],"sourcesContent":["// Browsers report wheel deltas in three units (pixels / lines / pages); these convert the non-pixel\n// modes to pixels so callers can apply the delta without caring about the wheel source.\n\n/** CSS pixels per wheel \"line\" (`DOM_DELTA_LINE`) — the browser's default line-scroll step. */\nexport const wheelLineHeightPx = 16;\n\n/** Normalizes a `WheelEvent` delta to CSS pixels. `pageExtentPx` is the viewport extent along the\n * scrolled axis, used only for the (rare) `DOM_DELTA_PAGE` mode. */\nexport function normalizeWheelDelta(deltaMode: number, delta: number, pageExtentPx: number): number {\n\treturn deltaMode === WheelEvent.DOM_DELTA_LINE\n\t\t? delta * wheelLineHeightPx\n\t\t: deltaMode === WheelEvent.DOM_DELTA_PAGE\n\t\t\t? delta * pageExtentPx\n\t\t\t: delta;\n}\n"],"mappings":";;AAIA,MAAa,oBAAoB;;;AAIjC,SAAgB,oBAAoB,WAAmB,OAAe,cAA8B;CACnG,OAAO,cAAc,WAAW,iBAC7B,QAAA,KACA,cAAc,WAAW,iBACxB,QAAQ,eACR;AACL"}
@@ -114,16 +114,24 @@ cache controls (`connectionId`, `etag`, expiry). The optional methods are:
114
114
  - `getRepositoryMetadata`, `getRepositoryDefaultBranch`: repository lookups.
115
115
  - `getPullRequestForSha`, `getPullRequestForBranch`, `getPullRequest`: pull-request lookups by commit, branch, or id.
116
116
  - `getIssue`, `getIssueOrPullRequest`: issue lookups by id.
117
- - `deletePullRequests()`: evicts every cached pull request (a merge can change pull requests no caller can name).
117
+ - `deletePullRequests(scope?)` evicts cached pull requests for the provided `{ id, domain }` installation origin.
118
+ Without a scope, evict all pull requests because a merge can change pull requests no caller can name.
118
119
 
119
120
  A method you omit means no caching for that read: its loader runs on every call (and `deletePullRequests` is a
120
121
  no-op). Call a method as `cache.method(...)`; the manager never detaches it, so a class instance works.
121
122
 
122
- The descriptor is `{ id, domain, maybeConnected, sessionFingerprint }`, not the integration class. Its getters read
123
- through to the live integration each time they are read, so the values are live, not snapshots. Key entries by `id`
124
- and `domain`, and treat `maybeConnected` and `sessionFingerprint` as the entry's etag: when either changes (a
125
- reconnect, a token change) the entry must miss. The descriptor is `undefined` for lookups with no integration.
126
- The fixture uses the package's public `PromiseCache` utility, but any cache with the same behavior is valid.
123
+ The cache descriptor exposes `id`, `domain`, `maybeConnected`, and `sessionFingerprint` without exposing the
124
+ integration instance. Key entries by provider and domain, and treat the connection state and fingerprint as the
125
+ entry's etag. Enterprise pull request descriptors also carry `installationOrigin` and the fingerprint captured for
126
+ the request. Use that origin as the cache namespace so installations that share a hostname stay independent.
127
+ For other reads, the state and fingerprint getters reflect the live integration. A lookup without an integration
128
+ receives an undefined descriptor. The fixture uses the package's public `PromiseCache` utility, but any cache with
129
+ the same behavior is valid.
130
+
131
+ For a cached-only Enterprise pull request lookup, `GitHostIntegration.getCachedPullRequestScope?(remoteUrl)` accepts
132
+ the fetch remote URL. HTTP(S) remotes must match the selected session's scheme, host, and port. SSH and scp
133
+ remotes must match its hostname, and the scope uses the session's actual API origin. The optional method returns
134
+ `undefined` without a matching established session and makes no authentication or network requests.
127
135
 
128
136
  ### Authentication
129
137
 
@@ -931,7 +939,51 @@ An `ok: false` result contains a typed reason. GitHub can report inaccessible pr
931
939
  before the response was lost. For an Enterprise failure with `mutationDispatched: false`, Core stopped
932
940
  before sending a mutation.
933
941
 
934
- ### GitHub.com pull request writes
942
+ ### Jira Cloud issue writes
943
+
944
+ Use the tracker methods on `IntegrationManager` from `@gitkraken/core-gitlens/plus/integrations/index.js`.
945
+ Each call takes `providerId: IssuesCloudHostIntegrationId.Jira`, the selected `connectionId` and that
946
+ connection's `resourceId` (the Atlassian cloud ID). The manager looks up the site's URL with the same
947
+ credential used for reads. If you supply `expectedAccountId`, the account returned by Jira's `/myself`
948
+ must match. Use the returned `accountId` for subsequent calls. Issue and project keys can repeat across
949
+ sites, so retain the cloud ID alongside the canonical issue ID.
950
+
951
+ | Method | Additional input | Success |
952
+ | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |
953
+ | `getIssueTrackerCreateOptions` | `project` (key or ID), optional `issueTypeId` | Canonical project, its `issueTypes` or the selected type's `fields`, and `truncated`. |
954
+ | `getIssueTrackerIssueWriteOptions` | `issue` (key or ID), optional `expectedIssueId` | Issue receipt, `accountId`, editable `fields`, `transitions`, permission flags and `deleteCapability`. |
955
+ | `writeIssueTrackerIssue` | `action: 'create'`, `project`, `issueTypeId`, `summary`, optional `description` and `fields` | Created issue receipt and `accountId`. |
956
+ | `writeIssueTrackerIssue` | `action: 'edit'`, `issue`, `expectedIssueId`, at least one change in `summary`, `description` or `fields` | Updated issue receipt and `accountId`. |
957
+ | `writeIssueTrackerIssue` | `action: 'transition'`, `issue`, `expectedIssueId`, `transitionId`, optional `summary`, `description` and `fields` | Updated issue receipt and `accountId`. |
958
+ | `resolveIssueTrackerIssueWriteTarget` | `issue`, optional `expectedIssueId` and `intent: 'delete'` | Canonical issue receipt and `accountId` for a confirmation UI. Delete intent also checks the credential, permission and subtasks. |
959
+ | `deleteIssueTrackerIssue` | `issue`, `expectedIssueId`, `expectedAccountId` | Pre-delete issue receipt and `accountId` after Jira acknowledges the delete. |
960
+
961
+ Use the metadata for the exact project, issue type or transition you selected. Each field carries its
962
+ ID, operations, required and default flags, and any schema or allowed values Jira sends. Create
963
+ metadata is read in at most 20 requests of up to 50 entries each. Check `truncated` before treating the
964
+ returned list as complete. Pass Jira REST field values as a map keyed by field ID. Use the top-level
965
+ inputs for `summary`, `description`, `project` and `issueTypeId`. A transition takes `summary` and `description` only when
966
+ its screen sets them. Jira REST v2 accepts Jira wiki markup
967
+ strings for rich-text fields. The caller is responsible for converting other formats.
968
+
969
+ For an existing issue, retain the returned key and canonical ID together. Edit, transition and delete
970
+ resolve the address again and send the mutation by canonical ID. A key Jira resolves to a moved issue
971
+ or an ID that differs from the observed ID returns `conflict`. Each receipt contains the site, canonical ID
972
+ and key, browser URL, project ID and key, issue type, summary, and workflow status ID, name and category.
973
+
974
+ Before presenting a delete confirmation, resolve with `intent: 'delete'`. Delete checks the same
975
+ site, account and issue on execution. Issues with subtasks are refused. The site grant must include
976
+ the `delete:issue:jira` granular scope or the `write:jira-work` classic scope, and the user also needs
977
+ Jira's Delete Issues permission. The GitKraken Jira grant currently needs an updated scope and
978
+ reconnection before delete is available.
979
+
980
+ Failures have `ok: false` and a typed `reason`. An `invalid-input` result may include `fieldErrors`
981
+ and `messages` from Jira. A scope mismatch returns `insufficient-scope` without expiring the read
982
+ credential. `mutationDispatched: false` means Core stopped before sending the write. Treat
983
+ `applied: 'maybe'` as uncertain and reconcile the issue state before retrying. A successful delete
984
+ requires Jira's `204` acknowledgement. Jira can also return `404` when visibility changes. [Jira Cloud REST v2 issue operations](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/)
985
+
986
+ ### GitHub and GitHub Enterprise Server pull request writes
935
987
 
936
988
  Use `providerId: 'github'` and the `connectionId` that read the repository or pull request. Pass the
937
989
  repository’s `owner` and `repo`, plus the `number` and `expectedNodeId` for an existing pull request.
@@ -944,6 +996,14 @@ repository at the same address. For an active repository, `canCreate` is `true`
944
996
  a repository role for the viewer, and `undefined` when the role is unavailable. GitHub determines
945
997
  whether the viewer may create a pull request between the chosen branches when it receives the write.
946
998
 
999
+ For GitHub Enterprise Server, pass `providerId: 'cloud-github-enterprise'`, the connection ID,
1000
+ the full HTTP(S) installation origin as `domain`, and the expected GitHub login as `expectedLogin`
1001
+ to all three methods. The origin includes the scheme and any non-default port. The PR write API
1002
+ accepts installations served from the origin root. A path in the requested domain returns `invalid-input`.
1003
+ Core accepts `/api` and `/api/v3` as aliases for the root installation on the configured connection
1004
+ and selected credential. Any other path on either returns `no-connection` before a provider request.
1005
+ Core verifies the credential's live login and requires `expectedRepositoryId` on create.
1006
+
947
1007
  | Action for `writePullRequest` | Required input and result |
948
1008
  | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
949
1009
  | `create` | `headRef` and `baseRef` are branch names in the selected repository. Pass a `title` and optional `body`. Returns `created`. |
@@ -959,14 +1019,26 @@ write. The write preflight checks the observed base branch. GitHub checks the ex
959
1019
  for direct merge and enqueue.
960
1020
  Stacked merge actions can land more than one pull request and are unavailable through this API.
961
1021
 
1022
+ On GitHub Enterprise Server, Core checks the installed mutation schema, active branch rules and
1023
+ legacy linear-history policy before offering a merge strategy. It offers enqueue when the branch
1024
+ requires a queue and the installation supports the expected-head check. If Core cannot establish the
1025
+ merge policy, edit and state capabilities still reflect the viewer's pull request permissions.
1026
+ Core checks the base branch again before dispatching a merge or enqueue and verifies that the
1027
+ receipt matches the approved base. GitHub exposes the atomic check for the head only.
1028
+
962
1029
  Every confirmed result carries a canonical snapshot with GitHub’s update time and close or merge
963
- time when available. An enqueue receipt carries the snapshot verified at dispatch and the `queued`
1030
+ time when available. A GitHub.com enqueue receipt carries the snapshot verified at dispatch and the `queued`
964
1031
  status. Consumers should refresh the item and related views for its latest
965
1032
  queue position or merge state. `outcome-unknown` means the write may have reached GitHub. Reconcile it
966
1033
  through a fresh read before retrying. `blocked` means the action was refused by the pull request state or
967
1034
  branch policy. Inaccessible private resources can appear as `not-found`. After GitHub rejects a credential
968
1035
  with HTTP 401, the next operation on that connection can recover it. Core never replays the write.
969
1036
 
1037
+ Enterprise snapshots include the canonical origin in `domain`. An Enterprise enqueue returns the
1038
+ pull request attached to the queue entry. If the selected credential changes while GitHub processes
1039
+ a write, a confirmed result still carries its status and adds `credentialChanged: true`. Use that
1040
+ status to refresh by origin and read the snapshot under the current credential.
1041
+
970
1042
  ## 5. Paging
971
1043
 
972
1044
  Two mechanisms live behind one shape, and they are **not** interchangeable:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gitkraken/core-gitlens",
3
3
  "description": "GitLens core — shared Git / AI / GitHub primitives for internal GitKraken consumption",
4
- "version": "0.46.0",
4
+ "version": "0.48.0",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": {
7
7
  "name": "GitKraken",