@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
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import * as os from "node:os";
|
|
4
|
+
import * as path$1 from "node:path";
|
|
5
|
+
//#region ../../packages/local-memory/dist/paths-JzzFkXQA.mjs
|
|
6
|
+
/**
|
|
7
|
+
* Single source of truth for the Keystroke local-memory directory name.
|
|
8
|
+
* Every path under ~/.keystroke (and projectRoot/.keystroke) must derive
|
|
9
|
+
* from this constant. This is the only place in the repo where the literal
|
|
10
|
+
* '.keystroke' should appear.
|
|
11
|
+
*/
|
|
12
|
+
const KEYSTROKE_DIR = ".keystroke";
|
|
13
|
+
/**
|
|
14
|
+
* Returns the absolute path to the Keystroke base directory.
|
|
15
|
+
*
|
|
16
|
+
* Defaults to `~/.keystroke` (using `os.homedir()`); tests pass a custom
|
|
17
|
+
* `homeDir` to isolate from the real user home.
|
|
18
|
+
*/
|
|
19
|
+
function getKeystrokeBaseDir(homeDir = os.homedir()) {
|
|
20
|
+
return path$1.join(homeDir, KEYSTROKE_DIR);
|
|
21
|
+
}
|
|
22
|
+
function validateKeystrokePathSegment(segment) {
|
|
23
|
+
if (segment.length === 0 || segment.includes("\\") || segment === ".." || segment.split("/").includes("..") || path$1.isAbsolute(segment)) throw new Error(`Invalid .keystroke path segment: ${JSON.stringify(segment)}.`);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Returns an absolute path under a project's local `.keystroke` directory.
|
|
27
|
+
*
|
|
28
|
+
* Use this for project-local state owned by other build/runtime packages while
|
|
29
|
+
* keeping the `.keystroke` directory name centralized in local-memory.
|
|
30
|
+
*/
|
|
31
|
+
function getKeystrokeProjectPath(projectRoot, ...segments) {
|
|
32
|
+
for (const segment of segments) validateKeystrokePathSegment(segment);
|
|
33
|
+
return path$1.join(path$1.resolve(projectRoot), KEYSTROKE_DIR, ...segments.flatMap((segment) => segment.split("/")));
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { getKeystrokeBaseDir as n, getKeystrokeProjectPath as r, KEYSTROKE_DIR as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { i as writeJson } from "./output-
|
|
5
|
-
import { i as requireClient } from "./context-
|
|
3
|
+
import { a as ui, j as throwReportedCliExit, y as toErrorMessage } from "./keystroke.mjs";
|
|
4
|
+
import { i as writeJson } from "./output-BWcVRt-T.mjs";
|
|
5
|
+
import { i as requireClient } from "./context-BydAGTiB.mjs";
|
|
6
6
|
//#region src/commands/workflows/paused/paused.handler.ts
|
|
7
7
|
async function handleWorkflowsPaused(options, ctx) {
|
|
8
8
|
const client = requireClient(ctx);
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-CH6r78ws.mjs";
|
|
4
4
|
import { ZodError, z } from "zod";
|
|
5
5
|
import ky from "ky";
|
|
6
|
+
//#region ../../packages/workflow-sdk/src/env.ts
|
|
7
|
+
const optionalNonEmptyString = z.preprocess((value) => value === "" ? void 0 : value, z.string().min(1).optional());
|
|
6
8
|
z.object({
|
|
7
9
|
SERVER_URL: z.url(),
|
|
8
10
|
KEYSTROKE_API_KEY: z.string().min(1)
|
|
@@ -10,8 +12,8 @@ z.object({
|
|
|
10
12
|
/** Lenient env for client - only requires what's needed when not overridden by config */
|
|
11
13
|
const clientEnvSchema = z.object({
|
|
12
14
|
SERVER_URL: z.url().optional(),
|
|
13
|
-
KEYSTROKE_API_KEY:
|
|
14
|
-
KEYSTROKE_ORG_ID:
|
|
15
|
+
KEYSTROKE_API_KEY: optionalNonEmptyString,
|
|
16
|
+
KEYSTROKE_ORG_ID: optionalNonEmptyString
|
|
15
17
|
});
|
|
16
18
|
function getClientEnv() {
|
|
17
19
|
return clientEnvSchema.parse(process.env);
|
|
@@ -2204,7 +2206,7 @@ const bundles = (api) => ({
|
|
|
2204
2206
|
})),
|
|
2205
2207
|
purpose
|
|
2206
2208
|
} }).json();
|
|
2207
|
-
const { batchUpload } = await import("./upload-
|
|
2209
|
+
const { batchUpload } = await import("./upload-BbcMkyVl.mjs").then((n) => n.n);
|
|
2208
2210
|
return batchUpload(workflows.map((wf) => ({
|
|
2209
2211
|
name: wf.workflowName,
|
|
2210
2212
|
bundle: wf.bundle,
|
|
@@ -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-BWcVRt-T.mjs";
|
|
4
|
+
import { t as createTypedCommand } from "./commander-C5qcOo8m.mjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
//#region src/commands/projects/projects.command.ts
|
|
7
7
|
function createProjectsCommand() {
|
|
@@ -10,19 +10,19 @@ function createProjectsCommand() {
|
|
|
10
10
|
description: "List tracked Keystroke projects",
|
|
11
11
|
schema: JsonOptionSchema,
|
|
12
12
|
optionsConfig: { ...JSON_OPTION_CONFIG },
|
|
13
|
-
loadHandler: async () => (await import("./list.handler-
|
|
13
|
+
loadHandler: async () => (await import("./list.handler-BLkQKiV1.mjs")).handleProjectsList,
|
|
14
14
|
subcommands: [createTypedCommand({
|
|
15
15
|
name: "list",
|
|
16
16
|
description: "List all tracked Keystroke projects",
|
|
17
17
|
schema: JsonOptionSchema,
|
|
18
18
|
optionsConfig: { ...JSON_OPTION_CONFIG },
|
|
19
|
-
loadHandler: async () => (await import("./list.handler-
|
|
19
|
+
loadHandler: async () => (await import("./list.handler-BLkQKiV1.mjs")).handleProjectsList
|
|
20
20
|
}), createTypedCommand({
|
|
21
21
|
name: "clear-cache",
|
|
22
22
|
description: "Clear the stored projects cache (projects.json)",
|
|
23
23
|
schema: z.object({}),
|
|
24
24
|
optionsConfig: {},
|
|
25
|
-
loadHandler: async () => (await import("./clear-cache.handler-
|
|
25
|
+
loadHandler: async () => (await import("./clear-cache.handler-CTLQ1PIN.mjs")).handleProjectsClearCache
|
|
26
26
|
})]
|
|
27
27
|
});
|
|
28
28
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { i as writeJson } from "./output-
|
|
3
|
+
import { a as ui, j as throwReportedCliExit, p as AUTH_HINT, v as isNetworkError, y as toErrorMessage } from "./keystroke.mjs";
|
|
4
|
+
import { i as writeJson } from "./output-BWcVRt-T.mjs";
|
|
5
5
|
//#region src/commands/integrations/register.handler.ts
|
|
6
6
|
function exitWithError(ctx, message, opts) {
|
|
7
7
|
if (ctx.jsonMode) {
|
|
@@ -19,8 +19,8 @@ function exitWithError(ctx, message, opts) {
|
|
|
19
19
|
/**
|
|
20
20
|
* Handle `keystroke integrations register <integrationId>`.
|
|
21
21
|
*
|
|
22
|
-
* Upserts
|
|
23
|
-
* `POST /api/v1/admin/
|
|
22
|
+
* Upserts an org-scoped custom `provider_apps` row by calling
|
|
23
|
+
* `POST /api/v1/admin/provider-apps` on the server.
|
|
24
24
|
*/
|
|
25
25
|
async function handleIntegrationsRegister(options, ctx) {
|
|
26
26
|
const integrationId = options.integrationId?.trim();
|
|
@@ -37,17 +37,27 @@ async function handleIntegrationsRegister(options, ctx) {
|
|
|
37
37
|
code: "USAGE_ERROR",
|
|
38
38
|
hint: `Example: keystroke integrations register ${integrationId} --client-app acmeClientApp`
|
|
39
39
|
});
|
|
40
|
+
if (!options.provider) exitWithError(ctx, "Missing --provider <provider>.", {
|
|
41
|
+
code: "USAGE_ERROR",
|
|
42
|
+
hint: `Example: keystroke integrations register ${integrationId} --provider slack --client-app acmeClientApp --external-app-id A123`
|
|
43
|
+
});
|
|
44
|
+
if (!options.externalAppId) exitWithError(ctx, "Missing --external-app-id <id>.", {
|
|
45
|
+
code: "USAGE_ERROR",
|
|
46
|
+
hint: `Example: keystroke integrations register ${integrationId} --provider slack --client-app acmeClientApp --external-app-id A123`
|
|
47
|
+
});
|
|
40
48
|
const displayName = options.displayName ?? integrationId;
|
|
41
|
-
if (!ctx.jsonMode) ui.text(`Registering
|
|
49
|
+
if (!ctx.jsonMode) ui.text(`Registering provider app "${integrationId}"...`);
|
|
42
50
|
try {
|
|
43
|
-
const response = await fetch(`${baseUrl}/api/v1/admin/
|
|
51
|
+
const response = await fetch(`${baseUrl}/api/v1/admin/provider-apps`, {
|
|
44
52
|
method: "POST",
|
|
45
53
|
headers: {
|
|
46
54
|
Authorization: `Bearer ${apiKey}`,
|
|
47
55
|
"Content-Type": "application/json"
|
|
48
56
|
},
|
|
49
57
|
body: JSON.stringify({
|
|
50
|
-
|
|
58
|
+
appRef: integrationId,
|
|
59
|
+
provider: options.provider,
|
|
60
|
+
externalAppId: options.externalAppId,
|
|
51
61
|
clientAppCredentialSetId: options.clientAppCredentialSetId,
|
|
52
62
|
displayName
|
|
53
63
|
})
|
|
@@ -63,13 +73,12 @@ async function handleIntegrationsRegister(options, ctx) {
|
|
|
63
73
|
if (ctx.jsonMode) {
|
|
64
74
|
writeJson({
|
|
65
75
|
status: data.created ? "created" : "updated",
|
|
66
|
-
|
|
76
|
+
providerApp: data.providerApp
|
|
67
77
|
});
|
|
68
78
|
return;
|
|
69
79
|
}
|
|
70
|
-
if (data.created) ui.success(`Registered
|
|
71
|
-
else ui.success(`Updated
|
|
72
|
-
ui.hint("Workspace-authored OAuth connect flows are not available yet. This registration stores the client app metadata for future support.");
|
|
80
|
+
if (data.created) ui.success(`Registered provider app for "${integrationId}".`);
|
|
81
|
+
else ui.success(`Updated provider app for "${integrationId}".`);
|
|
73
82
|
} catch (error) {
|
|
74
83
|
if (error instanceof Error && error.name === "CliExitError") throw error;
|
|
75
84
|
if (isNetworkError(error)) exitWithError(ctx, `Could not reach the Keystroke server to register "${integrationId}".`, {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { a as
|
|
4
|
-
import { i as writeJson } from "./output-
|
|
5
|
-
import { a as readManifestsFromOutDir } from "./dist-
|
|
6
|
-
import { t as requireWorkflowsDir } from "./resolve-project-
|
|
7
|
-
import { t as readCredentialEnvMap } from "./credential-env-map-
|
|
8
|
-
import { a as loadProjectDotenvFile, c as getTerminalContentWidth, o as manifestGroupKey, s as normalizeManifestScopeToServer, t as buildCredentialWorkflowConsumersByGroup, u as truncateWithEllipsis } from "./list-enrichment-
|
|
9
|
-
import { t as groupCredentialRequirements } from "./credentials-
|
|
3
|
+
import { a as ui, c as getProcessEnv, n as style, t as ANSI } from "./keystroke.mjs";
|
|
4
|
+
import { i as writeJson } from "./output-BWcVRt-T.mjs";
|
|
5
|
+
import { a as readManifestsFromOutDir } from "./dist-Cx0RV8s7.mjs";
|
|
6
|
+
import { t as requireWorkflowsDir } from "./resolve-project-CNQtOWE4.mjs";
|
|
7
|
+
import { t as readCredentialEnvMap } from "./credential-env-map-BA4LNI7x.mjs";
|
|
8
|
+
import { a as loadProjectDotenvFile, c as getTerminalContentWidth, o as manifestGroupKey, s as normalizeManifestScopeToServer, t as buildCredentialWorkflowConsumersByGroup, u as truncateWithEllipsis } from "./list-enrichment-B9238wom.mjs";
|
|
9
|
+
import { t as groupCredentialRequirements } from "./credentials-jRiXEr6P.mjs";
|
|
10
10
|
//#region src/commands/credentials/requirements/requirements-display.ts
|
|
11
11
|
function dimLabel(label, width = 10) {
|
|
12
12
|
return style(label.padEnd(width), ANSI.dim);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { n as credentials } from "./dist-CIInPRGh.mjs";
|
|
4
|
+
//#region src/lib/resolve-cli-credentials.ts
|
|
5
|
+
/**
|
|
6
|
+
* Resolves CLI credential inputs using explicit overrides first, then stored
|
|
7
|
+
* credentials. Logger calls (when provided) describe which source won so the
|
|
8
|
+
* user understands the fallback chain.
|
|
9
|
+
*
|
|
10
|
+
* Precedence:
|
|
11
|
+
* 1. `input.apiKey` (e.g. `--api-key` flag)
|
|
12
|
+
* 2. The active org's API key from stored credentials
|
|
13
|
+
*
|
|
14
|
+
* Same precedence for `serverUrl`. Never throws — returns undefined fields
|
|
15
|
+
* when no source is available, leaving the decision to the caller.
|
|
16
|
+
*/
|
|
17
|
+
async function resolveCliCredentials(input = {}) {
|
|
18
|
+
const cred = input.credentials ?? credentials;
|
|
19
|
+
let active = null;
|
|
20
|
+
let urls = null;
|
|
21
|
+
let readErrorMessage;
|
|
22
|
+
try {
|
|
23
|
+
active = await cred.getActiveOrg();
|
|
24
|
+
urls = await cred.getServerUrls();
|
|
25
|
+
} catch (error) {
|
|
26
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
27
|
+
readErrorMessage = message;
|
|
28
|
+
input.logger?.warn(`Could not read saved credentials from ${cred.metadataFilePath}: ${message}`);
|
|
29
|
+
}
|
|
30
|
+
const apiKey = input.apiKey ?? active?.apiKey;
|
|
31
|
+
const serverUrl = input.serverUrl ?? urls?.serverUrl;
|
|
32
|
+
if (!input.apiKey && active?.apiKey) input.logger?.info(`Using saved API key from ${cred.metadataFilePath}`);
|
|
33
|
+
if (!input.serverUrl && urls?.serverUrl) input.logger?.info(`Using saved API URL from ${cred.metadataFilePath}`);
|
|
34
|
+
return {
|
|
35
|
+
apiKey,
|
|
36
|
+
serverUrl,
|
|
37
|
+
activeOrg: active ? {
|
|
38
|
+
organizationId: active.org.organizationId,
|
|
39
|
+
organizationName: active.org.organizationName,
|
|
40
|
+
apiKey: active.apiKey
|
|
41
|
+
} : void 0,
|
|
42
|
+
metadataFilePath: cred.metadataFilePath,
|
|
43
|
+
readErrorMessage
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { resolveCliCredentials as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { n as findProjectRoot } from "./project-config-
|
|
3
|
+
import { a as ui, k as ProjectNotFoundError } from "./keystroke.mjs";
|
|
4
|
+
import { i as projects } from "./dist-CIInPRGh.mjs";
|
|
5
|
+
import { n as findProjectRoot } from "./project-config-DudGRFPO.mjs";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
//#region src/lib/resolve-project.ts
|
|
8
8
|
/**
|
|
@@ -23,10 +23,10 @@ async function requireWorkflowsDir(explicitPath) {
|
|
|
23
23
|
const dir = await resolveWorkflowsDir(explicitPath);
|
|
24
24
|
if (dir) return dir;
|
|
25
25
|
ui.warn("No keystroke.config.ts found in this directory or any parent directory.");
|
|
26
|
-
const
|
|
27
|
-
if (
|
|
28
|
-
ui.hint(`Last used project: ${
|
|
29
|
-
ui.hint(` cd ${
|
|
26
|
+
const lastProject = await projects.getLast();
|
|
27
|
+
if (lastProject) {
|
|
28
|
+
ui.hint(`Last used project: ${lastProject}`);
|
|
29
|
+
ui.hint(` cd ${lastProject}`);
|
|
30
30
|
}
|
|
31
31
|
ui.hint("Run `keystroke init` to initialize a project, or use --path.");
|
|
32
32
|
throw new ProjectNotFoundError("No keystroke.config.ts found");
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { a as readManifestsFromOutDir } from "./dist-
|
|
5
|
-
import { a as validateRequiredFields, n as formatValidationError, t as formatMissingInputError } from "./schema-display-
|
|
6
|
-
import { n as sleep, t as TERMINAL_STATUSES } from "./run-polling-
|
|
7
|
-
import * as fs from "node:fs/promises";
|
|
3
|
+
import { O as InputValidationError, a as ui, y as toErrorMessage } from "./keystroke.mjs";
|
|
4
|
+
import { a as readManifestsFromOutDir } from "./dist-Cx0RV8s7.mjs";
|
|
5
|
+
import { a as validateRequiredFields, n as formatValidationError, t as formatMissingInputError } from "./schema-display-NVEl_DFY.mjs";
|
|
6
|
+
import { n as sleep, t as TERMINAL_STATUSES } from "./run-polling-DARidqo-.mjs";
|
|
8
7
|
import * as path$1 from "node:path";
|
|
8
|
+
import * as fs from "node:fs/promises";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
//#region ../../packages/utils/src/json-schema-validation.ts
|
|
11
11
|
const SCHEMA_CACHE_LIMIT = 256;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as assertWorkflowProjectRoot } from "./project-config-
|
|
6
|
-
import { i as writeJson } from "./output-
|
|
7
|
-
import { i as requireClient, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-
|
|
8
|
-
import { n as resolveWorkflowsDir } from "./resolve-project-
|
|
9
|
-
import { t as lookupCurrentDeploymentWorkflow } from "./current-deployment-workflow-
|
|
10
|
-
import { i as resolveWorkflowGlobals, o as validateInputOrExit, r as resolveRunInput, s as validateWorkflowGlobalsOrExit, t as pollForCompletion } from "./run-polling-
|
|
3
|
+
import { D as CliExitError, a as ui, j as throwReportedCliExit, y as toErrorMessage } from "./keystroke.mjs";
|
|
4
|
+
import { i as projects } from "./dist-CIInPRGh.mjs";
|
|
5
|
+
import { t as assertWorkflowProjectRoot } from "./project-config-DudGRFPO.mjs";
|
|
6
|
+
import { i as writeJson } from "./output-BWcVRt-T.mjs";
|
|
7
|
+
import { i as requireClient, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-BydAGTiB.mjs";
|
|
8
|
+
import { n as resolveWorkflowsDir } from "./resolve-project-CNQtOWE4.mjs";
|
|
9
|
+
import { t as lookupCurrentDeploymentWorkflow } from "./current-deployment-workflow-BVliROAz.mjs";
|
|
10
|
+
import { i as resolveWorkflowGlobals, o as validateInputOrExit, r as resolveRunInput, s as validateWorkflowGlobalsOrExit, t as pollForCompletion } from "./run-polling-BhOdFyh3.mjs";
|
|
11
11
|
//#region src/commands/workflows/run.handler.ts
|
|
12
12
|
async function handleWorkflowsRun(options, ctx) {
|
|
13
13
|
const client = requireClient(ctx);
|
|
@@ -72,7 +72,7 @@ async function resolveProjectId(options, ctx) {
|
|
|
72
72
|
}
|
|
73
73
|
const projectConfig = await assertWorkflowProjectRoot(workflowsDir);
|
|
74
74
|
await assertProjectConfigMatchesAuthenticatedOrg(requireClient(ctx), projectConfig);
|
|
75
|
-
|
|
75
|
+
projects.track(workflowsDir);
|
|
76
76
|
return projectConfig.projectId;
|
|
77
77
|
}
|
|
78
78
|
async function loadCurrentDeploymentWorkflow(client, params) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { i as writeJson, n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-
|
|
5
|
-
import { t as createTypedCommand } from "./commander-
|
|
6
|
-
import { i as requireClient } from "./context-
|
|
3
|
+
import { a as ui, j as throwReportedCliExit, n as style, t as ANSI, y as toErrorMessage } from "./keystroke.mjs";
|
|
4
|
+
import { i as writeJson, n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-BWcVRt-T.mjs";
|
|
5
|
+
import { t as createTypedCommand } from "./commander-C5qcOo8m.mjs";
|
|
6
|
+
import { i as requireClient } from "./context-BydAGTiB.mjs";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
//#region src/commands/runs/inspect-display.ts
|
|
9
9
|
function renderRunInspect(input) {
|
|
@@ -46,10 +46,11 @@ function idNoSpacesString(fieldName) {
|
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
48
|
* Non-empty trimmed string for credential definition ids.
|
|
49
|
-
*
|
|
49
|
+
* Allows namespaced ids such as `keystroke:slack` plus letters, numbers,
|
|
50
|
+
* hyphens, and underscores.
|
|
50
51
|
*/
|
|
51
52
|
function credentialSetIdString(fieldName) {
|
|
52
|
-
return z.string().trim().min(1, { error: `${fieldName} cannot be empty` }).max(255, { error: `${fieldName} cannot exceed 255 characters` }).refine((s) => /^[a-zA-Z0-9_
|
|
53
|
+
return z.string().trim().min(1, { error: `${fieldName} cannot be empty` }).max(255, { error: `${fieldName} cannot exceed 255 characters` }).refine((s) => /^[a-zA-Z0-9_:-]+$/.test(s), { error: `${fieldName} must only contain letters, numbers, hyphens, underscores, and colons` });
|
|
53
54
|
}
|
|
54
55
|
function optionalTrimmedNonEmptyString(fieldName) {
|
|
55
56
|
return trimmedNonEmptyString(fieldName).optional();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { D as CliExitError, a as ui } from "./keystroke.mjs";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
|
-
import { access, cp, mkdir, readFile, readdir, rm, symlink, writeFile } from "node:fs/promises";
|
|
6
5
|
import path from "node:path";
|
|
6
|
+
import { access, cp, mkdir, readFile, readdir, rm, symlink, writeFile } from "node:fs/promises";
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
8
8
|
import { autocompleteMultiselect, cancel, isCancel, select } from "@clack/prompts";
|
|
9
9
|
//#region src/lib/skill-installer/package.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { i as writeJson, r as isJsonMode } from "./output-
|
|
5
|
-
import { i as UnknownSkillAgentError, n as resolveSkillInstallChoices, r as installKeystrokeAgentSkills, t as summarizeSkillInstall } from "./skill-installer-
|
|
3
|
+
import { D as CliExitError, a as ui } from "./keystroke.mjs";
|
|
4
|
+
import { i as writeJson, r as isJsonMode } from "./output-BWcVRt-T.mjs";
|
|
5
|
+
import { i as UnknownSkillAgentError, n as resolveSkillInstallChoices, r as installKeystrokeAgentSkills, t as summarizeSkillInstall } from "./skill-installer-BBgN2tzW.mjs";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
//#region src/commands/skills/skills-sync.handler.ts
|
|
8
8
|
async function handleSkillsSync(options, _ctx) {
|
|
@@ -1,8 +1,8 @@
|
|
|
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 { t as SKILL_INSTALL_METHODS } from "./types-
|
|
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 { t as SKILL_INSTALL_METHODS } from "./types-BMBuhHhW.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/commands/skills/skills.command.ts
|
|
8
8
|
const SkillsCommandOptionsSchema = JsonOptionSchema.extend({
|
|
@@ -32,13 +32,13 @@ function createSkillsCommand() {
|
|
|
32
32
|
description: "Sync Keystroke agent skills (SKILL.md) from @keystrokehq/skills",
|
|
33
33
|
schema: SkillsCommandOptionsSchema,
|
|
34
34
|
optionsConfig: SKILLS_OPTIONS_CONFIG,
|
|
35
|
-
loadHandler: async () => (await import("./skills.handler-
|
|
35
|
+
loadHandler: async () => (await import("./skills.handler-Do9I3dQS.mjs")).handleSkillsParent,
|
|
36
36
|
subcommands: [createTypedCommand({
|
|
37
37
|
name: "sync",
|
|
38
38
|
description: "Install bundled Keystroke skills into selected agent skill directories",
|
|
39
39
|
schema: SkillsCommandOptionsSchema,
|
|
40
40
|
optionsConfig: SKILLS_OPTIONS_CONFIG,
|
|
41
|
-
loadHandler: async () => (await import("./skills-sync.handler-
|
|
41
|
+
loadHandler: async () => (await import("./skills-sync.handler-DOxudKmV.mjs")).handleSkillsSync
|
|
42
42
|
})]
|
|
43
43
|
});
|
|
44
44
|
cmd.enablePositionalOptions();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { a as ui } from "./keystroke.mjs";
|
|
4
4
|
//#region src/commands/skills/skills.handler.ts
|
|
5
5
|
async function handleSkillsParent(_options, _ctx) {
|
|
6
6
|
ui.hint("Run `keystroke skills sync --agent claude-code --method symlink` to install bundled Keystroke skills for selected agents.");
|
package/dist/{source-analysis-BBg2E_6G-BQqm16RR.mjs → source-analysis-BBg2E_6G-Ut7kYHOz.mjs}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { d as getMetadataRoot } from "./layout-
|
|
4
|
-
import { t as BASE_IGNORE_PATTERNS } from "./metadata-layout-Bv-B0nHj-
|
|
5
|
-
import { a as literalString, l as unwrapExpression, n as identifierName, r as isNode } from "./oxc-B3KI3rf_-
|
|
6
|
-
import { readFile, readdir, rm } from "node:fs/promises";
|
|
3
|
+
import { d as getMetadataRoot } from "./layout-P1v-Gssz.mjs";
|
|
4
|
+
import { t as BASE_IGNORE_PATTERNS } from "./metadata-layout-Bv-B0nHj-B1c5giJ7.mjs";
|
|
5
|
+
import { a as literalString, l as unwrapExpression, n as identifierName, r as isNode } from "./oxc-B3KI3rf_-Cvx4Z-4H.mjs";
|
|
7
6
|
import path from "node:path";
|
|
7
|
+
import { readFile, readdir, rm } from "node:fs/promises";
|
|
8
8
|
//#region ../../packages/workflow-builder/dist/source-analysis-BBg2E_6G.mjs
|
|
9
9
|
async function removeAllMetadataArtifacts(outputDir) {
|
|
10
10
|
await rm(getMetadataRoot(outputDir), {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { F as originalConsole, P as logger, n as style, r as isTTY, t as ANSI } from "./keystroke.mjs";
|
|
4
4
|
import { writeSync } from "node:fs";
|
|
5
5
|
import { Worker } from "node:worker_threads";
|
|
6
6
|
//#region src/lib/spinner-progress.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { a as createKyInstance, i as buildSearchParams, n as auth, r as bundles, s as getClientEnv, t as projects$1 } from "./projects-
|
|
3
|
+
import { a as createKyInstance, i as buildSearchParams, n as auth, r as bundles, s as getClientEnv, t as projects$1 } from "./projects-BndElPAx.mjs";
|
|
4
4
|
//#region ../../packages/workflow-sdk/src/v1/admin.ts
|
|
5
5
|
const admin = (api) => ({
|
|
6
6
|
orgs: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { _ as isAuthError, a as ui, m as REAUTH_HINT, p as AUTH_HINT, v as isNetworkError, y as toErrorMessage } from "./keystroke.mjs";
|
|
4
4
|
//#region src/commands/auth/status.handler.ts
|
|
5
5
|
async function getValidationStatus(ctx) {
|
|
6
6
|
if (!ctx.client) return { kind: "not_authenticated" };
|
|
@@ -35,7 +35,7 @@ async function getLiveUser(ctx, validation) {
|
|
|
35
35
|
}
|
|
36
36
|
function getLocalOrganization(ctx) {
|
|
37
37
|
if (!ctx.organizationId) return;
|
|
38
|
-
const org = ctx.
|
|
38
|
+
const org = ctx.storedOrgs.find((entry) => entry.organizationId === ctx.organizationId);
|
|
39
39
|
if (!org) return { id: ctx.organizationId };
|
|
40
40
|
return {
|
|
41
41
|
id: org.organizationId,
|
|
@@ -82,11 +82,25 @@ function printValidationStatus(validation) {
|
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
+
function printCredentialStorage(ctx) {
|
|
86
|
+
const info = ctx.credentialStorageInfo;
|
|
87
|
+
if (info.secretStorageKind === "keychain") {
|
|
88
|
+
ui.hint("Credential storage: OS credential store");
|
|
89
|
+
if (ctx.credentialReadError) {
|
|
90
|
+
ui.warn("Saved credential metadata exists, but the OS credential store is unavailable.");
|
|
91
|
+
ui.hint("Unlock your keychain or rerun `keystroke auth`.");
|
|
92
|
+
ui.hint(`Credential store error: ${ctx.credentialReadError}`);
|
|
93
|
+
}
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
ui.warn("Credential storage: plaintext file (insecure)");
|
|
97
|
+
ui.hint(`Secrets: ${info.legacySecretsFilePath}`);
|
|
98
|
+
}
|
|
85
99
|
async function handleAuthStatus(_options, ctx) {
|
|
86
100
|
const validation = await getValidationStatus(ctx);
|
|
87
101
|
const liveUser = await getLiveUser(ctx, validation);
|
|
88
102
|
const organization = getLiveOrganization(liveUser, ctx.organizationId ?? (validation.kind === "valid" ? validation.organizationId : void 0)) ?? getLocalOrganization(ctx);
|
|
89
|
-
const userEmail = liveUser?.email ?? ctx.
|
|
103
|
+
const userEmail = liveUser?.email ?? ctx.storedUser?.email;
|
|
90
104
|
ui.header("Keystroke CLI auth status");
|
|
91
105
|
if (userEmail) ui.text(`Signed in as: ${userEmail}`);
|
|
92
106
|
else if (validation.kind === "not_authenticated") ui.hint("No saved user identity found.");
|
|
@@ -95,7 +109,8 @@ async function handleAuthStatus(_options, ctx) {
|
|
|
95
109
|
if (ctx.orgSource) ui.hint(`Source: ${ctx.orgSource}`);
|
|
96
110
|
printValidationStatus(validation);
|
|
97
111
|
if (ctx.baseUrl) ui.hint(`API URL: ${ctx.baseUrl}`);
|
|
98
|
-
|
|
112
|
+
printCredentialStorage(ctx);
|
|
113
|
+
ui.hint(`Credentials: ${ctx.metadataFilePath}`);
|
|
99
114
|
}
|
|
100
115
|
//#endregion
|
|
101
116
|
export { handleAuthStatus };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { i as requireClient } from "./context-
|
|
3
|
+
import { a as ui, j as throwReportedCliExit } from "./keystroke.mjs";
|
|
4
|
+
import { n as credentials } from "./dist-CIInPRGh.mjs";
|
|
5
|
+
import { i as requireClient } from "./context-BydAGTiB.mjs";
|
|
6
6
|
import { select } from "@clack/prompts";
|
|
7
7
|
//#region src/commands/org/switch.handler.ts
|
|
8
8
|
async function handleOrgSwitch(_options, ctx) {
|
|
9
9
|
const { user } = await requireClient(ctx).users.getMe();
|
|
10
10
|
const orgs = user.organizations ?? [];
|
|
11
|
-
const storedOrgIds = new Set(ctx.
|
|
11
|
+
const storedOrgIds = new Set(ctx.storedOrgs.map((o) => o.organizationId));
|
|
12
12
|
if (orgs.length === 0) {
|
|
13
13
|
ui.warn("You do not belong to any organization.");
|
|
14
14
|
return;
|
|
@@ -44,7 +44,7 @@ async function handleOrgSwitch(_options, ctx) {
|
|
|
44
44
|
ui.warn(`No stored API key for ${selectedOrg.name}. Run \`keystroke auth\` and select this org to add credentials.`);
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
|
-
await setActiveOrg(selected);
|
|
47
|
+
await credentials.setActiveOrg(selected);
|
|
48
48
|
ui.success(`Switched to ${selectedOrg.name}`);
|
|
49
49
|
}
|
|
50
50
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { t as createTypedCommand } from "./commander-
|
|
3
|
+
import { t as createTypedCommand } from "./commander-C5qcOo8m.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/commands/sync/sync.command.ts
|
|
6
6
|
/**
|
|
@@ -32,7 +32,7 @@ function createSyncCommand() {
|
|
|
32
32
|
description: "Sync local workflows with Keystroke",
|
|
33
33
|
schema: SyncOptionsSchema,
|
|
34
34
|
optionsConfig: SYNC_OPTIONS_CONFIG,
|
|
35
|
-
loadHandler: async () => (await import("./sync.handler-
|
|
35
|
+
loadHandler: async () => (await import("./sync.handler-DjY8nqbB.mjs")).handleSync
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
//#endregion
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { a as validateApiKey, i as requireClient } from "./context-
|
|
6
|
-
import { n as deployFromDir } from "./dist-
|
|
7
|
-
import { t as requireWorkflowsDir } from "./resolve-project-
|
|
8
|
-
import { a as runWorkflowBuild, n as renderBuildFailure, r as renderBuildHeader } from "./workflow-build-
|
|
9
|
-
import { t as createBuildProgress } from "./build-progress-
|
|
10
|
-
import { t as createDeployProgress } from "./deploy-progress-
|
|
3
|
+
import { P as logger, a as ui, j as throwReportedCliExit, l as isLocalMode, y as toErrorMessage } from "./keystroke.mjs";
|
|
4
|
+
import { i as projects } from "./dist-CIInPRGh.mjs";
|
|
5
|
+
import { a as validateApiKey, i as requireClient } from "./context-BydAGTiB.mjs";
|
|
6
|
+
import { n as deployFromDir } from "./dist-Cx0RV8s7.mjs";
|
|
7
|
+
import { t as requireWorkflowsDir } from "./resolve-project-CNQtOWE4.mjs";
|
|
8
|
+
import { a as runWorkflowBuild, n as renderBuildFailure, r as renderBuildHeader } from "./workflow-build-C8AiYxqp.mjs";
|
|
9
|
+
import { t as createBuildProgress } from "./build-progress-AR8xow4_.mjs";
|
|
10
|
+
import { t as createDeployProgress } from "./deploy-progress-DK87VKJ-.mjs";
|
|
11
11
|
//#region src/commands/sync/sync.handler.ts
|
|
12
12
|
async function handleSync(options, ctx) {
|
|
13
13
|
try {
|
|
@@ -25,7 +25,7 @@ async function handleSync(options, ctx) {
|
|
|
25
25
|
}
|
|
26
26
|
async function runSingleSync(options, ctx) {
|
|
27
27
|
const workflowsDir = await requireWorkflowsDir();
|
|
28
|
-
|
|
28
|
+
projects.track(workflowsDir);
|
|
29
29
|
const client = requireClient(ctx);
|
|
30
30
|
await validateApiKey(client);
|
|
31
31
|
logger.info("Starting sync", {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { n as __exportAll } from "./chunk-CH6r78ws.mjs";
|
|
4
|
-
import { a as descriptionString, c as optionalDescriptionString, d as trimmedNonEmptyStringUnbounded, i as createStructuralSchema, n as credentialSetProxyConfigSchema, o as idNoSpacesString, s as jsonSchemaObject, t as CredentialSetManifestSchema, u as trimmedNonEmptyString } from "./schemas-
|
|
5
|
-
import { t as parseCronExpression } from "./cron-parser-
|
|
4
|
+
import { a as descriptionString, c as optionalDescriptionString, d as trimmedNonEmptyStringUnbounded, i as createStructuralSchema, n as credentialSetProxyConfigSchema, o as idNoSpacesString, s as jsonSchemaObject, t as CredentialSetManifestSchema, u as trimmedNonEmptyString } from "./schemas-BxFPUGWT.mjs";
|
|
5
|
+
import { t as parseCronExpression } from "./cron-parser-Dw_cWzFu.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
const SHA256HashSchema = z.string().length(64, "Must be 64 characters").regex(/^[a-f0-9]{64}$/i, "Must be hexadecimal").transform((value) => value);
|
|
8
8
|
const JsonSchemaSchema = z.record(z.string(), z.unknown());
|