@keystrokehq/cli 0.0.17 → 0.0.18
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/dist/{accept.handler-BPwp_UAE.mjs → accept.handler-B7QzdKCh.mjs} +4 -4
- package/dist/{admin-Bb9Hx-gO.mjs → admin-CYpulx_A.mjs} +11 -11
- package/dist/{agents-CbmvvOAx.mjs → agents-Co6Jy_N8.mjs} +10 -10
- package/dist/{api-jkf0TTgD.mjs → api-DsK8M-ZH.mjs} +1 -1
- package/dist/{api-keys-DJlyIf10.mjs → api-keys-BUCLzRv_.mjs} +6 -6
- package/dist/{auth-DpDEkJz7.mjs → auth-niNm-yNT.mjs} +12 -7
- package/dist/{auth.handler-u3qmoUX0.mjs → auth.handler-BTH-Qb00.mjs} +59 -26
- 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-CCxCqd02.mjs} +3 -3
- package/dist/{build-workflows-CV4tBo6S-knCnBKTc.mjs → build-workflows-CV4tBo6S-DhFBlp6m.mjs} +10 -10
- package/dist/{build.handler-BNSC_zhQ.mjs → build.handler-BmlXPhed.mjs} +7 -7
- package/dist/{clear-cache.handler-gr5VmEYB.mjs → clear-cache.handler-CTLQ1PIN.mjs} +3 -3
- package/dist/clear.handler-BDlwBzX4.mjs +68 -0
- package/dist/{clear.handler-CtOZ4aRn.mjs → clear.handler-C_pXAeBG.mjs} +3 -2
- package/dist/{commander-D15UZVjp.mjs → commander-BE37hxR3.mjs} +4 -4
- package/dist/{connect-DzSNDSmI.mjs → connect-C9NMD8Ky.mjs} +3 -3
- package/dist/{connect.handler-DRO05ak3.mjs → connect.handler-C7kysvhz.mjs} +5 -5
- package/dist/{context-B1L8pZsH.mjs → context-Bid-Rqj7.mjs} +49 -17
- package/dist/{create.handler-DF1Ye4nr.mjs → create.handler-Cp9CV6SN.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-DrrQ9x9P.mjs} +3 -3
- package/dist/{credential-schema-mismatch-CfyBUMPS.mjs → credential-schema-mismatch-z74ud-YZ.mjs} +1 -1
- package/dist/{credentials-CiOwDS5y.mjs → credentials-DUkVbhvj.mjs} +1 -1
- package/dist/{credentials-VidBoOd7.mjs → credentials-fMfKVlEn.mjs} +7 -7
- package/dist/{current-deployment-workflow-BRUEdPrN.mjs → current-deployment-workflow-DiwUcKoB.mjs} +6 -6
- package/dist/{current.handler-QZQ-l84v.mjs → current.handler-eCR4nClu.mjs} +3 -3
- package/dist/{delete.handler-Bude0SVP.mjs → delete.handler-D4ElSAcr.mjs} +2 -2
- package/dist/{deploy-eshEEiP-.mjs → deploy-B7LRWcp6.mjs} +2 -2
- package/dist/{deploy-CJbVB7e2.mjs → deploy-DyZh--f7.mjs} +1 -1
- package/dist/{deploy-progress-DJHph1Fz.mjs → deploy-progress-DK87VKJ-.mjs} +2 -2
- package/dist/{deploy.handler-BxxWI7nV.mjs → deploy.handler-DVnH-Niv.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-lIA2pRBX.mjs} +7 -7
- package/dist/dist-CIInPRGh.mjs +1071 -0
- package/dist/{dist-FQYQ2FLm.mjs → dist-WFPTDQB3.mjs} +15 -15
- package/dist/{env.handler-B3YDQIVE.mjs → env.handler-BIzQLlmo.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-D7EiPjwl.mjs} +6 -6
- package/dist/{init-CWFJdKNs.mjs → init-jaqNLGmB.mjs} +3 -3
- package/dist/{init.handler-BZSoM76V.mjs → init.handler-DamvbPEw.mjs} +8 -8
- package/dist/{inspect.handler-umc7of-r.mjs → inspect.handler-_UcN7dxE.mjs} +8 -8
- package/dist/{integration-catalog-BgT4mLzW.mjs → integration-catalog-m8tj_XlD.mjs} +3 -3
- package/dist/{integrations-DKtl_aES.mjs → integrations-DRL3JmC8.mjs} +6 -6
- package/dist/{invites-Cqi7iyIN.mjs → invites-VntHNMYk.mjs} +5 -5
- package/dist/{invites.list.handler-CErgY35S.mjs → invites.list.handler-CPl4QHfc.mjs} +4 -4
- package/dist/{invites.resend.handler-DRCRIA4F.mjs → invites.resend.handler-BAtb3AX4.mjs} +4 -4
- package/dist/{invites.revoke.handler-C0FZdAR0.mjs → invites.revoke.handler-qXOF1Vgx.mjs} +4 -4
- package/dist/keystroke.mjs +558 -207
- package/dist/{list-enrichment-C6u5eI0j.mjs → list-enrichment-DYvr3XDb.mjs} +3 -3
- package/dist/{list.handler-c-8RpgB9.mjs → list.handler-BLkQKiV1.mjs} +17 -16
- package/dist/{list.handler-CBEXiTAK.mjs → list.handler-BdRsjRlf.mjs} +3 -3
- package/dist/{list.handler-DYdNWjgk.mjs → list.handler-CEjKSezx.mjs} +4 -4
- package/dist/{list2.handler-T5v4EK20.mjs → list.handler-CJUFdmaU.mjs} +7 -7
- package/dist/{list.handler-Cr_DFAae.mjs → list.handler-C_iBLBmS.mjs} +3 -3
- package/dist/{list.handler-FlchXrKz.mjs → list.handler-DUz1bJ4x.mjs} +4 -4
- package/dist/{list.handler-D-YFoKLU.mjs → list.handler-pHnPFep8.mjs} +7 -7
- package/dist/{listen-rHLiCWbn.mjs → listen-DLGZEQRL.mjs} +3 -3
- package/dist/{listen.handler-B9T58yAj.mjs → listen.handler-kaAvYk-B.mjs} +4 -4
- package/dist/logs-CcYqFKRU.mjs +58 -0
- package/dist/logs.handler-DyRoevtO.mjs +53 -0
- package/dist/{logs.handler-DGcGN2qb.mjs → logs.handler-lboRKNoE.mjs} +4 -4
- package/dist/{members.add.handler-DmYI43rZ.mjs → members.add.handler-DBydP0SR.mjs} +4 -4
- package/dist/{members.invite.handler-B_KVxv5m.mjs → members.invite.handler-D4-7fiYC.mjs} +4 -4
- package/dist/{members.list.handler-BtuuIgQS.mjs → members.list.handler-Z4cIbcNg.mjs} +4 -4
- package/dist/{members.remove.handler-Lvg-CqVv.mjs → members.remove.handler-J56D83O7.mjs} +4 -4
- package/dist/{members.update.handler-D-8izeso.mjs → members.update.handler-B5rBv6dt.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-DGS91uc-.mjs} +17 -17
- package/dist/{orgs.create.handler-vXQgDJZ_.mjs → orgs.create.handler-B4naNUSN.mjs} +4 -4
- package/dist/{orgs.get.handler-D_Jfl18x.mjs → orgs.get.handler-Ci_JrT08.mjs} +4 -4
- package/dist/{orgs.list.handler-BNjoTJvV.mjs → orgs.list.handler-CJ2byIEj.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-BQSQvQhB.mjs} +3 -3
- package/dist/{projects-CbquwUlm.mjs → projects-D90_uEC2.mjs} +5 -5
- package/dist/{projects-DfaG_3WP.mjs → projects-fWvIJQ80.mjs} +1 -1
- package/dist/{register.handler-BAx0IC-u.mjs → register.handler-CleQJhtQ.mjs} +2 -2
- package/dist/{requirements.handler-D5dFi7XZ.mjs → requirements.handler-B51sxQSy.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-CC6y2XXI.mjs} +5 -5
- package/dist/{run.handler-BiBDLoeH.mjs → run.handler-B31BpZJP.mjs} +9 -9
- package/dist/{runs-Bc3zjk7V.mjs → runs-Bg_qDeQi.mjs} +4 -4
- 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-JwKWpGvU.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-B0tNjKMg.mjs} +1 -1
- package/dist/{status.handler-DxCJRm1n.mjs → status.handler-BsVtDW_V.mjs} +19 -4
- package/dist/{switch.handler-CTwhIcaQ.mjs → switch.handler-Cu81T2HY.mjs} +5 -5
- package/dist/{sync-Pssitj6K.mjs → sync-CXNveL61.mjs} +2 -2
- package/dist/{sync.handler-Be0U3x-n.mjs → sync.handler-7g1yDt0H.mjs} +9 -9
- package/dist/{task-BNXDZU71.mjs → task-BguWXIiH.mjs} +2 -2
- package/dist/{task-target-build-BG6cC3bz.mjs → task-target-build-BaMtXnN7.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-A5hz3c7j.mjs} +4 -4
- package/dist/{test.handler-DkizZhVu.mjs → test.handler-CJtaMZVy.mjs} +12 -12
- package/dist/{test.handler-Dk3CmTa7.mjs → test.handler-Cq2l7SAr.mjs} +2 -2
- package/dist/{tool.handler--IzRGelu.mjs → tool.handler-B-mOL128.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-Bq2zRbkV.mjs} +1 -1
- package/dist/{upgrade-cH9I_pZq.mjs → upgrade-DhfpoyRV.mjs} +2 -2
- package/dist/{upgrade.handler-CXEF4ue0.mjs → upgrade.handler-5qSzPC7D.mjs} +1 -1
- package/dist/{upload.handler-CpKuAaQ_.mjs → upload.handler-D3-W_1kq.mjs} +10 -10
- package/dist/{users.get.handler-D0WO6D1K.mjs → users.get.handler-Bd0OBI-E.mjs} +4 -4
- package/dist/{users.list.handler-BSTIniF1.mjs → users.list.handler-CacJz6eC.mjs} +4 -4
- package/dist/{users.set-role.handler-DAKdSkbn.mjs → users.set-role.handler-bZMQtUR0.mjs} +4 -4
- package/dist/{utils-VC0Vl_pm.mjs → utils-BMUWnz1P.mjs} +2 -2
- package/dist/{validate.handler-I8LY-UkG.mjs → validate.handler-Ccq66ki4.mjs} +8 -8
- package/dist/{workflow-build-C9rQQ4qU.mjs → workflow-build-_WNsLKwW.mjs} +23 -23
- package/dist/{workflow-build-manifest-OPFqFD6f.mjs → workflow-build-manifest-B2GqHyWE.mjs} +3 -3
- package/dist/{workflow-bundler-BzHk73PM-AIB4-u4Y.mjs → workflow-bundler-BzHk73PM-WI31RJjH.mjs} +3 -3
- package/dist/{workflows-CL1jYSLR.mjs → workflows-Dy2M9bEr.mjs} +16 -16
- package/dist/{writer-B-SpZ0G2-olEAgSLc.mjs → writer-B-SpZ0G2-tq1MFgid.mjs} +6 -6
- package/package.json +4 -4
- package/dist/clear.handler-Dpe05eTq.mjs +0 -42
- package/dist/dist-BF6r1hfv.mjs +0 -308
- 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/{default-urls-BS4twrsS.mjs → default-urls-CTQqM1_A.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/{schemas-DodkHgnS.mjs → schemas-B8c7Z5Iy.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-Bid-Rqj7.mjs";
|
|
6
6
|
//#region src/commands/workflows/paused/paused.handler.ts
|
|
7
7
|
async function handleWorkflowsPaused(options, ctx) {
|
|
8
8
|
const client = requireClient(ctx);
|
|
@@ -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-BE37hxR3.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
|
}
|
|
@@ -2204,7 +2204,7 @@ const bundles = (api) => ({
|
|
|
2204
2204
|
})),
|
|
2205
2205
|
purpose
|
|
2206
2206
|
} }).json();
|
|
2207
|
-
const { batchUpload } = await import("./upload-
|
|
2207
|
+
const { batchUpload } = await import("./upload-BbcMkyVl.mjs").then((n) => n.n);
|
|
2208
2208
|
return batchUpload(workflows.map((wf) => ({
|
|
2209
2209
|
name: wf.workflowName,
|
|
2210
2210
|
bundle: wf.bundle,
|
|
@@ -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) {
|
|
@@ -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-WFPTDQB3.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-DYvr3XDb.mjs";
|
|
9
|
+
import { t as groupCredentialRequirements } from "./credentials-DUkVbhvj.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-WFPTDQB3.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-Bid-Rqj7.mjs";
|
|
8
|
+
import { n as resolveWorkflowsDir } from "./resolve-project-CNQtOWE4.mjs";
|
|
9
|
+
import { t as lookupCurrentDeploymentWorkflow } from "./current-deployment-workflow-DiwUcKoB.mjs";
|
|
10
|
+
import { i as resolveWorkflowGlobals, o as validateInputOrExit, r as resolveRunInput, s as validateWorkflowGlobalsOrExit, t as pollForCompletion } from "./run-polling-CC6y2XXI.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-BE37hxR3.mjs";
|
|
6
|
+
import { i as requireClient } from "./context-Bid-Rqj7.mjs";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
//#region src/commands/runs/inspect-display.ts
|
|
9
9
|
function renderRunInspect(input) {
|
|
@@ -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-BE37hxR3.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-fWvIJQ80.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-Bid-Rqj7.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-BE37hxR3.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-7g1yDt0H.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-Bid-Rqj7.mjs";
|
|
6
|
+
import { n as deployFromDir } from "./dist-WFPTDQB3.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-_WNsLKwW.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-B8c7Z5Iy.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());
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
3
|
+
import { r as getKeystrokeProjectPath } from "./paths-JzzFkXQA-CEipIeVl.mjs";
|
|
4
|
+
import "./dist-CIInPRGh.mjs";
|
|
5
|
+
import { t as readCredentialKeysFromSchemaObject } from "./read-credential-keys-77a91T8M-B0eiobOd.mjs";
|
|
5
6
|
import path from "node:path";
|
|
7
|
+
import { mkdir, writeFile } from "node:fs/promises";
|
|
6
8
|
import { pathToFileURL } from "node:url";
|
|
7
9
|
import { createHash, randomUUID } from "node:crypto";
|
|
8
10
|
//#region ../../packages/workflow-builder/dist/builder-options-BT2McCyF.mjs
|
|
@@ -109,7 +111,7 @@ async function buildTaskTargetFile(options) {
|
|
|
109
111
|
return builtTasks;
|
|
110
112
|
}
|
|
111
113
|
async function bundleTaskTargetModule(options) {
|
|
112
|
-
const [{ rolldown }, { createEnvAccessPlugin, formatEnvAccessError }] = await Promise.all([import("rolldown"), import("./detect-env-access-CwkOYeYM-
|
|
114
|
+
const [{ rolldown }, { createEnvAccessPlugin, formatEnvAccessError }] = await Promise.all([import("rolldown"), import("./detect-env-access-CwkOYeYM-CNTyUzme.mjs").then((n) => n.n).then((n) => n.n)]);
|
|
113
115
|
const entryId = "\0virtual:task-target-entry";
|
|
114
116
|
const trackedDependencies = /* @__PURE__ */ new Set();
|
|
115
117
|
const envViolations = [];
|
|
@@ -216,7 +218,7 @@ async function attachTaskTargetTriggers(options) {
|
|
|
216
218
|
options.artifact.triggers.push(...buildTaskTriggerArtifactsWithoutBundles(options.entry.taskMetadata.triggers, options.artifact.task.taskId, options.artifact.task.taskName));
|
|
217
219
|
return [];
|
|
218
220
|
}
|
|
219
|
-
const { buildTriggerArtifacts } = await import("./trigger-artifacts-RizI57RC-
|
|
221
|
+
const { buildTriggerArtifacts } = await import("./trigger-artifacts-RizI57RC-DjhOsdOm.mjs").then((n) => n.n);
|
|
220
222
|
const triggerResult = await buildTriggerArtifacts(options.entry.taskMetadata.triggers, options.artifact.task.taskId, options.artifact.task.taskName, options.projectRoot, {
|
|
221
223
|
workflowExportName: options.entry.source.localExportName,
|
|
222
224
|
workflowFilePath: options.entry.runtimeBundlePath
|
|
@@ -319,7 +321,7 @@ function createPreparedTaskTarget(artifact, triggers) {
|
|
|
319
321
|
};
|
|
320
322
|
}
|
|
321
323
|
async function tryParseTaskBuildManifest(manifest) {
|
|
322
|
-
const { TaskBuildManifestSchema } = await import("./task-
|
|
324
|
+
const { TaskBuildManifestSchema } = await import("./task-BguWXIiH.mjs").then((n) => n.t);
|
|
323
325
|
const result = TaskBuildManifestSchema.safeParse(manifest);
|
|
324
326
|
return result.success ? result.data : null;
|
|
325
327
|
}
|
|
@@ -330,8 +332,7 @@ function readOptionalJsonSchemaKeysFromSchemaObject(schema) {
|
|
|
330
332
|
return properties.filter((key) => !required.has(key));
|
|
331
333
|
}
|
|
332
334
|
function getTaskRuntimeBundlePath(projectRoot, target) {
|
|
333
|
-
|
|
334
|
-
return path.join(projectRoot, ".keystroke", "task-target-build", `${hash}.mjs`);
|
|
335
|
+
return getKeystrokeProjectPath(projectRoot, "task-target-build", `${createHash("sha256").update(target.bindingKey).digest("hex").slice(0, 16)}.mjs`);
|
|
335
336
|
}
|
|
336
337
|
async function writeRuntimeBundle(bundlePath, code) {
|
|
337
338
|
await mkdir(path.dirname(bundlePath), { recursive: true });
|
package/dist/{task-target-deploy-CZBGNC0H-Ck724yF4.mjs → task-target-deploy-CZBGNC0H-I-tvkGCC.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { n as SHA256HashSchema } from "./common-
|
|
3
|
+
import { n as SHA256HashSchema } from "./common-AK0q0Oz0.mjs";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
//#region ../../packages/shared-types/src/deployments/api/snapshot-payload.ts
|
|
6
6
|
function sortObjectKeysDeep(value) {
|