@testsmith/api-spector 0.9.1 → 0.9.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.
@@ -9,6 +9,13 @@ const IPC = {
9
9
  /** Event (main→renderer): a `spector://open-from-git?url=…` deep link was
10
10
  * received; the renderer runs the same open-from-Git flow as the button. */
11
11
  openFromGitDeepLink: "file:openFromGitDeepLink",
12
+ /** Event (main→renderer): a `spector://import?token=…` deep link was
13
+ * received; the renderer imports the shared collection/request. */
14
+ importShareDeepLink: "file:importShareDeepLink",
15
+ /** Serialize the open workspace to a secret-free snapshot for cloud sync. */
16
+ serializeWorkspace: "file:serializeWorkspace",
17
+ /** Apply a pulled snapshot to disk (backs up first; merges local secrets). */
18
+ applyWorkspaceSnapshot: "file:applyWorkspaceSnapshot",
12
19
  getLastWorkspace: "file:getLastWorkspace",
13
20
  getRecentWorkspaces: "file:getRecentWorkspaces",
14
21
  saveWorkspace: "file:saveWorkspace",
@@ -241,6 +248,10 @@ const IPC = {
241
248
  branches: "git:branches",
242
249
  checkout: "git:checkout",
243
250
  deleteBranch: "git:deleteBranch",
251
+ stashList: "git:stashList",
252
+ stash: "git:stash",
253
+ stashPop: "git:stashPop",
254
+ stashDrop: "git:stashDrop",
244
255
  fetch: "git:fetch",
245
256
  pull: "git:pull",
246
257
  push: "git:push",
@@ -309,7 +320,28 @@ const IPC = {
309
320
  /** Open a flow's page in the cloud UI. */
310
321
  openFlow: "cloud:openFlow",
311
322
  /** Open the cloud deployment matrix in the browser. */
312
- openMatrix: "cloud:openMatrix"
323
+ openMatrix: "cloud:openMatrix",
324
+ /** Share a collection as a public read-only link (POST /api/share). */
325
+ shareCollection: "cloud:shareCollection",
326
+ /** Share a single request as a public read-only link (POST /api/share). */
327
+ shareRequest: "cloud:shareRequest",
328
+ /** Share a folder subtree as a public read-only link (POST /api/share). */
329
+ shareFolder: "cloud:shareFolder",
330
+ /** Fetch a shared collection/request by token for import (GET /api/share/{token}). */
331
+ importShare: "cloud:importShare",
332
+ /** Look up an existing share for a local collection/request (GET /api/share-lookup). */
333
+ shareLookup: "cloud:shareLookup",
334
+ /** Restrict a share: set/clear its expiry (PATCH /api/share/{token}). */
335
+ shareUpdate: "cloud:shareUpdate",
336
+ /** Revoke a share link (DELETE /api/share/{token}). */
337
+ shareRevoke: "cloud:shareRevoke",
338
+ /** Cloud-synced workspaces (collaborate without git). */
339
+ workspaceList: "cloud:workspaceList",
340
+ workspaceCreate: "cloud:workspaceCreate",
341
+ workspacePull: "cloud:workspacePull",
342
+ workspacePush: "cloud:workspacePush",
343
+ workspaceVersions: "cloud:workspaceVersions",
344
+ workspaceRestore: "cloud:workspaceRestore"
313
345
  }
314
346
  };
315
347
  const api = {
@@ -325,7 +357,15 @@ const api = {
325
357
  offOpenFromGit: () => {
326
358
  electron.ipcRenderer.removeAllListeners(IPC.file.openFromGitDeepLink);
327
359
  },
360
+ onImportShare: (cb) => {
361
+ electron.ipcRenderer.on(IPC.file.importShareDeepLink, (_e, token) => cb(token));
362
+ },
363
+ offImportShare: () => {
364
+ electron.ipcRenderer.removeAllListeners(IPC.file.importShareDeepLink);
365
+ },
328
366
  saveWorkspace: (ws) => electron.ipcRenderer.invoke(IPC.file.saveWorkspace, ws),
367
+ serializeWorkspace: () => electron.ipcRenderer.invoke(IPC.file.serializeWorkspace),
368
+ applyWorkspaceSnapshot: (snap) => electron.ipcRenderer.invoke(IPC.file.applyWorkspaceSnapshot, snap),
329
369
  newWorkspace: () => electron.ipcRenderer.invoke(IPC.file.newWorkspace),
330
370
  closeWorkspace: () => electron.ipcRenderer.invoke(IPC.file.closeWorkspace),
331
371
  loadCollection: (relPath) => electron.ipcRenderer.invoke(IPC.file.loadCollection, relPath),
@@ -418,6 +458,19 @@ const api = {
418
458
  cloudRunFlow: (name) => electron.ipcRenderer.invoke(IPC.cloud.runFlow, name),
419
459
  cloudGetFlowRun: (arg) => electron.ipcRenderer.invoke(IPC.cloud.getFlowRun, arg),
420
460
  cloudOpenFlow: (name) => electron.ipcRenderer.invoke(IPC.cloud.openFlow, name),
461
+ cloudShareCollection: (collection) => electron.ipcRenderer.invoke(IPC.cloud.shareCollection, collection),
462
+ cloudShareRequest: (request) => electron.ipcRenderer.invoke(IPC.cloud.shareRequest, request),
463
+ cloudShareFolder: (arg) => electron.ipcRenderer.invoke(IPC.cloud.shareFolder, arg),
464
+ cloudImportShare: (token) => electron.ipcRenderer.invoke(IPC.cloud.importShare, token),
465
+ cloudShareLookup: (arg) => electron.ipcRenderer.invoke(IPC.cloud.shareLookup, arg),
466
+ cloudShareUpdate: (arg) => electron.ipcRenderer.invoke(IPC.cloud.shareUpdate, arg),
467
+ cloudShareRevoke: (token) => electron.ipcRenderer.invoke(IPC.cloud.shareRevoke, token),
468
+ cloudWorkspaceList: () => electron.ipcRenderer.invoke(IPC.cloud.workspaceList),
469
+ cloudWorkspaceCreate: (arg) => electron.ipcRenderer.invoke(IPC.cloud.workspaceCreate, arg),
470
+ cloudWorkspacePull: (id) => electron.ipcRenderer.invoke(IPC.cloud.workspacePull, id),
471
+ cloudWorkspacePush: (arg) => electron.ipcRenderer.invoke(IPC.cloud.workspacePush, arg),
472
+ cloudWorkspaceVersions: (id) => electron.ipcRenderer.invoke(IPC.cloud.workspaceVersions, id),
473
+ cloudWorkspaceRestore: (arg) => electron.ipcRenderer.invoke(IPC.cloud.workspaceRestore, arg),
421
474
  // ─── Mock servers ─────────────────────────────────────────────────────────────
422
475
  mockStart: (server) => electron.ipcRenderer.invoke(IPC.mock.start, server),
423
476
  mockStop: (id) => electron.ipcRenderer.invoke(IPC.mock.stop, id),
@@ -566,6 +619,10 @@ const api = {
566
619
  gitBranches: () => electron.ipcRenderer.invoke(IPC.git.branches),
567
620
  gitCheckout: (branch, create) => electron.ipcRenderer.invoke(IPC.git.checkout, branch, create),
568
621
  gitDeleteBranch: (name, force = false) => electron.ipcRenderer.invoke(IPC.git.deleteBranch, name, force),
622
+ gitStashList: () => electron.ipcRenderer.invoke(IPC.git.stashList),
623
+ gitStash: (message) => electron.ipcRenderer.invoke(IPC.git.stash, message),
624
+ gitStashPop: (ref) => electron.ipcRenderer.invoke(IPC.git.stashPop, ref),
625
+ gitStashDrop: (ref) => electron.ipcRenderer.invoke(IPC.git.stashDrop, ref),
569
626
  gitFetch: () => electron.ipcRenderer.invoke(IPC.git.fetch),
570
627
  gitPull: (rebase = false) => electron.ipcRenderer.invoke(IPC.git.pull, rebase),
571
628
  gitPush: (setUpstream) => electron.ipcRenderer.invoke(IPC.git.push, setUpstream),
@@ -1,5 +1,5 @@
1
1
  import { l as linter, E as EditorView, L as LanguageSupport, i as LRLanguage, s as styleTags, m as indentNodeProp, n as delimitedIndent, p as foldNodeProp, q as foldInside, S as StateField, u as LRParser, v as StateEffect, w as tags, a as reactExports, j as jsxRuntimeExports, e as ReactCodeMirror, o as oneDark, d as json } from "./codemirror-BKmwMUlV.js";
2
- import { u as useT, a as useStore, b as useActiveEnvironment, i as isSubscriptionQuery } from "./index-Bf9-CiTh.js";
2
+ import { u as useT, a as useStore, b as useActiveEnvironment, i as isSubscriptionQuery } from "./index-DXMEqli_.js";
3
3
  import "./ajv-CJPwFjiP.js";
4
4
  function devAssert(condition, message) {
5
5
  const booleanCondition = Boolean(condition);
@@ -1,5 +1,5 @@
1
1
  import { a as reactExports, j as jsxRuntimeExports, e as ReactCodeMirror, o as oneDark, x as xml } from "./codemirror-BKmwMUlV.js";
2
- import { u as useT, c as btnPrimaryCls, d as commentKeymap } from "./index-Bf9-CiTh.js";
2
+ import { u as useT, c as btnPrimaryCls, d as commentKeymap } from "./index-DXMEqli_.js";
3
3
  import "./ajv-CJPwFjiP.js";
4
4
  const SOAP_11_CONTENT_TYPE = "text/xml; charset=utf-8";
5
5
  const SOAP_12_CONTENT_TYPE = "application/soap+xml; charset=utf-8";