@gitkraken/core-gitlens 0.10.3 → 0.10.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.
Files changed (31) hide show
  1. package/CHANGELOG.md +8 -1
  2. package/dist/git/models/pullRequest.d.ts +37 -0
  3. package/dist/git/models/pullRequest.js.map +1 -1
  4. package/dist/git-cli/providers/graph.js +14 -8
  5. package/dist/git-cli/providers/graph.js.map +1 -1
  6. package/dist/plus/git-github/api/github.d.ts +3 -1
  7. package/dist/plus/git-github/api/github.js +1 -1
  8. package/dist/plus/git-github/api/github.js.map +1 -1
  9. package/dist/plus/integrations/integrationService.js +2 -2
  10. package/dist/plus/integrations/integrationService.js.map +1 -1
  11. package/dist/plus/integrations/models/gitHostIntegration.d.ts +5 -1
  12. package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -1
  13. package/dist/plus/integrations/models/integration.d.ts +1 -0
  14. package/dist/plus/integrations/models/integration.js +5 -2
  15. package/dist/plus/integrations/models/integration.js.map +1 -1
  16. package/dist/plus/integrations/providers/bitbucket.js +2 -1
  17. package/dist/plus/integrations/providers/bitbucket.js.map +1 -1
  18. package/dist/plus/integrations/providers/github.d.ts +12 -1
  19. package/dist/plus/integrations/providers/github.js +42 -2
  20. package/dist/plus/integrations/providers/github.js.map +1 -1
  21. package/dist/plus/integrations/providers/gitlab.d.ts +1 -1
  22. package/dist/plus/integrations/providers/gitlab.js +3 -2
  23. package/dist/plus/integrations/providers/gitlab.js.map +1 -1
  24. package/dist/plus/integrations/providers/issueSorts.d.ts +1 -0
  25. package/dist/plus/integrations/providers/models.js +1 -0
  26. package/dist/plus/integrations/providers/models.js.map +1 -1
  27. package/dist/plus/integrations/reads/drains.d.ts +1 -0
  28. package/dist/utils/cancellation.d.ts +2 -3
  29. package/dist/utils/cancellation.js +2 -3
  30. package/dist/utils/cancellation.js.map +1 -1
  31. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"cancellation.js","names":[],"sources":["../../../utils/src/cancellation.ts"],"sourcesContent":["import { getScopedCounter } from './counter.js';\n\nconst cancellationErrorBrand = Symbol.for('CancellationError');\n\n/** Why an operation was cancelled: a caller abort, a timeout, or a termination whose cause is unknown. */\nexport type CancellationReason = 'aborted' | 'timeout' | 'unknown';\n\n/**\n * A standalone CancellationError for use in the library.\n * Uses a symbol brand so that both this class and the extension's\n * CancellationError (which extends vscode.CancellationError) are\n * recognized by `isCancellationError`.\n */\nexport class CancellationError extends Error {\n\t// TS-only nominal brand (not read anywhere) — without it, `CancellationError` has the same\n\t// structural shape as any other `Error` subtype, so `isCancellationError`'s negative narrowing\n\t// (`if (isCancellationError(ex)) throw ex;`) collapses an unrelated error union to `never` instead\n\t// of leaving it narrowed. The runtime brand stays a symbol (below) for the cross-realm check.\n\tprivate readonly _cancellationErrorBrand: true = true;\n\n\tconstructor(\n\t\tpublic readonly original?: Error,\n\t\tpublic readonly reason?: CancellationReason,\n\t) {\n\t\tsuper();\n\t\t// A symbol-keyed computed class field can't be typed for `isolatedDeclarations` (only well-known\n\t\t// symbols like `Symbol.iterator` qualify), so the brand is set here with the same runtime shape\n\t\t// (writable/enumerable/configurable) a plain field assignment would produce.\n\t\tObject.defineProperty(this, cancellationErrorBrand, {\n\t\t\tvalue: true,\n\t\t\twritable: true,\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t});\n\t\tthis.name = 'CancellationError';\n\n\t\tif (this.original) {\n\t\t\tif (this.original.message.startsWith('Operation cancelled')) {\n\t\t\t\tthis.message = this.original.message;\n\t\t\t} else {\n\t\t\t\tthis.message = `Operation cancelled; ${this.original.message}`;\n\t\t\t}\n\t\t} else {\n\t\t\tthis.message = 'Operation cancelled';\n\t\t}\n\t\tError.captureStackTrace?.(this, new.target);\n\t}\n}\n\nexport function isCancellationError(ex: unknown): ex is CancellationError {\n\treturn (\n\t\t(ex instanceof Error && (cancellationErrorBrand in ex || ex.name === 'CancellationError')) ||\n\t\t(ex instanceof DOMException && ex.name === 'AbortError')\n\t);\n}\n\n/**\n * Races a promise against an `AbortSignal`. If the signal fires before\n * the promise settles, the returned promise rejects with `CancellationError`.\n * If the promise settles first, the signal listener is cleaned up.\n */\nexport function raceWithSignal<T>(promise: Promise<T>, signal: AbortSignal): Promise<T> {\n\tif (signal.aborted) return Promise.reject(new CancellationError());\n\n\treturn new Promise<T>((resolve, reject) => {\n\t\tconst onAbort = () => reject(new CancellationError());\n\t\tsignal.addEventListener('abort', onAbort, { once: true });\n\t\tpromise.then(\n\t\t\tv => {\n\t\t\t\tsignal.removeEventListener('abort', onAbort);\n\t\t\t\tresolve(v);\n\t\t\t},\n\t\t\t(e: unknown) => {\n\t\t\t\tsignal.removeEventListener('abort', onAbort);\n\t\t\t\treject(e instanceof Error ? e : new Error(String(e)));\n\t\t\t},\n\t\t);\n\t});\n}\n\n/**\n * Races a promise against a timeout. If `ms` elapses before the promise settles, the returned promise\n * rejects with `CancellationError`. If the promise settles first, the timer is cleared. Parallels\n * `raceWithSignal`, with a timer standing in for the signal.\n *\n * When `abortOnTimeout` is provided, it is aborted on timeout — so a caller can link the underlying operation to\n * it (e.g. via `AbortSignal.any`) and have it torn down instead of orphaned. Abort is best-effort (a truly-stuck\n * op may ignore it); the returned promise rejects on timeout regardless of whether the underlying op settles.\n */\nexport function raceWithTimeout<T>(promise: Promise<T>, ms: number, abortOnTimeout?: AbortController): Promise<T> {\n\treturn new Promise<T>((resolve, reject) => {\n\t\tconst timer = setTimeout(() => {\n\t\t\tconst error = new CancellationError(new Error(`Timed out after ${ms}ms`), 'timeout');\n\t\t\tabortOnTimeout?.abort(error);\n\t\t\treject(error);\n\t\t}, ms);\n\t\t// Don't let the timeout timer keep a (Node) process alive on its own — a still-pending promise shouldn't\n\t\t// hold the event loop open just for its backstop (no-op in the browser, where setTimeout returns a number).\n\t\tif (typeof timer !== 'number') {\n\t\t\ttimer.unref();\n\t\t}\n\t\tpromise.then(\n\t\t\tv => {\n\t\t\t\tclearTimeout(timer);\n\t\t\t\tresolve(v);\n\t\t\t},\n\t\t\t(e: unknown) => {\n\t\t\t\tclearTimeout(timer);\n\t\t\t\treject(e instanceof Error ? e : new Error(String(e)));\n\t\t\t},\n\t\t);\n\t});\n}\n\n/**\n * Aggregates multiple caller `AbortSignal`s into a single signal that\n * only fires when **all** callers have cancelled (the inverse of `AbortSignal.any()`).\n *\n * Designed for shared-promise caching: each caller registers their signal,\n * and the underlying operation receives the aggregate signal. Individual callers\n * can cancel early (via `raceWithSignal`), but the operation continues as long\n * as at least one caller is still active.\n */\nexport class AbortAggregate {\n\tprivate readonly controller = new AbortController();\n\tprivate activeCount = 0;\n\t/** One listener-remover per registration (NOT keyed by signal), so adding the same signal twice is safe. */\n\tprivate readonly cleanups = new Set<() => void>();\n\n\t/** The aggregate signal — only fires when all callers have cancelled. */\n\tget signal(): AbortSignal {\n\t\treturn this.controller.signal;\n\t}\n\n\t/**\n\t * Register a caller.\n\t * - If `cancellation` is provided, the caller is auto-removed when it fires.\n\t * - If `cancellation` is `undefined`, the caller is \"permanent\" — the aggregate\n\t * can never fire while it's active. Call the returned cleanup on promise settle.\n\t * - The same signal instance may safely be added more than once — each registration is tracked and cleaned up\n\t * independently, so no listener leaks.\n\t * @returns A cleanup function to unregister the caller.\n\t */\n\tadd(cancellation?: AbortSignal): () => void {\n\t\tthis.activeCount++;\n\n\t\tif (cancellation == null) {\n\t\t\treturn () => {\n\t\t\t\tthis.activeCount--;\n\t\t\t\tthis.checkAbort();\n\t\t\t};\n\t\t}\n\n\t\tif (cancellation.aborted) {\n\t\t\tthis.activeCount--;\n\t\t\tthis.checkAbort();\n\t\t\treturn () => {};\n\t\t}\n\n\t\t// Track this registration's listener removal individually (a Set of removers, NOT keyed by the signal) so\n\t\t// adding the same signal twice can't overwrite the other's cleanup. `settled` keeps both exit paths (abort\n\t\t// vs. manual cleanup) idempotent and preserves the accounting: only `onAbort` decrements `activeCount`.\n\t\tlet settled = false;\n\t\tlet remove: () => void;\n\t\tconst onAbort = () => {\n\t\t\tif (settled) return;\n\n\t\t\tsettled = true;\n\t\t\tthis.cleanups.delete(remove);\n\t\t\tthis.activeCount--;\n\t\t\tthis.checkAbort();\n\t\t};\n\t\tremove = () => cancellation.removeEventListener('abort', onAbort);\n\t\tcancellation.addEventListener('abort', onAbort, { once: true });\n\t\tthis.cleanups.add(remove);\n\n\t\treturn () => {\n\t\t\tif (settled) return;\n\n\t\t\tsettled = true;\n\t\t\tthis.cleanups.delete(remove);\n\t\t\tremove();\n\t\t};\n\t}\n\n\tprivate checkAbort(): void {\n\t\tif (this.activeCount <= 0 && !this.controller.signal.aborted) {\n\t\t\tthis.controller.abort();\n\t\t}\n\t}\n\n\t/** Remove all abort listeners. Call when the cached promise settles. */\n\tdispose(): void {\n\t\tfor (const remove of this.cleanups) {\n\t\t\tremove();\n\t\t}\n\t\tthis.cleanups.clear();\n\t}\n}\n\nconst signalIds = new WeakMap<AbortSignal, number>();\nconst signalIdCounter = getScopedCounter();\n\n/**\n * Returns a stable, unique numeric ID for the given AbortSignal.\n * Used to differentiate concurrent git commands that have different\n * cancellation signals, so one caller aborting doesn't cancel another.\n */\nexport function getAbortSignalId(signal: AbortSignal | undefined): string {\n\tif (signal == null) return '';\n\n\tlet id = signalIds.get(signal);\n\tif (id == null) {\n\t\tid = signalIdCounter.next();\n\t\tsignalIds.set(signal, id);\n\t}\n\treturn String(id);\n}\n"],"mappings":";;AAEA,MAAM,yBAAyB,OAAO,IAAI,mBAAmB;;;;;;;AAW7D,IAAa,oBAAb,cAAuC,MAAM;CAQ3B;CACA;CAJjB,0BAAiD;CAEjD,YACC,UACA,QACC;EACD,MAAM;EAHU,KAAA,WAAA;EACA,KAAA,SAAA;EAMhB,OAAO,eAAe,MAAM,wBAAwB;GACnD,OAAO;GACP,UAAU;GACV,YAAY;GACZ,cAAc;EACf,CAAC;EACD,KAAK,OAAO;EAEZ,IAAI,KAAK,UAAU;GAClB,IAAI,KAAK,SAAS,QAAQ,WAAW,qBAAqB,GACzD,KA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AAb,MAA4B;CAC3B,aAA8B,IAAI,gBAAgB;CAClD,cAAsB;;CAEtB,2BAA4B,IAAI,IAAgB;;CAGhD,IAAI,SAAsB;EACzB,OAAO,KAAK,WAAW;CACxB;;;;;;;;;;CAWA,IAAI,cAAwC;EAC3C,KAAK;EAEL,IAAI,gBAAgB,MACnB,aAAa;GACZ,KAAK;GACL,KAAK,WAAW;EACjB;EAGD,IAAI,aAAa,SAAS;GACzB,KAAK;GACL,KAAK,WAAW;GAChB,aAAa,CAAC;EACf;EAKA,IAAI,UAAU;EACd,IAAI;EACJ,MAAM,gBAAgB;GACrB,IAAI,SAAS;GAEb,UAAU;GACV,KAAK,SAAS,OAAO,MAAM;GAC3B,KAAK;GACL,KAAK,WAAW;EACjB;EACA,eAAe,aAAa,oBAAoB,SAAS,OAAO;EAChE,aAAa,iBAAiB,SAAS,SAAS,EAAE,MAAM,KAAK,CAAC;EAC9D,KAAK,SAAS,IAAI,MAAM;EAExB,aAAa;GACZ,IAAI,SAAS;GAEb,UAAU;GACV,KAAK,SAAS,OAAO,MAAM;GAC3B,OAAO;EACR;CACD;CAEA,aAA2B;EAC1B,IAAI,KAAK,eAAe,KAAK,CAAC,KAAK,WAAW,OAAO,SACpD,KAAK,WAAW,MAAM;CAExB;;CAGA,UAAgB;EACf,KAAK,MAAM,UAAU,KAAK,UACzB,OAAO;EAER,KAAK,SAAS,MAAM;CACrB;AACD;AAEA,MAAM,4BAAY,IAAI,QAA6B;AACnD,MAAM,kBAAkB,iBAAiB;;;;;;AAOzC,SAAgB,iBAAiB,QAAyC;CACzE,IAAI,UAAU,MAAM,OAAO;CAE3B,IAAI,KAAK,UAAU,IAAI,MAAM;CAC7B,IAAI,MAAM,MAAM;EACf,KAAK,gBAAgB,KAAK;EAC1B,UAAU,IAAI,QAAQ,EAAE;CACzB;CACA,OAAO,OAAO,EAAE;AACjB"}
1
+ {"version":3,"file":"cancellation.js","names":[],"sources":["../../../utils/src/cancellation.ts"],"sourcesContent":["import { getScopedCounter } from './counter.js';\n\nconst cancellationErrorBrand = Symbol.for('CancellationError');\n\n/** Why an operation was cancelled: a caller abort, a timeout, or a termination whose cause is unknown. */\nexport type CancellationReason = 'aborted' | 'timeout' | 'unknown';\n\n/**\n * A standalone CancellationError for use in the library.\n * Uses a symbol brand so that instances from any bundle are recognized\n * by `isCancellationError`.\n */\nexport class CancellationError extends Error {\n\t// TS-only nominal brand (not read anywhere) — without it, `CancellationError` has the same\n\t// structural shape as any other `Error` subtype, so `isCancellationError`'s negative narrowing\n\t// (`if (isCancellationError(ex)) throw ex;`) collapses an unrelated error union to `never` instead\n\t// of leaving it narrowed. The runtime brand stays a symbol (below) for the cross-realm check.\n\tprivate readonly _cancellationErrorBrand: true = true;\n\n\tconstructor(\n\t\tpublic readonly original?: Error,\n\t\tpublic readonly reason?: CancellationReason,\n\t) {\n\t\tsuper();\n\t\t// A symbol-keyed computed class field can't be typed for `isolatedDeclarations` (only well-known\n\t\t// symbols like `Symbol.iterator` qualify), so the brand is set here with the same runtime shape\n\t\t// (writable/enumerable/configurable) a plain field assignment would produce.\n\t\tObject.defineProperty(this, cancellationErrorBrand, {\n\t\t\tvalue: true,\n\t\t\twritable: true,\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t});\n\t\tthis.name = 'CancellationError';\n\n\t\tif (this.original) {\n\t\t\tif (this.original.message.startsWith('Operation cancelled')) {\n\t\t\t\tthis.message = this.original.message;\n\t\t\t} else {\n\t\t\t\tthis.message = `Operation cancelled; ${this.original.message}`;\n\t\t\t}\n\t\t} else {\n\t\t\tthis.message = 'Operation cancelled';\n\t\t}\n\t\tError.captureStackTrace?.(this, new.target);\n\t}\n}\n\nexport function isCancellationError(ex: unknown): ex is CancellationError {\n\treturn (\n\t\t(ex instanceof Error && (cancellationErrorBrand in ex || ex.name === 'CancellationError')) ||\n\t\t(ex instanceof DOMException && ex.name === 'AbortError')\n\t);\n}\n\n/**\n * Races a promise against an `AbortSignal`. If the signal fires before\n * the promise settles, the returned promise rejects with `CancellationError`.\n * If the promise settles first, the signal listener is cleaned up.\n */\nexport function raceWithSignal<T>(promise: Promise<T>, signal: AbortSignal): Promise<T> {\n\tif (signal.aborted) return Promise.reject(new CancellationError());\n\n\treturn new Promise<T>((resolve, reject) => {\n\t\tconst onAbort = () => reject(new CancellationError());\n\t\tsignal.addEventListener('abort', onAbort, { once: true });\n\t\tpromise.then(\n\t\t\tv => {\n\t\t\t\tsignal.removeEventListener('abort', onAbort);\n\t\t\t\tresolve(v);\n\t\t\t},\n\t\t\t(e: unknown) => {\n\t\t\t\tsignal.removeEventListener('abort', onAbort);\n\t\t\t\treject(e instanceof Error ? e : new Error(String(e)));\n\t\t\t},\n\t\t);\n\t});\n}\n\n/**\n * Races a promise against a timeout. If `ms` elapses before the promise settles, the returned promise\n * rejects with `CancellationError`. If the promise settles first, the timer is cleared. Parallels\n * `raceWithSignal`, with a timer standing in for the signal.\n *\n * When `abortOnTimeout` is provided, it is aborted on timeout — so a caller can link the underlying operation to\n * it (e.g. via `AbortSignal.any`) and have it torn down instead of orphaned. Abort is best-effort (a truly-stuck\n * op may ignore it); the returned promise rejects on timeout regardless of whether the underlying op settles.\n */\nexport function raceWithTimeout<T>(promise: Promise<T>, ms: number, abortOnTimeout?: AbortController): Promise<T> {\n\treturn new Promise<T>((resolve, reject) => {\n\t\tconst timer = setTimeout(() => {\n\t\t\tconst error = new CancellationError(new Error(`Timed out after ${ms}ms`), 'timeout');\n\t\t\tabortOnTimeout?.abort(error);\n\t\t\treject(error);\n\t\t}, ms);\n\t\t// Don't let the timeout timer keep a (Node) process alive on its own — a still-pending promise shouldn't\n\t\t// hold the event loop open just for its backstop (no-op in the browser, where setTimeout returns a number).\n\t\tif (typeof timer !== 'number') {\n\t\t\ttimer.unref();\n\t\t}\n\t\tpromise.then(\n\t\t\tv => {\n\t\t\t\tclearTimeout(timer);\n\t\t\t\tresolve(v);\n\t\t\t},\n\t\t\t(e: unknown) => {\n\t\t\t\tclearTimeout(timer);\n\t\t\t\treject(e instanceof Error ? e : new Error(String(e)));\n\t\t\t},\n\t\t);\n\t});\n}\n\n/**\n * Aggregates multiple caller `AbortSignal`s into a single signal that\n * only fires when **all** callers have cancelled (the inverse of `AbortSignal.any()`).\n *\n * Designed for shared-promise caching: each caller registers their signal,\n * and the underlying operation receives the aggregate signal. Individual callers\n * can cancel early (via `raceWithSignal`), but the operation continues as long\n * as at least one caller is still active.\n */\nexport class AbortAggregate {\n\tprivate readonly controller = new AbortController();\n\tprivate activeCount = 0;\n\t/** One listener-remover per registration (NOT keyed by signal), so adding the same signal twice is safe. */\n\tprivate readonly cleanups = new Set<() => void>();\n\n\t/** The aggregate signal — only fires when all callers have cancelled. */\n\tget signal(): AbortSignal {\n\t\treturn this.controller.signal;\n\t}\n\n\t/**\n\t * Register a caller.\n\t * - If `cancellation` is provided, the caller is auto-removed when it fires.\n\t * - If `cancellation` is `undefined`, the caller is \"permanent\" — the aggregate\n\t * can never fire while it's active. Call the returned cleanup on promise settle.\n\t * - The same signal instance may safely be added more than once — each registration is tracked and cleaned up\n\t * independently, so no listener leaks.\n\t * @returns A cleanup function to unregister the caller.\n\t */\n\tadd(cancellation?: AbortSignal): () => void {\n\t\tthis.activeCount++;\n\n\t\tif (cancellation == null) {\n\t\t\treturn () => {\n\t\t\t\tthis.activeCount--;\n\t\t\t\tthis.checkAbort();\n\t\t\t};\n\t\t}\n\n\t\tif (cancellation.aborted) {\n\t\t\tthis.activeCount--;\n\t\t\tthis.checkAbort();\n\t\t\treturn () => {};\n\t\t}\n\n\t\t// Track this registration's listener removal individually (a Set of removers, NOT keyed by the signal) so\n\t\t// adding the same signal twice can't overwrite the other's cleanup. `settled` keeps both exit paths (abort\n\t\t// vs. manual cleanup) idempotent and preserves the accounting: only `onAbort` decrements `activeCount`.\n\t\tlet settled = false;\n\t\tlet remove: () => void;\n\t\tconst onAbort = () => {\n\t\t\tif (settled) return;\n\n\t\t\tsettled = true;\n\t\t\tthis.cleanups.delete(remove);\n\t\t\tthis.activeCount--;\n\t\t\tthis.checkAbort();\n\t\t};\n\t\tremove = () => cancellation.removeEventListener('abort', onAbort);\n\t\tcancellation.addEventListener('abort', onAbort, { once: true });\n\t\tthis.cleanups.add(remove);\n\n\t\treturn () => {\n\t\t\tif (settled) return;\n\n\t\t\tsettled = true;\n\t\t\tthis.cleanups.delete(remove);\n\t\t\tremove();\n\t\t};\n\t}\n\n\tprivate checkAbort(): void {\n\t\tif (this.activeCount <= 0 && !this.controller.signal.aborted) {\n\t\t\tthis.controller.abort();\n\t\t}\n\t}\n\n\t/** Remove all abort listeners. Call when the cached promise settles. */\n\tdispose(): void {\n\t\tfor (const remove of this.cleanups) {\n\t\t\tremove();\n\t\t}\n\t\tthis.cleanups.clear();\n\t}\n}\n\nconst signalIds = new WeakMap<AbortSignal, number>();\nconst signalIdCounter = getScopedCounter();\n\n/**\n * Returns a stable, unique numeric ID for the given AbortSignal.\n * Used to differentiate concurrent git commands that have different\n * cancellation signals, so one caller aborting doesn't cancel another.\n */\nexport function getAbortSignalId(signal: AbortSignal | undefined): string {\n\tif (signal == null) return '';\n\n\tlet id = signalIds.get(signal);\n\tif (id == null) {\n\t\tid = signalIdCounter.next();\n\t\tsignalIds.set(signal, id);\n\t}\n\treturn String(id);\n}\n"],"mappings":";;AAEA,MAAM,yBAAyB,OAAO,IAAI,mBAAmB;;;;;;AAU7D,IAAa,oBAAb,cAAuC,MAAM;CAQ3B;CACA;CAJjB,0BAAiD;CAEjD,YACC,UACA,QACC;EACD,MAAM;EAHU,KAAA,WAAA;EACA,KAAA,SAAA;EAMhB,OAAO,eAAe,MAAM,wBAAwB;GACnD,OAAO;GACP,UAAU;GACV,YAAY;GACZ,cAAc;EACf,CAAC;EACD,KAAK,OAAO;EAEZ,IAAI,KAAK,UAAU;GAClB,IAAI,KAAK,SAAS,QAAQ,WAAW,qBAAqB,GACzD,KAAK,UAAU,KAAK,SAAS;QAE7B,KAAK,UAAU,wBAAwB,KAAK,SAAS;EAEvD,OAC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IAAI,IAAgB;;CAGhD,IAAI,SAAsB;EACzB,OAAO,KAAK,WAAW;CACxB;;;;;;;;;;CAWA,IAAI,cAAwC;EAC3C,KAAK;EAEL,IAAI,gBAAgB,MACnB,aAAa;GACZ,KAAK;GACL,KAAK,WAAW;EACjB;EAGD,IAAI,aAAa,SAAS;GACzB,KAAK;GACL,KAAK,WAAW;GAChB,aAAa,CAAC;EACf;EAKA,IAAI,UAAU;EACd,IAAI;EACJ,MAAM,gBAAgB;GACrB,IAAI,SAAS;GAEb,UAAU;GACV,KAAK,SAAS,OAAO,MAAM;GAC3B,KAAK;GACL,KAAK,WAAW;EACjB;EACA,eAAe,aAAa,oBAAoB,SAAS,OAAO;EAChE,aAAa,iBAAiB,SAAS,SAAS,EAAE,MAAM,KAAK,CAAC;EAC9D,KAAK,SAAS,IAAI,MAAM;EAExB,aAAa;GACZ,IAAI,SAAS;GAEb,UAAU;GACV,KAAK,SAAS,OAAO,MAAM;GAC3B,OAAO;EACR;CACD;CAEA,aAA2B;EAC1B,IAAI,KAAK,eAAe,KAAK,CAAC,KAAK,WAAW,OAAO,SACpD,KAAK,WAAW,MAAM;CAExB;;CAGA,UAAgB;EACf,KAAK,MAAM,UAAU,KAAK,UACzB,OAAO;EAER,KAAK,SAAS,MAAM;CACrB;AACD;AAEA,MAAM,4BAAY,IAAI,QAA6B;AACnD,MAAM,kBAAkB,iBAAiB;;;;;;AAOzC,SAAgB,iBAAiB,QAAyC;CACzE,IAAI,UAAU,MAAM,OAAO;CAE3B,IAAI,KAAK,UAAU,IAAI,MAAM;CAC7B,IAAI,MAAM,MAAM;EACf,KAAK,gBAAgB,KAAK;EAC1B,UAAU,IAAI,QAAQ,EAAE;CACzB;CACA,OAAO,OAAO,EAAE;AACjB"}
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.10.3",
4
+ "version": "0.10.4",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": {
7
7
  "name": "GitKraken",
@@ -246,7 +246,7 @@
246
246
  "@octokit/types": "17.0.0",
247
247
  "@vscode/l10n": "0.0.18",
248
248
  "fast-string-truncated-width": "3.0.3",
249
- "ignore": "7.0.8",
249
+ "ignore": "7.0.9",
250
250
  "vscode-uri": "3.2.0"
251
251
  },
252
252
  "devDependencies": {