deck-plugin-sdk 0.18.0 → 0.19.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deck-plugin-sdk",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "description": "Build a plugin for Deck, outside the Deck repository.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/shim/bridge.js CHANGED
@@ -86,6 +86,7 @@ export const gitMerge = (...a) => b().gitMerge(...a);
86
86
  export const gitMergeAs = (...a) => b().gitMergeAs(...a);
87
87
  export const gitMergeBase = (...a) => b().gitMergeBase(...a);
88
88
  export const gitPendingOp = (...a) => b().gitPendingOp(...a);
89
+ export const gitPoll = (...a) => b().gitPoll(...a);
89
90
  export const gitPull = (...a) => b().gitPull(...a);
90
91
  export const gitPullRebase = (...a) => b().gitPullRebase(...a);
91
92
  export const gitPush = (...a) => b().gitPush(...a);
@@ -116,6 +117,8 @@ export const gitTagDeleteRemote = (...a) => b().gitTagDeleteRemote(...a);
116
117
  export const gitTagPush = (...a) => b().gitTagPush(...a);
117
118
  export const gitUndoCommit = (...a) => b().gitUndoCommit(...a);
118
119
  export const gitUnstage = (...a) => b().gitUnstage(...a);
120
+ export const glabApi = (...a) => b().glabApi(...a);
121
+ export const glabRun = (...a) => b().glabRun(...a);
119
122
  export const googleAccount = (...a) => b().googleAccount(...a);
120
123
  export const googleSignIn = (...a) => b().googleSignIn(...a);
121
124
  export const googleSignOut = (...a) => b().googleSignOut(...a);
@@ -8,6 +8,8 @@ export interface AppProc {
8
8
  path: string;
9
9
  }
10
10
  export declare const configRead: (name: string) => Promise<string>;
11
+ /** Raw bytes rather than a JSON argument: a 13.8MB pinboard parsed as JSON on Deck's UI thread
12
+ * held every other command up for 200ms per save (see config_write in config.rs). */
11
13
  export declare const configWrite: (name: string, json: string) => Promise<void>;
12
14
  export declare const getVaultRoot: () => Promise<string>;
13
15
  export declare const setVaultRoot: (path: string) => Promise<void>;
@@ -544,6 +546,11 @@ export interface GitInfo {
544
546
  behind: number;
545
547
  }
546
548
  export declare const gitInfo: (dir: string) => Promise<GitInfo>;
549
+ /** gitStatus and gitInfo in one `git status -b`: what the editor's poll asks for every 3s. */
550
+ export declare const gitPoll: (dir: string) => Promise<{
551
+ rows: GitStatusRow[];
552
+ info: GitInfo;
553
+ }>;
547
554
  export declare const gitCommit: (dir: string, message: string) => Promise<string>;
548
555
  export declare const gitPush: (dir: string) => Promise<string>;
549
556
  export declare const gitPull: (dir: string) => Promise<string>;
@@ -632,11 +639,18 @@ export declare const ghPrThreads: (dir: string, number: number) => Promise<strin
632
639
  export declare const ghPrLineComment: (dir: string, number: number, commit: string, path: string, line: number, side: "LEFT" | "RIGHT", body: string) => Promise<string>;
633
640
  export declare const ghThreadReply: (dir: string, thread: string, body: string) => Promise<string>;
634
641
  export declare const ghThreadResolve: (dir: string, thread: string, resolve: boolean) => Promise<string>;
642
+ /** The GitLab CLI, `glab mr …` only. Rejects with "glab-missing" when glab is not installed. */
643
+ export declare const glabRun: (dir: string, args: string[]) => Promise<string>;
644
+ /**
645
+ * One GitLab REST request about this repo's merge requests (`projects/:id/merge_requests…` or
646
+ * `user`). `fields` go as strings; `json` values must be objects or arrays.
647
+ */
648
+ export declare const glabApi: (dir: string, method: "GET" | "POST" | "PUT", path: string, fields?: [string, string][], json?: Record<string, object>) => Promise<string>;
635
649
  /** The files that differ between two revisions. */
636
650
  export declare const gitRangeFiles: (dir: string, from: string, to: string) => Promise<CommitFile[]>;
637
651
  export declare const gitMergeBase: (dir: string, a: string, b: string) => Promise<string>;
638
- /** Fetch pull request N's head from `remote`, so its commits can be diffed here. */
639
- export declare const gitFetchPr: (dir: string, remote: string, number: number, base: string) => Promise<string>;
652
+ /** Fetch pull request N's head from `remote`, so its commits can be diffed here. `gitlab`: a merge request's. */
653
+ export declare const gitFetchPr: (dir: string, remote: string, number: number, base: string, gitlab?: boolean) => Promise<string>;
640
654
  export declare const gitBranchRename: (dir: string, from: string, to: string) => Promise<string>;
641
655
  export declare const gitPendingOp: (dir: string) => Promise<string>;
642
656
  export declare const gitAbortOp: (dir: string, op: string) => Promise<string>;