@keystrokehq/cli 0.0.37 → 0.0.39
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/README.md +5 -1
- package/dist/{accept.handler-DCsud1s5.mjs → accept.handler-CykuBpt6.mjs} +3 -3
- package/dist/{admin-BaOtHeZ2.mjs → admin-gRjPC3eD.mjs} +10 -10
- package/dist/{agents-BVAVfMR_.mjs → agents-BpyuvM9p.mjs} +6 -6
- package/dist/{api-keys-BhEEsHUh.mjs → api-keys-BSKhdD_x.mjs} +6 -6
- package/dist/{auth-BnsitjzT.mjs → auth-DCgToFf5.mjs} +6 -6
- package/dist/{auth.handler-W_xk14TL.mjs → auth.handler-QRQAEUJC.mjs} +1 -1
- package/dist/{authored-workflow-ref-fkHEEVnd.mjs → authored-workflow-ref-BRCQgyWl.mjs} +4 -4
- package/dist/{build-progress-CM-b6Bby.mjs → build-progress-D_SQqdHA.mjs} +2 -2
- package/dist/{build.handler-CpAsAsBc.mjs → build.handler-DGQn_clk.mjs} +6 -6
- package/dist/{clear.handler-_sR33Hp8.mjs → clear.handler-CuXYvUj2.mjs} +1 -1
- package/dist/{clear.handler-CDyG6-dk.mjs → clear.handler-DnjvgyMj.mjs} +1 -1
- package/dist/{commander-C6SSTQJ2.mjs → commander-B_8QwPpe.mjs} +3 -3
- package/dist/{connect-27EgnljZ.mjs → connect-DV9lhP6C.mjs} +3 -3
- package/dist/{connect.handler-COM1LnNg.mjs → connect.handler-D6JzuFuT.mjs} +4 -4
- package/dist/{context-ebZssGCY.mjs → context-Brc9VGV9.mjs} +2 -2
- package/dist/{create.handler-CAWJAGzQ.mjs → create.handler-D_tmjANR.mjs} +3 -3
- package/dist/{credential-schema-mismatch-c17ktoNU.mjs → credential-schema-mismatch-CStYUB2h.mjs} +1 -1
- package/dist/{credentials-C0ssbMlp.mjs → credentials-UDrvrKj-.mjs} +9 -9
- package/dist/{current-deployment-workflow-C6x65imE.mjs → current-deployment-workflow-CknsHF5T.mjs} +1 -1
- package/dist/{current.handler-DP1L_hm3.mjs → current.handler-Cy91EeLU.mjs} +3 -3
- package/dist/{delete.handler-C-5XFkgN.mjs → delete.handler-rUDDUrDQ.mjs} +2 -2
- package/dist/{deploy-BcVQJza8.mjs → deploy-DgWPlEKO.mjs} +2 -2
- package/dist/{deploy-progress-Bt86Yc1r.mjs → deploy-progress-BDOCSm_U.mjs} +1 -1
- package/dist/{deploy.handler-GPS9lxGk.mjs → deploy.handler-BDCHCk_A.mjs} +9 -9
- package/dist/{diff.handler-DkM5dhaN.mjs → diff.handler-CGERP-Qn.mjs} +5 -5
- package/dist/{env.handler-V_isbSi2.mjs → env.handler--8FRrSlJ.mjs} +6 -6
- package/dist/{error-boundary-BRxUsPi7.mjs → error-boundary-D2DiCLAp.mjs} +3 -3
- package/dist/{iam-command-utils-DNDN0wT6.mjs → iam-command-utils-D01Gw8-M.mjs} +2 -2
- package/dist/{init-D1OmmclX.mjs → init-Mpe_8lA_.mjs} +2 -2
- package/dist/{init.handler-CUbYlUgP.mjs → init.handler-BjLAIAmm.mjs} +4 -4
- package/dist/{inspect.handler-BE6coOuW.mjs → inspect.handler-CXCi7fhH.mjs} +5 -5
- package/dist/{integration-catalog-pSmWHFLQ.mjs → integration-catalog-mZs6EAlN.mjs} +3 -3
- package/dist/{integrations-DZD5t8n2.mjs → integrations-D_IH5Ud1.mjs} +6 -6
- package/dist/{invites-BuR1H-tA.mjs → invites-CWWz4wmY.mjs} +5 -5
- package/dist/{invites.list.handler-Dj4a6XOg.mjs → invites.list.handler-CQLWSoWo.mjs} +4 -4
- package/dist/{invites.resend.handler-DEGF4vlB.mjs → invites.resend.handler-CeIGE_qM.mjs} +4 -4
- package/dist/{invites.revoke.handler-Dg4ZvlFS.mjs → invites.revoke.handler-9K6jkym_.mjs} +4 -4
- package/dist/keystroke.mjs +41 -29
- package/dist/{list.handler-Choc4SZz.mjs → list.handler-BvuxTFLe.mjs} +5 -5
- package/dist/{list.handler-BTYVIn6z.mjs → list.handler-CDWPmiMy.mjs} +3 -3
- package/dist/{list.handler-DYE48apa.mjs → list.handler-Co32_F3n.mjs} +4 -4
- package/dist/{list.handler-D47C1z3m.mjs → list.handler-Cuw1fWO_.mjs} +41 -12
- package/dist/{list.handler-7MkJfkak.mjs → list.handler-D-rSyrX0.mjs} +4 -4
- package/dist/{list.handler-KcCaG3PZ.mjs → list.handler-DMvq96UA.mjs} +2 -2
- package/dist/{list.handler-2g1CZAvB.mjs → list.handler-DUTNS8du.mjs} +3 -3
- package/dist/{list.handler-Bchcr3-e.mjs → list.handler-Dz-Yeijp.mjs} +3 -3
- package/dist/{list2.handler-BIaIyrQf.mjs → list2.handler-BpqKZTZk.mjs} +1 -1
- package/dist/{listen-CVY-_F29.mjs → listen-CeNwufij.mjs} +3 -3
- package/dist/{listen.handler-D_nEvXRn.mjs → listen.handler-CfRoaOwu.mjs} +3 -3
- package/dist/{logs-CZ2qnsSH.mjs → logs-B7k2_W1R.mjs} +3 -3
- package/dist/{logs.handler-Wk6mYyAZ.mjs → logs.handler-BIqJ0FED.mjs} +1 -1
- package/dist/{logs.handler-BRUzZC9Z.mjs → logs.handler-CSqOzxCU.mjs} +5 -5
- package/dist/{members.add.handler-BJ0wr6rP.mjs → members.add.handler-CBjoA6vG.mjs} +4 -4
- package/dist/{members.invite.handler-DyveDMuq.mjs → members.invite.handler-D8KcKJ9Y.mjs} +4 -4
- package/dist/{members.list.handler-CyQxH_zS.mjs → members.list.handler-CB_qSJK0.mjs} +4 -4
- package/dist/{members.remove.handler-Dtv9PooY.mjs → members.remove.handler-DNhO81mo.mjs} +4 -4
- package/dist/{members.update.handler-CeK-tCjT.mjs → members.update.handler-Bjdk_uz4.mjs} +4 -4
- package/dist/{operations-CxQlt0S0.mjs → operations-HHwoArwE.mjs} +5 -5
- package/dist/{org-context-BI9OSpbb.mjs → org-context-CNh2p2DP.mjs} +3 -3
- package/dist/{org-B8MPHJJu.mjs → org-f-qo68Em.mjs} +16 -16
- package/dist/{org-output-DffU7DKn.mjs → org-output-BcI17Uan.mjs} +2 -2
- package/dist/{orgs.create.handler-BKvSmkU3.mjs → orgs.create.handler-DOE9ZIed.mjs} +3 -3
- package/dist/{orgs.get.handler-BA-CexIY.mjs → orgs.get.handler-sWErVI7r.mjs} +3 -3
- package/dist/{orgs.list.handler-eCEg5kC1.mjs → orgs.list.handler-Cp-mXsA0.mjs} +3 -3
- package/dist/{output-DnIFEmi5.mjs → output-BPydP5tG.mjs} +1 -1
- package/dist/{package-manager-BP3-q8hh.mjs → package-manager-BwJ6muas.mjs} +1 -1
- package/dist/{paused.handler-4wKMTKZ-.mjs → paused.handler-DWdoKYY8.mjs} +5 -5
- package/dist/{projects-Wu_2fB_x.mjs → projects-CCC36zbJ.mjs} +3 -3
- package/dist/{register.handler-BvAkXCwE.mjs → register.handler-Dxae5iq8.mjs} +3 -3
- package/dist/{render-operation-VdEPhoII.mjs → render-operation-iF7Wblv2.mjs} +1 -1
- package/dist/{requirements.handler-Bab4kBtw.mjs → requirements.handler-Bg3mRnER.mjs} +2 -2
- package/dist/{resolve-project-DLKlAy0z.mjs → resolve-project-CoCN9xfi.mjs} +1 -1
- package/dist/{run-polling-C5fI7xTp.mjs → run-polling-htHWhG0T.mjs} +1 -1
- package/dist/{run.handler-BKD5Xu0A.mjs → run.handler-C-CM-xZG.mjs} +7 -7
- package/dist/{runs-CT31dczt.mjs → runs-BRJPNq4B.mjs} +4 -4
- package/dist/{search-BeQW_pf4.mjs → search-DdJpxHEs.mjs} +15 -6
- package/dist/search.handler-dsvkAHFo.mjs +112 -0
- package/dist/show.handler-CdZF0aao.mjs +79 -0
- package/dist/{show.handler-Cqe_hCqU.mjs → show.handler-D3nDc1MJ.mjs} +2 -2
- package/dist/{show.handler-DB8xl5FU.mjs → show.handler-DUDxnNiZ.mjs} +4 -4
- package/dist/{skill-installer-DuMhavmM.mjs → skill-installer-DYNH_MJT.mjs} +1 -1
- package/dist/{skills-sync.handler-BGs-_YD9.mjs → skills-sync.handler-_LVhIMRH.mjs} +3 -3
- package/dist/{skills.command-DUWn6FbL.mjs → skills.command-DSHGwXPX.mjs} +3 -3
- package/dist/{spinner-progress-BYxlr3lY.mjs → spinner-progress-fLaD0sjH.mjs} +1 -1
- package/dist/{status.handler-DAId4bVU.mjs → status.handler-1hEzX5oB.mjs} +1 -1
- package/dist/{switch.handler-Cd4Yg2n8.mjs → switch.handler-D135WwfB.mjs} +3 -3
- package/dist/{sync-DgC4lcxh.mjs → sync-CFScllh3.mjs} +2 -2
- package/dist/{sync.handler-Cm_WtGmH.mjs → sync.handler-x8v53-TT.mjs} +6 -6
- package/dist/{test-4V7nh67i.mjs → test-Dx4RXoLZ.mjs} +3 -3
- package/dist/{test.handler-Bo4YTs2Z.mjs → test.handler-BmvL5vF8.mjs} +8 -8
- package/dist/{test.handler-BdCYcwR4.mjs → test.handler-Mz_XOnJl.mjs} +1 -1
- package/dist/{tool.handler-CPCrSDq2.mjs → tool.handler-DsbpocYI.mjs} +7 -7
- package/dist/{upgrade-2qUOcjxb.mjs → upgrade-C9G6HksL.mjs} +3 -3
- package/dist/{upgrade.handler-PqlKSuUE.mjs → upgrade.handler-DsFeAFF4.mjs} +2 -2
- package/dist/{upload.handler-CS-vLpzC.mjs → upload.handler-DscKDQ63.mjs} +6 -6
- package/dist/{users.get.handler-CH1c6Lnj.mjs → users.get.handler-CaUv_maM.mjs} +3 -3
- package/dist/{users.list.handler-CxbZFgjO.mjs → users.list.handler-DzsOvAtd.mjs} +3 -3
- package/dist/{users.set-role.handler-CBRE-Ws6.mjs → users.set-role.handler-koRzA0V9.mjs} +3 -3
- package/dist/{validate.handler-1d-UmtXB.mjs → validate.handler-BkBsS8BL.mjs} +6 -6
- package/dist/{workflow-build-Bm8JoVv4.mjs → workflow-build-Db6at6IA.mjs} +1 -1
- package/dist/{workflows-ny7rOdeH.mjs → workflows-B8VG6nKg.mjs} +13 -13
- package/package.json +7 -7
- package/dist/search.handler-BJ-ZlDL4.mjs +0 -79
- package/dist/show.handler-BrIHUH28.mjs +0 -31
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-
|
|
4
|
-
import { t as createTypedCommand } from "./commander-
|
|
3
|
+
import { n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-BPydP5tG.mjs";
|
|
4
|
+
import { t as createTypedCommand } from "./commander-B_8QwPpe.mjs";
|
|
5
5
|
import { n as SHA256HashSchema, t as JsonSchemaSchema } from "./common-AK0q0Oz0.mjs";
|
|
6
6
|
import { u as TriggerUploadDataSchema } from "./credential-requirements-B5Alhu1v-DanlSKnT.mjs";
|
|
7
7
|
import { a as FlowGraphSchema, r as WorkflowBuildManifestSchema } from "./workflow-build-manifest-CV6bBmDO.mjs";
|
|
@@ -288,7 +288,7 @@ function createWorkflowsBuildCommand() {
|
|
|
288
288
|
description: "Build workflows locally",
|
|
289
289
|
schema: WorkflowsBuildOptionsSchema,
|
|
290
290
|
optionsConfig: BUILD_OPTIONS_CONFIG,
|
|
291
|
-
loadHandler: async () => (await import("./build.handler-
|
|
291
|
+
loadHandler: async () => (await import("./build.handler-DGQn_clk.mjs")).handleWorkflowsBuild
|
|
292
292
|
});
|
|
293
293
|
}
|
|
294
294
|
//#endregion
|
|
@@ -315,7 +315,7 @@ function createWorkflowsDiffCommand() {
|
|
|
315
315
|
description: "Authored workflow id",
|
|
316
316
|
key: "workflow"
|
|
317
317
|
},
|
|
318
|
-
loadHandler: async () => (await import("./diff.handler-
|
|
318
|
+
loadHandler: async () => (await import("./diff.handler-CGERP-Qn.mjs")).handleWorkflowsDiff
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
321
|
//#endregion
|
|
@@ -348,7 +348,7 @@ function createWorkflowsEnvCommand() {
|
|
|
348
348
|
key: "workflow",
|
|
349
349
|
required: false
|
|
350
350
|
},
|
|
351
|
-
loadHandler: async () => (await import("./env.handler
|
|
351
|
+
loadHandler: async () => (await import("./env.handler--8FRrSlJ.mjs")).handleWorkflowsEnv
|
|
352
352
|
});
|
|
353
353
|
}
|
|
354
354
|
//#endregion
|
|
@@ -380,7 +380,7 @@ function createWorkflowsInspectCommand() {
|
|
|
380
380
|
description: "Authored workflow id",
|
|
381
381
|
key: "workflow"
|
|
382
382
|
},
|
|
383
|
-
loadHandler: async () => (await import("./inspect.handler-
|
|
383
|
+
loadHandler: async () => (await import("./inspect.handler-CXCi7fhH.mjs")).handleWorkflowsInspect
|
|
384
384
|
});
|
|
385
385
|
}
|
|
386
386
|
//#endregion
|
|
@@ -476,7 +476,7 @@ function createWorkflowsLogsCommand() {
|
|
|
476
476
|
key: "workflow",
|
|
477
477
|
required: false
|
|
478
478
|
},
|
|
479
|
-
loadHandler: async () => (await import("./logs.handler-
|
|
479
|
+
loadHandler: async () => (await import("./logs.handler-CSqOzxCU.mjs")).handleWorkflowsLogs
|
|
480
480
|
});
|
|
481
481
|
}
|
|
482
482
|
//#endregion
|
|
@@ -666,7 +666,7 @@ function createWorkflowsPausedCommand() {
|
|
|
666
666
|
key: "workflow",
|
|
667
667
|
required: false
|
|
668
668
|
},
|
|
669
|
-
loadHandler: async () => (await import("./paused.handler-
|
|
669
|
+
loadHandler: async () => (await import("./paused.handler-DWdoKYY8.mjs")).handleWorkflowsPaused
|
|
670
670
|
});
|
|
671
671
|
}
|
|
672
672
|
//#endregion
|
|
@@ -760,7 +760,7 @@ function createWorkflowsRunCommand() {
|
|
|
760
760
|
key: "payload",
|
|
761
761
|
required: false
|
|
762
762
|
}],
|
|
763
|
-
loadHandler: async () => (await import("./run.handler-
|
|
763
|
+
loadHandler: async () => (await import("./run.handler-C-CM-xZG.mjs")).handleWorkflowsRun
|
|
764
764
|
});
|
|
765
765
|
}
|
|
766
766
|
//#endregion
|
|
@@ -812,7 +812,7 @@ function createWorkflowsTestCommand() {
|
|
|
812
812
|
description: "Authored workflow id",
|
|
813
813
|
key: "workflow"
|
|
814
814
|
},
|
|
815
|
-
loadHandler: async () => (await import("./test.handler-
|
|
815
|
+
loadHandler: async () => (await import("./test.handler-BmvL5vF8.mjs")).handleWorkflowsTest
|
|
816
816
|
});
|
|
817
817
|
}
|
|
818
818
|
//#endregion
|
|
@@ -850,7 +850,7 @@ function createWorkflowsValidateCommand() {
|
|
|
850
850
|
key: "workflow",
|
|
851
851
|
required: false
|
|
852
852
|
},
|
|
853
|
-
loadHandler: async () => (await import("./validate.handler-
|
|
853
|
+
loadHandler: async () => (await import("./validate.handler-BkBsS8BL.mjs")).handleWorkflowsValidate
|
|
854
854
|
});
|
|
855
855
|
}
|
|
856
856
|
//#endregion
|
|
@@ -869,14 +869,14 @@ function createWorkflowsCommand() {
|
|
|
869
869
|
description: "Manage, run, inspect, and debug workflows",
|
|
870
870
|
schema: WorkflowsOptionsSchema,
|
|
871
871
|
optionsConfig: WORKFLOWS_OPTIONS_CONFIG,
|
|
872
|
-
loadHandler: async () => (await import("./list.handler-
|
|
872
|
+
loadHandler: async () => (await import("./list.handler-BvuxTFLe.mjs")).handleWorkflowsList,
|
|
873
873
|
subcommands: [
|
|
874
874
|
createTypedCommand({
|
|
875
875
|
name: "list",
|
|
876
876
|
description: "List all workflows in the project",
|
|
877
877
|
schema: WorkflowsOptionsSchema,
|
|
878
878
|
optionsConfig: WORKFLOWS_OPTIONS_CONFIG,
|
|
879
|
-
loadHandler: async () => (await import("./list.handler-
|
|
879
|
+
loadHandler: async () => (await import("./list.handler-BvuxTFLe.mjs")).handleWorkflowsList
|
|
880
880
|
}),
|
|
881
881
|
createWorkflowsBuildCommand(),
|
|
882
882
|
createWorkflowsTestCommand(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keystrokehq/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.39",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Command-line interface for creating, managing, and deploying Keystroke automations.",
|
|
6
6
|
"type": "module",
|
|
@@ -40,18 +40,18 @@
|
|
|
40
40
|
"vitest": "^4.1.5",
|
|
41
41
|
"@keystroke/env-utils": "0.0.0",
|
|
42
42
|
"@keystroke/local-memory": "0.0.2",
|
|
43
|
-
"@keystroke/shared-types": "0.0.
|
|
44
|
-
"@keystrokehq/config": "0.0.2",
|
|
43
|
+
"@keystroke/shared-types": "0.0.13",
|
|
45
44
|
"@keystroke/test-utils": "0.0.7",
|
|
46
45
|
"@keystroke/typescript-config": "0.0.0",
|
|
47
46
|
"@keystroke/utils": "0.0.0",
|
|
48
|
-
"@keystroke/workflow-builder": "0.0.
|
|
47
|
+
"@keystroke/workflow-builder": "0.0.18",
|
|
49
48
|
"@keystrokehq/core": "0.0.11",
|
|
50
49
|
"@keystrokehq/runtime": "0.0.8",
|
|
50
|
+
"@keystrokehq/workflow-build-contracts": "0.0.7",
|
|
51
51
|
"@keystrokehq/testing": "0.2.6",
|
|
52
|
-
"@keystroke/workflow-deploy": "0.0.
|
|
53
|
-
"@keystroke/workflow-sdk": "0.0.
|
|
54
|
-
"@keystrokehq/
|
|
52
|
+
"@keystroke/workflow-deploy": "0.0.15",
|
|
53
|
+
"@keystroke/workflow-sdk": "0.0.13",
|
|
54
|
+
"@keystrokehq/config": "0.0.2"
|
|
55
55
|
},
|
|
56
56
|
"keywords": [
|
|
57
57
|
"automation",
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { p as ui } from "./keystroke.mjs";
|
|
4
|
-
import { i as writeJson } from "./output-DnIFEmi5.mjs";
|
|
5
|
-
import { i as requireClient } from "./context-ebZssGCY.mjs";
|
|
6
|
-
import { t as renderCredential } from "./render-credential-D-H1ECDt.mjs";
|
|
7
|
-
import { i as formatPackageInstallCommand, r as detectPackageManager } from "./package-manager-BP3-q8hh.mjs";
|
|
8
|
-
import { t as renderOperation } from "./render-operation-VdEPhoII.mjs";
|
|
9
|
-
//#region src/lib/render-integration.ts
|
|
10
|
-
function renderIntegration(i, { full = false, packageManager } = {}) {
|
|
11
|
-
ui.br();
|
|
12
|
-
ui.text(i.publicId);
|
|
13
|
-
ui.text(` ${i.name}`);
|
|
14
|
-
if (i.description) ui.text(` ${i.description}`);
|
|
15
|
-
if (i.score !== void 0) ui.text(` score: ${i.score.toFixed(2)}`);
|
|
16
|
-
const npmPackageName = i.npmPackageName ?? `@keystrokehq/${i.publicId}`;
|
|
17
|
-
ui.text(` install: ${formatPackageInstallCommand(npmPackageName, { packageManager })}`);
|
|
18
|
-
if (full) {
|
|
19
|
-
const withOps = i;
|
|
20
|
-
if (Array.isArray(withOps.operations) && withOps.operations.length > 0) {
|
|
21
|
-
ui.text(` operations (${withOps.operations.length}):`);
|
|
22
|
-
for (const op of withOps.operations) ui.text(` ${op.id} — ${op.name}`);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
//#endregion
|
|
27
|
-
//#region src/commands/search/search.handler.ts
|
|
28
|
-
async function handleSearch(options, ctx) {
|
|
29
|
-
const type = options.type ?? "operations";
|
|
30
|
-
const result = await dispatchSearch(requireClient(ctx), type, {
|
|
31
|
-
q: options.query,
|
|
32
|
-
integrationId: options.integration,
|
|
33
|
-
limit: options.limit,
|
|
34
|
-
...options.full ? { include: "full" } : {}
|
|
35
|
-
});
|
|
36
|
-
if (ctx.jsonMode) {
|
|
37
|
-
writeJson(result);
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
if (result.results.length === 0) {
|
|
41
|
-
ui.hint(`No ${type} matched "${options.query}".`);
|
|
42
|
-
ui.hint(`Try a different query, or run \`keystroke ${browseCommand(type)}\` to browse.`);
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
const packageManager = detectPackageManager();
|
|
46
|
-
for (const hit of result.results) renderHit(type, hit, {
|
|
47
|
-
full: Boolean(options.full),
|
|
48
|
-
packageManager
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
function browseCommand(type) {
|
|
52
|
-
if (type === "operations") return "operations list";
|
|
53
|
-
if (type === "integrations") return "integrations list";
|
|
54
|
-
return "credentials definitions list";
|
|
55
|
-
}
|
|
56
|
-
function dispatchSearch(client, type, params) {
|
|
57
|
-
if (type === "operations") return client.search.operations(params);
|
|
58
|
-
if (type === "integrations") return client.search.integrations(params);
|
|
59
|
-
return client.search.credentials(params);
|
|
60
|
-
}
|
|
61
|
-
function renderHit(type, hit, { full, packageManager }) {
|
|
62
|
-
if (type === "operations") {
|
|
63
|
-
renderOperation(hit, {
|
|
64
|
-
showSchemas: full,
|
|
65
|
-
packageManager
|
|
66
|
-
});
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
if (type === "integrations") {
|
|
70
|
-
renderIntegration(hit, {
|
|
71
|
-
full,
|
|
72
|
-
packageManager
|
|
73
|
-
});
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
renderCredential(hit, { full });
|
|
77
|
-
}
|
|
78
|
-
//#endregion
|
|
79
|
-
export { handleSearch };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { p as ui } from "./keystroke.mjs";
|
|
4
|
-
import { i as writeJson } from "./output-DnIFEmi5.mjs";
|
|
5
|
-
import { i as requireClient } from "./context-ebZssGCY.mjs";
|
|
6
|
-
import { i as formatPackageInstallCommand, r as detectPackageManager } from "./package-manager-BP3-q8hh.mjs";
|
|
7
|
-
//#region src/commands/integrations/show.handler.ts
|
|
8
|
-
async function handleIntegrationShow(options, ctx) {
|
|
9
|
-
const client = requireClient(ctx);
|
|
10
|
-
const [integration, operations] = await Promise.all([client.integrations.get(options.id), client.integrations.listOperations(options.id)]);
|
|
11
|
-
if (ctx.jsonMode) {
|
|
12
|
-
writeJson({
|
|
13
|
-
integration: integration.integration,
|
|
14
|
-
operations: operations.operations
|
|
15
|
-
});
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
const entry = integration.integration;
|
|
19
|
-
const packageManager = detectPackageManager();
|
|
20
|
-
const npmPackageName = entry.npmPackageName ?? `@keystrokehq/${entry.publicId}`;
|
|
21
|
-
ui.text(entry.publicId);
|
|
22
|
-
ui.text(` ${entry.name}`);
|
|
23
|
-
if (entry.description) ui.text(` ${entry.description}`);
|
|
24
|
-
ui.text(` install: ${formatPackageInstallCommand(npmPackageName, { packageManager })}`);
|
|
25
|
-
ui.text(` operations (${operations.operations.length}):`);
|
|
26
|
-
for (const op of operations.operations) ui.text(` ${op.id} — ${op.name}`);
|
|
27
|
-
ui.br();
|
|
28
|
-
ui.hint(`Usage examples are in ${entry.npmPackageName ?? `@keystrokehq/${entry.publicId}`}'s TSDoc — open in your IDE for hover docs.`);
|
|
29
|
-
}
|
|
30
|
-
//#endregion
|
|
31
|
-
export { handleIntegrationShow };
|