@keystrokehq/cli 0.0.17 → 0.0.19
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 +1 -1
- package/dist/{accept.handler-BPwp_UAE.mjs → accept.handler-BVmNNAgL.mjs} +4 -4
- package/dist/{admin-Bb9Hx-gO.mjs → admin-DQlHFuXn.mjs} +11 -11
- package/dist/{agents-CbmvvOAx.mjs → agents-Dd7UeQCw.mjs} +10 -10
- package/dist/{api-keys-DJlyIf10.mjs → api-keys-BsMBFiD_.mjs} +6 -6
- package/dist/{api-jkf0TTgD.mjs → api-nR61stdq.mjs} +4 -5
- package/dist/{auth-DpDEkJz7.mjs → auth-ZTuuEoD6.mjs} +12 -7
- package/dist/{auth.handler-u3qmoUX0.mjs → auth.handler-C1dZBdaG.mjs} +60 -27
- package/dist/{build-agents-DseUtzd4-VYWtIZy9.mjs → build-agents-DseUtzd4-CthuIecx.mjs} +6 -6
- package/dist/{build-metadata-C8Ra_Gi--BdoyLQMl.mjs → build-metadata-C8Ra_Gi--L3l8w0rh.mjs} +7 -7
- package/dist/{build-progress-BZivcVz4.mjs → build-progress-AR8xow4_.mjs} +2 -2
- package/dist/{build-tasks-GVuMLS0h-p08mMOyK.mjs → build-tasks-GVuMLS0h-BaPhhGXO.mjs} +3 -3
- package/dist/{build-workflows-CV4tBo6S-knCnBKTc.mjs → build-workflows-CV4tBo6S-szwrAGWT.mjs} +10 -10
- package/dist/{build.handler-BNSC_zhQ.mjs → build.handler-DJrEMCBw.mjs} +7 -7
- package/dist/{clear-cache.handler-gr5VmEYB.mjs → clear-cache.handler-CTLQ1PIN.mjs} +3 -3
- package/dist/clear.handler-BgeAg2de.mjs +68 -0
- package/dist/{clear.handler-CtOZ4aRn.mjs → clear.handler-C_pXAeBG.mjs} +3 -2
- package/dist/{commander-D15UZVjp.mjs → commander-C5qcOo8m.mjs} +4 -4
- package/dist/{connect-DzSNDSmI.mjs → connect-BtBKoXpi.mjs} +3 -3
- package/dist/{connect.handler-DRO05ak3.mjs → connect.handler-E8CmLRSF.mjs} +5 -5
- package/dist/{context-B1L8pZsH.mjs → context-BydAGTiB.mjs} +49 -17
- package/dist/{create.handler-DF1Ye4nr.mjs → create.handler-CBxIPC3r.mjs} +3 -3
- package/dist/{credential-env-map-B2nVJXPn.mjs → credential-env-map-BA4LNI7x.mjs} +6 -5
- package/dist/{credential-requirements-FtBk5JVB.mjs → credential-requirements-Ob-7H-0F.mjs} +3 -3
- package/dist/{credential-schema-mismatch-CfyBUMPS.mjs → credential-schema-mismatch-z74ud-YZ.mjs} +1 -1
- package/dist/{credentials-VidBoOd7.mjs → credentials-BGaRMclS.mjs} +7 -7
- package/dist/{credentials-CiOwDS5y.mjs → credentials-jRiXEr6P.mjs} +1 -1
- package/dist/{current-deployment-workflow-BRUEdPrN.mjs → current-deployment-workflow-BVliROAz.mjs} +6 -6
- package/dist/{current.handler-QZQ-l84v.mjs → current.handler-DBl9S67d.mjs} +3 -3
- package/dist/{default-urls-BS4twrsS.mjs → default-urls-BoSm4s9C.mjs} +1 -1
- package/dist/{delete.handler-Bude0SVP.mjs → delete.handler-Buu7Ip0D.mjs} +2 -2
- package/dist/{deploy-CJbVB7e2.mjs → deploy-BPDUTKZD.mjs} +1 -1
- package/dist/{deploy-eshEEiP-.mjs → deploy-CzTlgAFj.mjs} +2 -2
- package/dist/{deploy-progress-DJHph1Fz.mjs → deploy-progress-DK87VKJ-.mjs} +2 -2
- package/dist/{deploy.handler-BxxWI7nV.mjs → deploy.handler-CCcJ7y3A.mjs} +20 -20
- package/dist/{detect-env-access-CwkOYeYM-CZIixHeR.mjs → detect-env-access-CwkOYeYM-CNTyUzme.mjs} +1 -1
- package/dist/{diff-utils-4OQTpP5s.mjs → diff-utils-B0ED-Igv.mjs} +1 -1
- package/dist/{diff.handler-CzrKCj7N.mjs → diff.handler-DUVFixeG.mjs} +7 -7
- package/dist/dist-CIInPRGh.mjs +1071 -0
- package/dist/{dist-FQYQ2FLm.mjs → dist-Cx0RV8s7.mjs} +15 -15
- package/dist/{env.handler-B3YDQIVE.mjs → env.handler-C8kNFz2U.mjs} +10 -10
- package/dist/{error-boundary-CyLcinp1.mjs → error-boundary-B8cmSwJH.mjs} +3 -3
- package/dist/{file-metadata-DaPPpiTh.mjs → file-metadata-lrX05iRt.mjs} +1 -1
- package/dist/{iam-command-utils-ByLX0A-V.mjs → iam-command-utils-CSZj4XlH.mjs} +2 -2
- package/dist/{import-module--8x5SLum-DaUNACER.mjs → import-module--8x5SLum-DjPUZr4i.mjs} +12 -11
- package/dist/{init-CWFJdKNs.mjs → init-DeeOVc9m.mjs} +3 -3
- package/dist/{init.handler-BZSoM76V.mjs → init.handler-BMdhpusQ.mjs} +8 -8
- package/dist/{inspect.handler-umc7of-r.mjs → inspect.handler-QyTo8rWO.mjs} +8 -8
- package/dist/{integration-catalog-BgT4mLzW.mjs → integration-catalog-CmvYPvI6.mjs} +3 -3
- package/dist/integrations-tXZM-84g.mjs +185 -0
- package/dist/{invites-Cqi7iyIN.mjs → invites-ClyAatBW.mjs} +5 -5
- package/dist/{invites.list.handler-CErgY35S.mjs → invites.list.handler-CPkK_tPM.mjs} +4 -4
- package/dist/{invites.resend.handler-DRCRIA4F.mjs → invites.resend.handler-DIRI7tS2.mjs} +4 -4
- package/dist/{invites.revoke.handler-C0FZdAR0.mjs → invites.revoke.handler-CcXcDBlU.mjs} +4 -4
- package/dist/keystroke.mjs +561 -209
- package/dist/{list-enrichment-C6u5eI0j.mjs → list-enrichment-B9238wom.mjs} +3 -3
- package/dist/{list.handler-CBEXiTAK.mjs → list.handler-BB-Dcm5B.mjs} +3 -3
- package/dist/{list.handler-c-8RpgB9.mjs → list.handler-BLkQKiV1.mjs} +17 -16
- package/dist/{list.handler-Cr_DFAae.mjs → list.handler-Cbc9rlBx.mjs} +3 -3
- package/dist/{list.handler-DYdNWjgk.mjs → list.handler-ClPAPSWm.mjs} +4 -4
- package/dist/{list.handler-D-YFoKLU.mjs → list.handler-DdFGHkqt.mjs} +7 -7
- package/dist/{list.handler-FlchXrKz.mjs → list.handler-Xl_F89kq.mjs} +4 -4
- package/dist/{list2.handler-T5v4EK20.mjs → list.handler-tnsRn-Rj.mjs} +7 -7
- package/dist/{listen-rHLiCWbn.mjs → listen-ksMVpdNa.mjs} +3 -3
- package/dist/{listen.handler-B9T58yAj.mjs → listen.handler-DEJSBg8y.mjs} +4 -4
- package/dist/logs-C-JxXsgc.mjs +58 -0
- package/dist/{logs.handler-DGcGN2qb.mjs → logs.handler-BIegqc2p.mjs} +4 -4
- package/dist/logs.handler-DyRoevtO.mjs +53 -0
- package/dist/{members.add.handler-DmYI43rZ.mjs → members.add.handler-D4ggN2Xi.mjs} +4 -4
- package/dist/{members.invite.handler-B_KVxv5m.mjs → members.invite.handler-BYIt6Oib.mjs} +4 -4
- package/dist/{members.list.handler-BtuuIgQS.mjs → members.list.handler-CvpeYKC4.mjs} +4 -4
- package/dist/{members.remove.handler-Lvg-CqVv.mjs → members.remove.handler-C4GBUVYE.mjs} +4 -4
- package/dist/{members.update.handler-D-8izeso.mjs → members.update.handler-TpM1oi0L.mjs} +4 -4
- package/dist/{normalize-path-CojS-CgQ-DFTvyA27.mjs → normalize-path-CojS-CgQ-D4wSBHgG.mjs} +1 -1
- package/dist/{org-DUCts2MV.mjs → org-DIGyb7XZ.mjs} +17 -17
- package/dist/{orgs.create.handler-vXQgDJZ_.mjs → orgs.create.handler-RIYhse_Q.mjs} +4 -4
- package/dist/{orgs.get.handler-D_Jfl18x.mjs → orgs.get.handler-BfOpbSom.mjs} +4 -4
- package/dist/{orgs.list.handler-BNjoTJvV.mjs → orgs.list.handler-BMgj9yTD.mjs} +4 -4
- package/dist/{output-CGdYhH0p.mjs → output-BWcVRt-T.mjs} +1 -1
- package/dist/paths-JzzFkXQA-CEipIeVl.mjs +36 -0
- package/dist/{paused.handler-ST9dCe8E.mjs → paused.handler-DAZ1EaLN.mjs} +3 -3
- package/dist/{projects-DfaG_3WP.mjs → projects-BndElPAx.mjs} +5 -3
- package/dist/{projects-CbquwUlm.mjs → projects-Cy6CH3fI.mjs} +5 -5
- package/dist/{register.handler-BAx0IC-u.mjs → register.handler-BXeh5mdb.mjs} +20 -11
- package/dist/{requirements.handler-D5dFi7XZ.mjs → requirements.handler-C5vobjdJ.mjs} +7 -7
- package/dist/resolve-cli-credentials-DytxgMwn.mjs +47 -0
- package/dist/{resolve-project-CURYMjex.mjs → resolve-project-CNQtOWE4.mjs} +7 -7
- package/dist/{run-polling-BWcLQvm0.mjs → run-polling-BhOdFyh3.mjs} +5 -5
- package/dist/{run.handler-BiBDLoeH.mjs → run.handler-BpLmwF_a.mjs} +9 -9
- package/dist/{runs-Bc3zjk7V.mjs → runs-DaSd4eXn.mjs} +4 -4
- package/dist/{schemas-DodkHgnS.mjs → schemas-BxFPUGWT.mjs} +3 -2
- package/dist/{skill-installer-DkRJ6oLi.mjs → skill-installer-BBgN2tzW.mjs} +2 -2
- package/dist/{skills-sync.handler-C4ztv1Vu.mjs → skills-sync.handler-DOxudKmV.mjs} +3 -3
- package/dist/{skills.command-DuL4kLUi.mjs → skills.command-DQc_qGAF.mjs} +5 -5
- package/dist/{skills.handler-R5KAbioE.mjs → skills.handler-Do9I3dQS.mjs} +1 -1
- package/dist/{source-analysis-BBg2E_6G-BQqm16RR.mjs → source-analysis-BBg2E_6G-Ut7kYHOz.mjs} +4 -4
- package/dist/{spinner-progress-DfkMzwGx.mjs → spinner-progress-Bx-fYItP.mjs} +1 -1
- package/dist/{src-BQdOWkyv.mjs → src-0XVwHXNp.mjs} +1 -1
- package/dist/{status.handler-DxCJRm1n.mjs → status.handler-BsVtDW_V.mjs} +19 -4
- package/dist/{switch.handler-CTwhIcaQ.mjs → switch.handler-CCjMrRZN.mjs} +5 -5
- package/dist/{sync-Pssitj6K.mjs → sync-BdTQDZjP.mjs} +2 -2
- package/dist/{sync.handler-Be0U3x-n.mjs → sync.handler-DjY8nqbB.mjs} +9 -9
- package/dist/{task-BNXDZU71.mjs → task-BRmL2lmw.mjs} +2 -2
- package/dist/{task-target-build-BG6cC3bz.mjs → task-target-build-DCV0UDaz.mjs} +8 -7
- package/dist/{task-target-deploy-CZBGNC0H-Ck724yF4.mjs → task-target-deploy-CZBGNC0H-I-tvkGCC.mjs} +1 -1
- package/dist/{task-target-deploy-gMQC8kXU.mjs → task-target-deploy-DmpCWE3u.mjs} +1 -1
- package/dist/task-target-deploy-runner.mjs +22 -17
- package/dist/{test-CKBpp1gg.mjs → test-TTQXrhHm.mjs} +4 -4
- package/dist/{test.handler-DkizZhVu.mjs → test.handler-B7Ahe9ta.mjs} +12 -12
- package/dist/{test.handler-Dk3CmTa7.mjs → test.handler-CkkplyX6.mjs} +2 -2
- package/dist/{tool.handler--IzRGelu.mjs → tool.handler-DMfFZCRg.mjs} +34 -14
- package/dist/{trigger-artifacts-RizI57RC-CxHwCkQ_.mjs → trigger-artifacts-RizI57RC-DjhOsdOm.mjs} +4 -4
- package/dist/{trigger-manifest-PTjVYL1r.mjs → trigger-manifest-DxdCjGz_.mjs} +1 -1
- package/dist/{upgrade-cH9I_pZq.mjs → upgrade-Cx-bUWUc.mjs} +2 -2
- package/dist/{upgrade.handler-CXEF4ue0.mjs → upgrade.handler-5qSzPC7D.mjs} +1 -1
- package/dist/{upload.handler-CpKuAaQ_.mjs → upload.handler-_d2WZwxd.mjs} +10 -10
- package/dist/{users.get.handler-D0WO6D1K.mjs → users.get.handler-DIooG7Wy.mjs} +4 -4
- package/dist/{users.list.handler-BSTIniF1.mjs → users.list.handler-DdGW-DSg.mjs} +4 -4
- package/dist/{users.set-role.handler-DAKdSkbn.mjs → users.set-role.handler-Ek-kntLp.mjs} +4 -4
- package/dist/{utils-VC0Vl_pm.mjs → utils-BMUWnz1P.mjs} +2 -2
- package/dist/{validate.handler-I8LY-UkG.mjs → validate.handler-Cq2uJjXY.mjs} +8 -8
- package/dist/{workflow-build-C9rQQ4qU.mjs → workflow-build-C8AiYxqp.mjs} +23 -23
- package/dist/{workflow-build-manifest-OPFqFD6f.mjs → workflow-build-manifest-BKKW9D05.mjs} +3 -3
- package/dist/{workflow-bundler-BzHk73PM-AIB4-u4Y.mjs → workflow-bundler-BzHk73PM-WI31RJjH.mjs} +3 -3
- package/dist/{workflows-CL1jYSLR.mjs → workflows-K6zetcqI.mjs} +16 -16
- package/dist/{writer-B-SpZ0G2-olEAgSLc.mjs → writer-B-SpZ0G2-CLh7sXRd.mjs} +6 -6
- package/package.json +5 -5
- package/dist/clear.handler-Dpe05eTq.mjs +0 -42
- package/dist/dist-BF6r1hfv.mjs +0 -308
- package/dist/integrations-DKtl_aES.mjs +0 -85
- package/dist/logs-DUwdYZB-.mjs +0 -28
- package/dist/logs.handler-dcRq-zoc.mjs +0 -35
- package/dist/{agent-bundle-package-DWV6B_5q-rRTPU13L.mjs → agent-bundle-package-DWV6B_5q-FPT0bJaA.mjs} +0 -0
- package/dist/{agent-manifest-CZdlCTFs.mjs → agent-manifest-tIsqF2OP.mjs} +0 -0
- package/dist/{browser-3cUiPlk2.mjs → browser-BpJ8ut9z.mjs} +0 -0
- package/dist/{common-BaGFkj3n.mjs → common-AK0q0Oz0.mjs} +0 -0
- package/dist/{concurrency-gXn9Rw8x-BI6HQNfC.mjs → concurrency-gXn9Rw8x-BTlfau8D.mjs} +0 -0
- package/dist/{cron-parser-C2eJD0yD.mjs → cron-parser-Dw_cWzFu.mjs} +0 -0
- package/dist/{declared-credential-requirements-B6h4WRv4.mjs → declared-credential-requirements-D6KT-r-e.mjs} +0 -0
- package/dist/{layout-CXkZEsXI.mjs → layout-P1v-Gssz.mjs} +0 -0
- package/dist/{metadata-layout-Bv-B0nHj-CqlcZz_g.mjs → metadata-layout-Bv-B0nHj-B1c5giJ7.mjs} +1 -1
- package/dist/{oxc-B3KI3rf_-DdiZWqe2.mjs → oxc-B3KI3rf_-Cvx4Z-4H.mjs} +0 -0
- package/dist/{project-config-CsBMT4TL.mjs → project-config-DudGRFPO.mjs} +1 -1
- package/dist/{read-credential-keys-77a91T8M-DMmY6oDW.mjs → read-credential-keys-77a91T8M-B0eiobOd.mjs} +0 -0
- package/dist/{rolldown-runtime-twds-ZHy-CO5ir_za.mjs → rolldown-runtime-twds-ZHy-8uqgIurC.mjs} +0 -0
- package/dist/{run-polling-CwlzB5-9.mjs → run-polling-DARidqo-.mjs} +0 -0
- package/dist/{schema-O9xTWad_.mjs → schema-BjH_e4Fo.mjs} +0 -0
- package/dist/{schema-_FQrHcIS.mjs → schema-Lbp5lGJu.mjs} +0 -0
- package/dist/{schema-display-CNqiYBIb.mjs → schema-display-NVEl_DFY.mjs} +0 -0
- package/dist/{source-analysis-CJPymdaA.mjs → source-analysis-Cs0CTBQk.mjs} +0 -0
- package/dist/{types-D04ah3uY.mjs → types-BMBuhHhW.mjs} +0 -0
- package/dist/{upload-wwSPAC5_.mjs → upload-BbcMkyVl.mjs} +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
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-
|
|
5
|
-
import { n as SHA256HashSchema, t as JsonSchemaSchema } from "./common-
|
|
6
|
-
import { c as TriggerUploadDataSchema } from "./credential-requirements-
|
|
7
|
-
import { a as FlowGraphSchema, r as WorkflowBuildManifestSchema } from "./workflow-build-manifest-
|
|
3
|
+
import { n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-BWcVRt-T.mjs";
|
|
4
|
+
import { t as createTypedCommand } from "./commander-C5qcOo8m.mjs";
|
|
5
|
+
import { n as SHA256HashSchema, t as JsonSchemaSchema } from "./common-AK0q0Oz0.mjs";
|
|
6
|
+
import { c as TriggerUploadDataSchema } from "./credential-requirements-Ob-7H-0F.mjs";
|
|
7
|
+
import { a as FlowGraphSchema, r as WorkflowBuildManifestSchema } from "./workflow-build-manifest-BKKW9D05.mjs";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
const GitProviderSchema = z.enum(["codestorage", "github"]);
|
|
10
10
|
const GitTreeEntryTypeSchema = z.enum(["file", "directory"]);
|
|
@@ -320,7 +320,7 @@ function createWorkflowsBuildCommand() {
|
|
|
320
320
|
description: "Build workflows locally",
|
|
321
321
|
schema: WorkflowsBuildOptionsSchema,
|
|
322
322
|
optionsConfig: BUILD_OPTIONS_CONFIG,
|
|
323
|
-
loadHandler: async () => (await import("./build.handler-
|
|
323
|
+
loadHandler: async () => (await import("./build.handler-DJrEMCBw.mjs")).handleWorkflowsBuild
|
|
324
324
|
});
|
|
325
325
|
}
|
|
326
326
|
//#endregion
|
|
@@ -347,7 +347,7 @@ function createWorkflowsDiffCommand() {
|
|
|
347
347
|
description: "Authored workflow id (preferred) or workflow name",
|
|
348
348
|
key: "workflow"
|
|
349
349
|
},
|
|
350
|
-
loadHandler: async () => (await import("./diff.handler-
|
|
350
|
+
loadHandler: async () => (await import("./diff.handler-DUVFixeG.mjs")).handleWorkflowsDiff
|
|
351
351
|
});
|
|
352
352
|
}
|
|
353
353
|
//#endregion
|
|
@@ -380,7 +380,7 @@ function createWorkflowsEnvCommand() {
|
|
|
380
380
|
key: "workflow",
|
|
381
381
|
required: false
|
|
382
382
|
},
|
|
383
|
-
loadHandler: async () => (await import("./env.handler-
|
|
383
|
+
loadHandler: async () => (await import("./env.handler-C8kNFz2U.mjs")).handleWorkflowsEnv
|
|
384
384
|
});
|
|
385
385
|
}
|
|
386
386
|
//#endregion
|
|
@@ -412,7 +412,7 @@ function createWorkflowsInspectCommand() {
|
|
|
412
412
|
description: "Authored workflow id (preferred) or workflow name",
|
|
413
413
|
key: "workflow"
|
|
414
414
|
},
|
|
415
|
-
loadHandler: async () => (await import("./inspect.handler-
|
|
415
|
+
loadHandler: async () => (await import("./inspect.handler-QyTo8rWO.mjs")).handleWorkflowsInspect
|
|
416
416
|
});
|
|
417
417
|
}
|
|
418
418
|
//#endregion
|
|
@@ -508,7 +508,7 @@ function createWorkflowsLogsCommand() {
|
|
|
508
508
|
key: "workflow",
|
|
509
509
|
required: false
|
|
510
510
|
},
|
|
511
|
-
loadHandler: async () => (await import("./logs.handler-
|
|
511
|
+
loadHandler: async () => (await import("./logs.handler-BIegqc2p.mjs")).handleWorkflowsLogs
|
|
512
512
|
});
|
|
513
513
|
}
|
|
514
514
|
//#endregion
|
|
@@ -698,7 +698,7 @@ function createWorkflowsPausedCommand() {
|
|
|
698
698
|
key: "workflow",
|
|
699
699
|
required: false
|
|
700
700
|
},
|
|
701
|
-
loadHandler: async () => (await import("./paused.handler-
|
|
701
|
+
loadHandler: async () => (await import("./paused.handler-DAZ1EaLN.mjs")).handleWorkflowsPaused
|
|
702
702
|
});
|
|
703
703
|
}
|
|
704
704
|
//#endregion
|
|
@@ -792,7 +792,7 @@ function createWorkflowsRunCommand() {
|
|
|
792
792
|
key: "payload",
|
|
793
793
|
required: false
|
|
794
794
|
}],
|
|
795
|
-
loadHandler: async () => (await import("./run.handler-
|
|
795
|
+
loadHandler: async () => (await import("./run.handler-BpLmwF_a.mjs")).handleWorkflowsRun
|
|
796
796
|
});
|
|
797
797
|
}
|
|
798
798
|
//#endregion
|
|
@@ -847,7 +847,7 @@ function createWorkflowsTestCommand() {
|
|
|
847
847
|
description: "Authored workflow id (preferred) or workflow name. Multiple workflows with the same name run sequentially.",
|
|
848
848
|
key: "workflow"
|
|
849
849
|
},
|
|
850
|
-
loadHandler: async () => (await import("./test.handler-
|
|
850
|
+
loadHandler: async () => (await import("./test.handler-B7Ahe9ta.mjs")).handleWorkflowsTest
|
|
851
851
|
});
|
|
852
852
|
}
|
|
853
853
|
//#endregion
|
|
@@ -885,7 +885,7 @@ function createWorkflowsValidateCommand() {
|
|
|
885
885
|
key: "workflow",
|
|
886
886
|
required: false
|
|
887
887
|
},
|
|
888
|
-
loadHandler: async () => (await import("./validate.handler-
|
|
888
|
+
loadHandler: async () => (await import("./validate.handler-Cq2uJjXY.mjs")).handleWorkflowsValidate
|
|
889
889
|
});
|
|
890
890
|
}
|
|
891
891
|
//#endregion
|
|
@@ -904,14 +904,14 @@ function createWorkflowsCommand() {
|
|
|
904
904
|
description: "Manage, run, inspect, and debug workflows",
|
|
905
905
|
schema: WorkflowsOptionsSchema,
|
|
906
906
|
optionsConfig: WORKFLOWS_OPTIONS_CONFIG,
|
|
907
|
-
loadHandler: async () => (await import("./
|
|
907
|
+
loadHandler: async () => (await import("./list.handler-tnsRn-Rj.mjs")).handleWorkflowsList,
|
|
908
908
|
subcommands: [
|
|
909
909
|
createTypedCommand({
|
|
910
910
|
name: "list",
|
|
911
911
|
description: "List all workflows in the project",
|
|
912
912
|
schema: WorkflowsOptionsSchema,
|
|
913
913
|
optionsConfig: WORKFLOWS_OPTIONS_CONFIG,
|
|
914
|
-
loadHandler: async () => (await import("./
|
|
914
|
+
loadHandler: async () => (await import("./list.handler-tnsRn-Rj.mjs")).handleWorkflowsList
|
|
915
915
|
}),
|
|
916
916
|
createWorkflowsBuildCommand(),
|
|
917
917
|
createWorkflowsTestCommand(),
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { n as __exportAll } from "./chunk-CH6r78ws.mjs";
|
|
4
|
-
import { f as getTriggersDir, n as BUILD_OUTPUT_DIR_NAME, p as getWorkflowArtifactPaths, t as BUILD_DIR_NAME } from "./layout-
|
|
5
|
-
import { t as TriggerBuildManifestSchema } from "./trigger-manifest-
|
|
6
|
-
import { t as __exportAll$1 } from "./rolldown-runtime-twds-ZHy-
|
|
7
|
-
import { s as sha256String } from "./metadata-layout-Bv-B0nHj-
|
|
8
|
-
import { t as runWithConcurrency } from "./concurrency-gXn9Rw8x-
|
|
9
|
-
import { access, mkdir, readdir, rm, stat, writeFile } from "node:fs/promises";
|
|
4
|
+
import { f as getTriggersDir, n as BUILD_OUTPUT_DIR_NAME, p as getWorkflowArtifactPaths, t as BUILD_DIR_NAME } from "./layout-P1v-Gssz.mjs";
|
|
5
|
+
import { t as TriggerBuildManifestSchema } from "./trigger-manifest-DxdCjGz_.mjs";
|
|
6
|
+
import { t as __exportAll$1 } from "./rolldown-runtime-twds-ZHy-8uqgIurC.mjs";
|
|
7
|
+
import { s as sha256String } from "./metadata-layout-Bv-B0nHj-B1c5giJ7.mjs";
|
|
8
|
+
import { t as runWithConcurrency } from "./concurrency-gXn9Rw8x-BTlfau8D.mjs";
|
|
10
9
|
import path from "node:path";
|
|
10
|
+
import { access, mkdir, readdir, rm, stat, writeFile } from "node:fs/promises";
|
|
11
11
|
import { createHash } from "node:crypto";
|
|
12
12
|
//#region ../../packages/workflow-builder/dist/writer-B-SpZ0G2.mjs
|
|
13
13
|
var writer_B_SpZ0G2_exports = /* @__PURE__ */ __exportAll({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keystrokehq/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Command-line interface for creating, managing, and deploying Keystroke automations.",
|
|
6
6
|
"type": "module",
|
|
@@ -42,16 +42,16 @@
|
|
|
42
42
|
"@keystroke/env-utils": "0.0.0",
|
|
43
43
|
"@keystroke/local-memory": "0.0.0",
|
|
44
44
|
"@keystrokehq/config": "0.0.2",
|
|
45
|
+
"@keystroke/shared-types": "0.0.3",
|
|
45
46
|
"@keystroke/test-utils": "0.0.2",
|
|
46
47
|
"@keystroke/typescript-config": "0.0.0",
|
|
47
|
-
"@keystroke/shared-types": "0.0.3",
|
|
48
48
|
"@keystroke/utils": "0.0.0",
|
|
49
49
|
"@keystroke/workflow-builder": "0.0.5",
|
|
50
50
|
"@keystrokehq/core": "0.0.6",
|
|
51
|
-
"@keystrokehq/
|
|
52
|
-
"@keystroke/workflow-deploy": "0.0.4",
|
|
51
|
+
"@keystrokehq/testing": "0.2.1",
|
|
53
52
|
"@keystroke/workflow-sdk": "0.0.2",
|
|
54
|
-
"@
|
|
53
|
+
"@keystroke/workflow-deploy": "0.0.4",
|
|
54
|
+
"@keystrokehq/workflow-build-contracts": "0.0.2"
|
|
55
55
|
},
|
|
56
56
|
"keywords": [
|
|
57
57
|
"automation",
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { h as AUTH_HINT, n as ui, u as logger, x as toErrorMessage } from "./keystroke.mjs";
|
|
4
|
-
import { c as removeOrgCredentials, r as deleteStoredCredentials } from "./dist-BF6r1hfv.mjs";
|
|
5
|
-
import { createClient } from "./src-BQdOWkyv.mjs";
|
|
6
|
-
//#region src/commands/auth/clear.handler.ts
|
|
7
|
-
async function tryRevokeKey(apiKey, apiKeyId, baseUrl, organizationId) {
|
|
8
|
-
try {
|
|
9
|
-
await createClient({
|
|
10
|
-
apiKey,
|
|
11
|
-
baseUrl,
|
|
12
|
-
organizationId
|
|
13
|
-
}).public.auth.revoke({ apiKeyId });
|
|
14
|
-
logger.info("API key revoked on server", { apiKeyId });
|
|
15
|
-
} catch (error) {
|
|
16
|
-
logger.error("Failed to revoke API key on server", { error: toErrorMessage(error) });
|
|
17
|
-
ui.warn(`Could not revoke API key on server: ${toErrorMessage(error)}`);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
async function handleAuthClear(_options, ctx) {
|
|
21
|
-
const creds = ctx.storedCredentials;
|
|
22
|
-
if (!creds || creds.orgs.length === 0) {
|
|
23
|
-
if (await deleteStoredCredentials()) ui.success("Local credentials removed.");
|
|
24
|
-
else ui.text(`No credentials found. ${AUTH_HINT}`);
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
if (ctx.organizationId && ctx.orgSource === "flag") {
|
|
28
|
-
const removed = await removeOrgCredentials(ctx.organizationId);
|
|
29
|
-
if (!removed) {
|
|
30
|
-
ui.warn(`No stored credentials for organization ${ctx.organizationId}.`);
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
if (removed.apiKeyId && creds.serverUrl) await tryRevokeKey(removed.apiKey, removed.apiKeyId, creds.serverUrl, removed.organizationId);
|
|
34
|
-
ui.success(`Credentials removed for ${removed.organizationName}.`);
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
for (const org of creds.orgs) if (org.apiKeyId && creds.serverUrl) await tryRevokeKey(org.apiKey, org.apiKeyId, creds.serverUrl, org.organizationId);
|
|
38
|
-
await deleteStoredCredentials();
|
|
39
|
-
ui.success("All local credentials removed.");
|
|
40
|
-
}
|
|
41
|
-
//#endregion
|
|
42
|
-
export { handleAuthClear };
|
package/dist/dist-BF6r1hfv.mjs
DELETED
|
@@ -1,308 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import * as fs$1 from "node:fs/promises";
|
|
4
|
-
import * as os from "node:os";
|
|
5
|
-
import * as path$1 from "node:path";
|
|
6
|
-
import { z } from "zod";
|
|
7
|
-
//#region ../../packages/local-memory/dist/index.mjs
|
|
8
|
-
const KEYSTROKE_CREDENTIALS_DIR = ".keystroke";
|
|
9
|
-
const KEYSTROKE_CREDENTIALS_FILE = "credentials.json";
|
|
10
|
-
const credentialUserSchema = z.object({
|
|
11
|
-
id: z.string().min(1),
|
|
12
|
-
email: z.email(),
|
|
13
|
-
name: z.string().optional()
|
|
14
|
-
});
|
|
15
|
-
const storedCredentialsSchemaV1 = z.object({
|
|
16
|
-
version: z.literal(1),
|
|
17
|
-
apiKey: z.string().min(1),
|
|
18
|
-
apiKeyId: z.uuid().optional(),
|
|
19
|
-
serverUrl: z.url(),
|
|
20
|
-
webUrl: z.url(),
|
|
21
|
-
createdAt: z.string().min(1),
|
|
22
|
-
organizationId: z.uuid().optional(),
|
|
23
|
-
organizationName: z.string().optional(),
|
|
24
|
-
user: credentialUserSchema.optional()
|
|
25
|
-
});
|
|
26
|
-
const orgEntrySchema = z.object({
|
|
27
|
-
organizationId: z.uuid(),
|
|
28
|
-
organizationName: z.string().min(1),
|
|
29
|
-
apiKey: z.string().min(1),
|
|
30
|
-
apiKeyId: z.uuid().optional(),
|
|
31
|
-
createdAt: z.string().min(1)
|
|
32
|
-
});
|
|
33
|
-
const storedCredentialsSchema = z.object({
|
|
34
|
-
version: z.literal(2),
|
|
35
|
-
serverUrl: z.url(),
|
|
36
|
-
webUrl: z.url(),
|
|
37
|
-
user: credentialUserSchema.optional(),
|
|
38
|
-
activeOrgId: z.uuid().optional(),
|
|
39
|
-
orgs: z.array(orgEntrySchema)
|
|
40
|
-
});
|
|
41
|
-
function getCredentialsDirPath(homeDir = os.homedir()) {
|
|
42
|
-
return path$1.join(homeDir, KEYSTROKE_CREDENTIALS_DIR);
|
|
43
|
-
}
|
|
44
|
-
function getCredentialsFilePath(homeDir = os.homedir()) {
|
|
45
|
-
return path$1.join(getCredentialsDirPath(homeDir), KEYSTROKE_CREDENTIALS_FILE);
|
|
46
|
-
}
|
|
47
|
-
function migrateV1ToV2(v1) {
|
|
48
|
-
const orgs = [];
|
|
49
|
-
if (v1.organizationId && v1.apiKey) orgs.push({
|
|
50
|
-
organizationId: v1.organizationId,
|
|
51
|
-
organizationName: v1.organizationName ?? "Unknown",
|
|
52
|
-
apiKey: v1.apiKey,
|
|
53
|
-
apiKeyId: v1.apiKeyId,
|
|
54
|
-
createdAt: v1.createdAt
|
|
55
|
-
});
|
|
56
|
-
return {
|
|
57
|
-
version: 2,
|
|
58
|
-
serverUrl: v1.serverUrl,
|
|
59
|
-
webUrl: v1.webUrl,
|
|
60
|
-
user: v1.user,
|
|
61
|
-
activeOrgId: v1.organizationId,
|
|
62
|
-
orgs
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
async function readStoredCredentials(filePath = getCredentialsFilePath()) {
|
|
66
|
-
try {
|
|
67
|
-
const raw = await fs$1.readFile(filePath, "utf-8");
|
|
68
|
-
const parsed = JSON.parse(raw);
|
|
69
|
-
const v2 = storedCredentialsSchema.safeParse(parsed);
|
|
70
|
-
if (v2.success) return v2.data;
|
|
71
|
-
const v1 = storedCredentialsSchemaV1.safeParse(parsed);
|
|
72
|
-
if (v1.success) return migrateV1ToV2(v1.data);
|
|
73
|
-
throw new Error(`Invalid credentials file: ${filePath}`);
|
|
74
|
-
} catch (error) {
|
|
75
|
-
if (error.code === "ENOENT") return null;
|
|
76
|
-
throw error;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
async function deleteStoredCredentials(filePath = getCredentialsFilePath()) {
|
|
80
|
-
try {
|
|
81
|
-
await fs$1.unlink(filePath);
|
|
82
|
-
return true;
|
|
83
|
-
} catch (error) {
|
|
84
|
-
if (error.code === "ENOENT") return false;
|
|
85
|
-
throw error;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
async function writeStoredCredentials(credentials, filePath = getCredentialsFilePath()) {
|
|
89
|
-
const parsed = storedCredentialsSchema.parse(credentials);
|
|
90
|
-
await fs$1.mkdir(path$1.dirname(filePath), { recursive: true });
|
|
91
|
-
await fs$1.writeFile(filePath, `${JSON.stringify(parsed, null, 2)}\n`, { mode: 384 });
|
|
92
|
-
try {
|
|
93
|
-
await fs$1.chmod(filePath, 384);
|
|
94
|
-
} catch {}
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Adds or replaces an org entry in stored credentials. Sets it as the active org.
|
|
98
|
-
* Creates the credentials file if it doesn't exist (requires shared fields).
|
|
99
|
-
*/
|
|
100
|
-
async function upsertOrgCredentials(params, filePath = getCredentialsFilePath()) {
|
|
101
|
-
const existing = await readStoredCredentials(filePath);
|
|
102
|
-
if (existing) {
|
|
103
|
-
const orgs = existing.orgs.filter((o) => o.organizationId !== params.orgEntry.organizationId);
|
|
104
|
-
orgs.push(params.orgEntry);
|
|
105
|
-
await writeStoredCredentials({
|
|
106
|
-
...existing,
|
|
107
|
-
serverUrl: params.serverUrl,
|
|
108
|
-
webUrl: params.webUrl,
|
|
109
|
-
user: params.user ?? existing.user,
|
|
110
|
-
activeOrgId: params.orgEntry.organizationId,
|
|
111
|
-
orgs
|
|
112
|
-
}, filePath);
|
|
113
|
-
} else await writeStoredCredentials({
|
|
114
|
-
version: 2,
|
|
115
|
-
serverUrl: params.serverUrl,
|
|
116
|
-
webUrl: params.webUrl,
|
|
117
|
-
user: params.user,
|
|
118
|
-
activeOrgId: params.orgEntry.organizationId,
|
|
119
|
-
orgs: [params.orgEntry]
|
|
120
|
-
}, filePath);
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Sets the active org. Validates the org exists in the stored orgs array.
|
|
124
|
-
* @throws Error if no stored credentials or org not found
|
|
125
|
-
*/
|
|
126
|
-
async function setActiveOrg(orgId, filePath = getCredentialsFilePath()) {
|
|
127
|
-
const existing = await readStoredCredentials(filePath);
|
|
128
|
-
if (!existing) throw new Error("No stored credentials found. Run `keystroke auth` first.");
|
|
129
|
-
if (!existing.orgs.find((o) => o.organizationId === orgId)) throw new Error(`No stored API key for organization ${orgId}. Run \`keystroke auth\` to add credentials for this org.`);
|
|
130
|
-
await writeStoredCredentials({
|
|
131
|
-
...existing,
|
|
132
|
-
activeOrgId: orgId
|
|
133
|
-
}, filePath);
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Removes a single org entry from stored credentials.
|
|
137
|
-
* If it was the active org, clears activeOrgId (falls back to first remaining org).
|
|
138
|
-
* Returns the removed entry (for key revocation), or null if not found.
|
|
139
|
-
*/
|
|
140
|
-
async function removeOrgCredentials(orgId, filePath = getCredentialsFilePath()) {
|
|
141
|
-
const existing = await readStoredCredentials(filePath);
|
|
142
|
-
if (!existing) return null;
|
|
143
|
-
const removed = existing.orgs.find((o) => o.organizationId === orgId);
|
|
144
|
-
if (!removed) return null;
|
|
145
|
-
const remainingOrgs = existing.orgs.filter((o) => o.organizationId !== orgId);
|
|
146
|
-
if (remainingOrgs.length === 0) {
|
|
147
|
-
await deleteStoredCredentials(filePath);
|
|
148
|
-
return removed;
|
|
149
|
-
}
|
|
150
|
-
const newActiveId = existing.activeOrgId === orgId ? remainingOrgs[0]?.organizationId : existing.activeOrgId;
|
|
151
|
-
await writeStoredCredentials({
|
|
152
|
-
...existing,
|
|
153
|
-
orgs: remainingOrgs,
|
|
154
|
-
activeOrgId: newActiveId
|
|
155
|
-
}, filePath);
|
|
156
|
-
return removed;
|
|
157
|
-
}
|
|
158
|
-
function toErrorMessage(error) {
|
|
159
|
-
return error instanceof Error ? error.message : String(error);
|
|
160
|
-
}
|
|
161
|
-
function findActiveOrg(creds) {
|
|
162
|
-
if (!creds.activeOrgId) return creds.orgs[0];
|
|
163
|
-
return creds.orgs.find((o) => o.organizationId === creds.activeOrgId) ?? creds.orgs[0];
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Resolves API auth options using explicit overrides first, then ~/.keystroke credentials.
|
|
167
|
-
* When a logger is provided, it emits consistent fallback/read diagnostics.
|
|
168
|
-
*/
|
|
169
|
-
async function resolveAuthOptions(input) {
|
|
170
|
-
const credentialsPath = input.credentialsPath ?? getCredentialsFilePath();
|
|
171
|
-
let storedCredentials = null;
|
|
172
|
-
try {
|
|
173
|
-
storedCredentials = await readStoredCredentials(credentialsPath);
|
|
174
|
-
} catch (error) {
|
|
175
|
-
input.logger?.warn(`Could not read saved credentials from ${credentialsPath}: ${toErrorMessage(error)}`);
|
|
176
|
-
}
|
|
177
|
-
const activeOrg = storedCredentials ? findActiveOrg(storedCredentials) : void 0;
|
|
178
|
-
const apiKey = input.apiKey ?? activeOrg?.apiKey;
|
|
179
|
-
const serverUrl = input.serverUrl ?? storedCredentials?.serverUrl;
|
|
180
|
-
if (!input.apiKey && activeOrg?.apiKey) input.logger?.info(`Using saved API key from ${credentialsPath}`);
|
|
181
|
-
if (!input.serverUrl && storedCredentials?.serverUrl) input.logger?.info(`Using saved API URL from ${credentialsPath}`);
|
|
182
|
-
return {
|
|
183
|
-
apiKey,
|
|
184
|
-
serverUrl,
|
|
185
|
-
credentialsPath,
|
|
186
|
-
storedCredentials,
|
|
187
|
-
activeOrg
|
|
188
|
-
};
|
|
189
|
-
}
|
|
190
|
-
const KEYSTROKE_LOGS_DIR = "logs";
|
|
191
|
-
const KEYSTROKE_LOG_FILE = "cli.jsonl";
|
|
192
|
-
function getLogFilePath(homeDir = os.homedir()) {
|
|
193
|
-
return path$1.join(homeDir, KEYSTROKE_CREDENTIALS_DIR, KEYSTROKE_LOGS_DIR, KEYSTROKE_LOG_FILE);
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* Reads the last `count` lines from the log file as raw strings.
|
|
197
|
-
* Returns an empty array if the file does not exist.
|
|
198
|
-
*/
|
|
199
|
-
async function readLogFile(count = 100, homeDir = os.homedir()) {
|
|
200
|
-
const filePath = getLogFilePath(homeDir);
|
|
201
|
-
let content;
|
|
202
|
-
try {
|
|
203
|
-
content = await fs$1.readFile(filePath, "utf-8");
|
|
204
|
-
} catch {
|
|
205
|
-
return [];
|
|
206
|
-
}
|
|
207
|
-
const lines = content.split("\n");
|
|
208
|
-
if (lines.length > 0 && lines[lines.length - 1] === "") lines.pop();
|
|
209
|
-
return lines.slice(-count);
|
|
210
|
-
}
|
|
211
|
-
/**
|
|
212
|
-
* Deletes the log file. Returns true if the file existed and was deleted,
|
|
213
|
-
* false if it did not exist.
|
|
214
|
-
*/
|
|
215
|
-
async function clearLogFile(homeDir = os.homedir()) {
|
|
216
|
-
const filePath = getLogFilePath(homeDir);
|
|
217
|
-
try {
|
|
218
|
-
await fs$1.unlink(filePath);
|
|
219
|
-
return true;
|
|
220
|
-
} catch (err) {
|
|
221
|
-
if (err.code === "ENOENT") return false;
|
|
222
|
-
throw err;
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
const KEYSTROKE_PROJECTS_FILE = "projects.json";
|
|
226
|
-
const projectEntrySchema = z.object({
|
|
227
|
-
lastAccessed: z.string().min(1),
|
|
228
|
-
name: z.string().min(1).optional()
|
|
229
|
-
});
|
|
230
|
-
const storedProjectsSchema = z.object({
|
|
231
|
-
version: z.literal(1),
|
|
232
|
-
projects: z.record(z.string(), projectEntrySchema),
|
|
233
|
-
lastProject: z.string().optional()
|
|
234
|
-
});
|
|
235
|
-
function getProjectsFilePath(homeDir = os.homedir()) {
|
|
236
|
-
return path$1.join(homeDir, KEYSTROKE_CREDENTIALS_DIR, KEYSTROKE_PROJECTS_FILE);
|
|
237
|
-
}
|
|
238
|
-
async function readStoredProjects(filePath = getProjectsFilePath()) {
|
|
239
|
-
try {
|
|
240
|
-
const raw = await fs$1.readFile(filePath, "utf-8");
|
|
241
|
-
const parsed = JSON.parse(raw);
|
|
242
|
-
const result = storedProjectsSchema.safeParse(parsed);
|
|
243
|
-
if (!result.success) return null;
|
|
244
|
-
return result.data;
|
|
245
|
-
} catch (error) {
|
|
246
|
-
if (error.code === "ENOENT") return null;
|
|
247
|
-
if (error instanceof SyntaxError) return null;
|
|
248
|
-
throw error;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
async function writeStoredProjects(projects, filePath = getProjectsFilePath()) {
|
|
252
|
-
const parsed = storedProjectsSchema.parse(projects);
|
|
253
|
-
await fs$1.mkdir(path$1.dirname(filePath), { recursive: true });
|
|
254
|
-
await fs$1.writeFile(filePath, `${JSON.stringify(parsed, null, 2)}\n`);
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* Upsert a project entry. Fire-and-forget safe — catches all errors internally.
|
|
258
|
-
* Never throws. Call without `await` if you don't need to wait.
|
|
259
|
-
*/
|
|
260
|
-
async function trackProject(projectPath, options) {
|
|
261
|
-
const filePath = options?.filePath ?? getProjectsFilePath();
|
|
262
|
-
const absolutePath = path$1.resolve(projectPath);
|
|
263
|
-
try {
|
|
264
|
-
const data = await readStoredProjects(filePath) ?? {
|
|
265
|
-
version: 1,
|
|
266
|
-
projects: {}
|
|
267
|
-
};
|
|
268
|
-
const previousEntry = data.projects[absolutePath];
|
|
269
|
-
const entry = {
|
|
270
|
-
lastAccessed: (/* @__PURE__ */ new Date()).toISOString(),
|
|
271
|
-
...options?.name ? { name: options.name } : previousEntry?.name ? { name: previousEntry.name } : {}
|
|
272
|
-
};
|
|
273
|
-
data.projects[absolutePath] = entry;
|
|
274
|
-
data.lastProject = absolutePath;
|
|
275
|
-
await writeStoredProjects(data, filePath);
|
|
276
|
-
} catch {}
|
|
277
|
-
}
|
|
278
|
-
/**
|
|
279
|
-
* Clears the stored projects file (projects.json). Returns true if the file
|
|
280
|
-
* existed and was deleted, false if it did not exist.
|
|
281
|
-
*/
|
|
282
|
-
async function clearStoredProjects(filePath = getProjectsFilePath()) {
|
|
283
|
-
try {
|
|
284
|
-
await fs$1.unlink(filePath);
|
|
285
|
-
return true;
|
|
286
|
-
} catch (error) {
|
|
287
|
-
if (error.code === "ENOENT") return false;
|
|
288
|
-
throw error;
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
/** Base directory name for all Keystroke local storage (user and project-local). */
|
|
292
|
-
const KEYSTROKE_DIR = KEYSTROKE_CREDENTIALS_DIR;
|
|
293
|
-
/**
|
|
294
|
-
* Returns the Keystroke temp directory path.
|
|
295
|
-
*
|
|
296
|
-
* - `getKeystrokeTmpDir({ projectRoot })` → `projectRoot/.keystroke/tmp` — for build
|
|
297
|
-
* artifacts that require module resolution from the project (workflow-builder).
|
|
298
|
-
* - `getKeystrokeTmpDir()` → `~/.keystroke/tmp` — for general temporary storage.
|
|
299
|
-
*
|
|
300
|
-
* Callers must create the directory (e.g. `mkdir(path, { recursive: true })`)
|
|
301
|
-
* before use.
|
|
302
|
-
*/
|
|
303
|
-
function getKeystrokeTmpDir(options) {
|
|
304
|
-
const baseDir = options?.projectRoot ? path$1.resolve(options.projectRoot) : os.homedir();
|
|
305
|
-
return path$1.join(baseDir, KEYSTROKE_DIR, "tmp");
|
|
306
|
-
}
|
|
307
|
-
//#endregion
|
|
308
|
-
export { getKeystrokeTmpDir as a, removeOrgCredentials as c, trackProject as d, upsertOrgCredentials as f, getCredentialsFilePath as i, resolveAuthOptions as l, clearStoredProjects as n, readLogFile as o, deleteStoredCredentials as r, readStoredProjects as s, clearLogFile as t, setActiveOrg as u };
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-CGdYhH0p.mjs";
|
|
4
|
-
import { t as createTypedCommand } from "./commander-D15UZVjp.mjs";
|
|
5
|
-
import { t as ConnectionKindValues } from "./api-jkf0TTgD.mjs";
|
|
6
|
-
import { z } from "zod";
|
|
7
|
-
//#region src/commands/integrations/integrations.command.ts
|
|
8
|
-
const IntegrationsListOptionsSchema = JsonOptionSchema.extend({
|
|
9
|
-
kind: z.enum(ConnectionKindValues).optional(),
|
|
10
|
-
search: z.string().optional(),
|
|
11
|
-
connected: z.boolean().optional(),
|
|
12
|
-
details: z.boolean().optional()
|
|
13
|
-
});
|
|
14
|
-
const INTEGRATIONS_LIST_OPTIONS_CONFIG = {
|
|
15
|
-
...JSON_OPTION_CONFIG,
|
|
16
|
-
kind: {
|
|
17
|
-
flag: "--kind <kind>",
|
|
18
|
-
description: `Filter by connection kind: ${ConnectionKindValues.join(" | ")}`
|
|
19
|
-
},
|
|
20
|
-
search: {
|
|
21
|
-
flag: "--search <query>",
|
|
22
|
-
description: "Case-insensitive substring match against publicId, name, and aliases"
|
|
23
|
-
},
|
|
24
|
-
connected: {
|
|
25
|
-
flag: "--connected",
|
|
26
|
-
description: "Only show integrations with at least one configured connection in the current org"
|
|
27
|
-
},
|
|
28
|
-
details: {
|
|
29
|
-
flag: "--details",
|
|
30
|
-
description: "Show connection names, IDs, scope, status, and default selection"
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
const IntegrationsRegisterOptionsSchema = JsonOptionSchema.extend({
|
|
34
|
-
integrationId: z.string().optional(),
|
|
35
|
-
clientApp: z.string().optional().describe("Internal credential set id holding clientId + clientSecret"),
|
|
36
|
-
displayName: z.string().optional().describe("Human-readable display name for the workspace integration")
|
|
37
|
-
});
|
|
38
|
-
const INTEGRATIONS_REGISTER_OPTIONS_CONFIG = {
|
|
39
|
-
...JSON_OPTION_CONFIG,
|
|
40
|
-
clientApp: {
|
|
41
|
-
flag: "--client-app <credentialSetId>",
|
|
42
|
-
description: "Internal credential set id holding clientId + clientSecret (required)"
|
|
43
|
-
},
|
|
44
|
-
displayName: {
|
|
45
|
-
flag: "--display-name <name>",
|
|
46
|
-
description: "Human-readable display name for the workspace integration"
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
function createIntegrationsCommand() {
|
|
50
|
-
return createTypedCommand({
|
|
51
|
-
name: "integrations",
|
|
52
|
-
description: "List Keystroke integrations available to your organization",
|
|
53
|
-
schema: IntegrationsListOptionsSchema,
|
|
54
|
-
optionsConfig: INTEGRATIONS_LIST_OPTIONS_CONFIG,
|
|
55
|
-
loadHandler: async () => (await import("./list.handler-DYdNWjgk.mjs")).handleIntegrationsList,
|
|
56
|
-
subcommands: [createTypedCommand({
|
|
57
|
-
name: "list",
|
|
58
|
-
description: "List Keystroke integrations available to your organization",
|
|
59
|
-
schema: IntegrationsListOptionsSchema,
|
|
60
|
-
optionsConfig: INTEGRATIONS_LIST_OPTIONS_CONFIG,
|
|
61
|
-
loadHandler: async () => (await import("./list.handler-DYdNWjgk.mjs")).handleIntegrationsList
|
|
62
|
-
}), createTypedCommand({
|
|
63
|
-
name: "register",
|
|
64
|
-
description: "Register a workspace provider app for future workspace-authored OAuth support",
|
|
65
|
-
schema: IntegrationsRegisterOptionsSchema,
|
|
66
|
-
optionsConfig: INTEGRATIONS_REGISTER_OPTIONS_CONFIG,
|
|
67
|
-
handler: async (opts, ctx) => {
|
|
68
|
-
const { handleIntegrationsRegister } = await import("./register.handler-BAx0IC-u.mjs");
|
|
69
|
-
await handleIntegrationsRegister({
|
|
70
|
-
integrationId: opts.integrationId,
|
|
71
|
-
clientAppCredentialSetId: opts.clientApp,
|
|
72
|
-
displayName: opts.displayName,
|
|
73
|
-
json: opts.json
|
|
74
|
-
}, ctx);
|
|
75
|
-
},
|
|
76
|
-
argument: {
|
|
77
|
-
name: "integrationId",
|
|
78
|
-
description: "Workspace integration id to register (e.g., acmeCrm)",
|
|
79
|
-
key: "integrationId"
|
|
80
|
-
}
|
|
81
|
-
})]
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
//#endregion
|
|
85
|
-
export { createIntegrationsCommand };
|
package/dist/logs-DUwdYZB-.mjs
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { t as createTypedCommand } from "./commander-D15UZVjp.mjs";
|
|
4
|
-
import { z } from "zod";
|
|
5
|
-
//#region src/commands/logs/logs.command.ts
|
|
6
|
-
const LogsOptionsSchema = z.object({ count: z.coerce.number().int().min(1).max(1e3).default(100).describe("Number of log entries to display") });
|
|
7
|
-
const LOGS_OPTIONS_CONFIG = { count: {
|
|
8
|
-
flag: "--count <n>",
|
|
9
|
-
description: "Number of log entries to display (default: 100)"
|
|
10
|
-
} };
|
|
11
|
-
function createLogsCommand() {
|
|
12
|
-
return createTypedCommand({
|
|
13
|
-
name: "logs",
|
|
14
|
-
description: "Display recent CLI log entries",
|
|
15
|
-
schema: LogsOptionsSchema,
|
|
16
|
-
optionsConfig: LOGS_OPTIONS_CONFIG,
|
|
17
|
-
loadHandler: async () => (await import("./logs.handler-dcRq-zoc.mjs")).handleLogs,
|
|
18
|
-
subcommands: [createTypedCommand({
|
|
19
|
-
name: "clear",
|
|
20
|
-
description: "Delete the CLI log file",
|
|
21
|
-
schema: z.object({}),
|
|
22
|
-
optionsConfig: {},
|
|
23
|
-
loadHandler: async () => (await import("./clear.handler-CtOZ4aRn.mjs")).handleLogsClear
|
|
24
|
-
})]
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
//#endregion
|
|
28
|
-
export { createLogsCommand };
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { d as originalConsole, f as ANSI, n as ui, p as style } from "./keystroke.mjs";
|
|
4
|
-
import { o as readLogFile } from "./dist-BF6r1hfv.mjs";
|
|
5
|
-
//#region src/commands/logs/logs.handler.ts
|
|
6
|
-
const LEVEL_STYLES = {
|
|
7
|
-
debug: ANSI.dim,
|
|
8
|
-
info: ANSI.cyan,
|
|
9
|
-
warn: ANSI.yellow,
|
|
10
|
-
error: ANSI.red
|
|
11
|
-
};
|
|
12
|
-
function formatEntry(line) {
|
|
13
|
-
let entry;
|
|
14
|
-
try {
|
|
15
|
-
entry = JSON.parse(line);
|
|
16
|
-
} catch {
|
|
17
|
-
return line;
|
|
18
|
-
}
|
|
19
|
-
const ts = style(entry.timestamp, ANSI.dim);
|
|
20
|
-
const levelStyled = style(`[${entry.level.toUpperCase()}]`, LEVEL_STYLES[entry.level] ?? "");
|
|
21
|
-
const meta = entry.meta !== void 0 ? ` ${style(JSON.stringify(entry.meta), ANSI.dim)}` : "";
|
|
22
|
-
return `${ts} ${levelStyled} ${entry.message}${meta}`;
|
|
23
|
-
}
|
|
24
|
-
async function handleLogs(options, _ctx) {
|
|
25
|
-
const lines = await readLogFile(options.count);
|
|
26
|
-
if (lines.length === 0) {
|
|
27
|
-
ui.hint("No log entries found.");
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
for (const line of lines) originalConsole.info(formatEntry(line));
|
|
31
|
-
ui.br();
|
|
32
|
-
ui.hint(`Showing ${lines.length} log ${lines.length === 1 ? "entry" : "entries"}.`);
|
|
33
|
-
}
|
|
34
|
-
//#endregion
|
|
35
|
-
export { handleLogs };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|