@keystrokehq/cli 0.0.31 → 0.0.37
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 +25 -4
- package/dist/{accept.handler-DNfIXPSP.mjs → accept.handler-DCsud1s5.mjs} +4 -4
- package/dist/{admin-CJp8XksD.mjs → admin-BaOtHeZ2.mjs} +10 -10
- package/dist/{agent-manifest-De5TCxZq.mjs → agent-manifest-DfWD5tvv.mjs} +17 -27
- package/dist/{agents-G37PM35Z.mjs → agents-BVAVfMR_.mjs} +9 -9
- package/dist/{api-keys-4igNHJ_W.mjs → api-keys-BhEEsHUh.mjs} +6 -6
- package/dist/{api-BK3EhPvs.mjs → api-sWkB_Wta.mjs} +1 -1
- package/dist/{auth-CIOmmV4x.mjs → auth-BnsitjzT.mjs} +6 -6
- package/dist/{auth.handler-CznN_vfz.mjs → auth.handler-W_xk14TL.mjs} +3 -3
- package/dist/authored-workflow-ref-fkHEEVnd.mjs +113 -0
- package/dist/{build-agents-DseUtzd4-CSGpNXur.mjs → build-agents-CUzBnlAG-3ePFZiJ6.mjs} +12 -11
- package/dist/{build-progress-DLM1Bt4T.mjs → build-progress-CM-b6Bby.mjs} +2 -2
- package/dist/{build-tasks-C09SdfjC-BmAVLTtQ.mjs → build-tasks-5eOvI19S-tbN6CRx9.mjs} +4 -4
- package/dist/{build-workflows-BZ_m97Pr-BiyptCrn.mjs → build-workflows-C-gQM3l5-_zcBHE3M.mjs} +14 -9
- package/dist/{build.handler-zHimoO7c.mjs → build.handler-CpAsAsBc.mjs} +12 -9
- package/dist/{clear-cache.handler-BP0K1-uN.mjs → clear-cache.handler-gJpwslkK.mjs} +2 -2
- package/dist/{clear.handler-T27GpgSu.mjs → clear.handler-CDyG6-dk.mjs} +1 -1
- package/dist/{clear.handler-PsA5QKHx.mjs → clear.handler-_sR33Hp8.mjs} +2 -2
- package/dist/{commander-BlrSdFcu.mjs → commander-C6SSTQJ2.mjs} +22 -3
- package/dist/{connect-BbLJhlIA.mjs → connect-27EgnljZ.mjs} +3 -3
- package/dist/{connect.handler-BthE-7Wg.mjs → connect.handler-COM1LnNg.mjs} +5 -5
- package/dist/{context-sgKhRc5v.mjs → context-ebZssGCY.mjs} +4 -4
- package/dist/{create.handler-BovbO_g0.mjs → create.handler-CAWJAGzQ.mjs} +3 -3
- package/dist/{credential-env-map-CRs0llf0.mjs → credential-env-map-5a41jLwM.mjs} +1 -1
- package/dist/{credential-requirements-D0mavK8j-CFMf0Xwu.mjs → credential-requirements-B5Alhu1v-DanlSKnT.mjs} +3 -3
- package/dist/{credential-schema-mismatch-ClQgEVtO.mjs → credential-schema-mismatch-c17ktoNU.mjs} +1 -1
- package/dist/{credentials-CsncZ52a.mjs → credentials-C0ssbMlp.mjs} +10 -10
- package/dist/{credentials-DKrSaaLw.mjs → credentials-DtwLbee6.mjs} +1 -1
- package/dist/current-deployment-workflow-C6x65imE.mjs +20 -0
- package/dist/current.handler-DP1L_hm3.mjs +19 -0
- package/dist/{delete.handler-DkAK396w.mjs → delete.handler-C-5XFkgN.mjs} +2 -2
- package/dist/{deploy-DvPfR9fC.mjs → deploy-BcVQJza8.mjs} +2 -2
- package/dist/{deploy-progress-BsUH7fGE.mjs → deploy-progress-Bt86Yc1r.mjs} +2 -2
- package/dist/{deploy.handler-BW3f2N2G.mjs → deploy.handler-GPS9lxGk.mjs} +16 -16
- package/dist/{diff-utils-Bs--xmoV.mjs → diff-utils-YEUYtSRs.mjs} +1 -1
- package/dist/{diff.handler-BwhsoAg0.mjs → diff.handler-DkM5dhaN.mjs} +15 -9
- package/dist/{dist-Dw7gCE7y.mjs → dist-B5jy238v.mjs} +37 -11
- package/dist/{dist-CTEtWDW4.mjs → dist-BmbFJq8U.mjs} +8 -27
- package/dist/{env.handler-Dks6ZQh-.mjs → env.handler-V_isbSi2.mjs} +52 -29
- package/dist/{error-boundary-0veZ_RDS.mjs → error-boundary-BRxUsPi7.mjs} +3 -3
- package/dist/{iam-command-utils-CSZj4XlH.mjs → iam-command-utils-DNDN0wT6.mjs} +3 -13
- package/dist/{import-module-y0glInUe-DV_3dsU0.mjs → import-module-y0glInUe-EuAWaw9g.mjs} +506 -128
- package/dist/{init-DX08T87c.mjs → init-D1OmmclX.mjs} +8 -3
- package/dist/{init.handler-CzlmkNXi.mjs → init.handler-CUbYlUgP.mjs} +57 -14
- package/dist/{inspect.handler-v9snxDLi.mjs → inspect.handler-BE6coOuW.mjs} +24 -13
- package/dist/{integration-catalog-CiZ62hb_.mjs → integration-catalog-pSmWHFLQ.mjs} +3 -3
- package/dist/{integrations-MEExmqcg.mjs → integrations-DZD5t8n2.mjs} +7 -7
- package/dist/{invites-BuatfJmN.mjs → invites-BuR1H-tA.mjs} +5 -5
- package/dist/{invites.list.handler-CK6mL10z.mjs → invites.list.handler-Dj4a6XOg.mjs} +6 -5
- package/dist/{invites.resend.handler-CKZouK1Z.mjs → invites.resend.handler-DEGF4vlB.mjs} +6 -5
- package/dist/{invites.revoke.handler-H0VI-3sp.mjs → invites.revoke.handler-Dg4ZvlFS.mjs} +6 -5
- package/dist/keystroke.mjs +122 -77
- package/dist/{list-enrichment-DP1wEyBZ.mjs → list-enrichment-dqbkXJzy.mjs} +2 -2
- package/dist/{list.handler-LxZInip2.mjs → list.handler-2g1CZAvB.mjs} +4 -4
- package/dist/{list.handler-BKfGLkFu.mjs → list.handler-7MkJfkak.mjs} +5 -5
- package/dist/list.handler-BTYVIn6z.mjs +39 -0
- package/dist/{list.handler-BiY5NFWd.mjs → list.handler-Bchcr3-e.mjs} +3 -3
- package/dist/list.handler-Choc4SZz.mjs +64 -0
- package/dist/{list.handler-Jk_vK66s.mjs → list.handler-D47C1z3m.mjs} +4 -4
- package/dist/{list.handler-DVnFrlis.mjs → list.handler-DYE48apa.mjs} +7 -7
- package/dist/{list.handler-DIMWZx78.mjs → list.handler-KcCaG3PZ.mjs} +4 -4
- package/dist/list2.handler-BIaIyrQf.mjs +99 -0
- package/dist/{listen-C_7Rgwkb.mjs → listen-CVY-_F29.mjs} +3 -3
- package/dist/{listen.handler-dJgorIzr.mjs → listen.handler-D_nEvXRn.mjs} +4 -4
- package/dist/{logs-B9YMhUGt.mjs → logs-CZ2qnsSH.mjs} +3 -3
- package/dist/{logs.handler-BfjCsAyq.mjs → logs.handler-BRUzZC9Z.mjs} +26 -29
- package/dist/{logs.handler-DGGVPMOX.mjs → logs.handler-Wk6mYyAZ.mjs} +1 -1
- package/dist/{members.add.handler-DSRCRxsI.mjs → members.add.handler-BJ0wr6rP.mjs} +6 -5
- package/dist/{members.invite.handler-BNpHn1dY.mjs → members.invite.handler-DyveDMuq.mjs} +6 -5
- package/dist/{members.list.handler-Bn9LJEPG.mjs → members.list.handler-CyQxH_zS.mjs} +6 -5
- package/dist/{members.remove.handler-Dkr2t_tX.mjs → members.remove.handler-Dtv9PooY.mjs} +6 -5
- package/dist/{members.update.handler-DBtUYuAY.mjs → members.update.handler-CeK-tCjT.mjs} +6 -5
- package/dist/{operations-AWMLs6mE.mjs → operations-CxQlt0S0.mjs} +5 -5
- package/dist/{org-DOH7YHk2.mjs → org-B8MPHJJu.mjs} +35 -28
- package/dist/org-context-BI9OSpbb.mjs +112 -0
- package/dist/org-output-DffU7DKn.mjs +64 -0
- package/dist/{orgs.create.handler-BO70zIdp.mjs → orgs.create.handler-BKvSmkU3.mjs} +4 -4
- package/dist/{orgs.get.handler-BuGg5bc9.mjs → orgs.get.handler-BA-CexIY.mjs} +4 -4
- package/dist/{orgs.list.handler--5HutMkl.mjs → orgs.list.handler-eCEg5kC1.mjs} +4 -4
- package/dist/{output-BWcVRt-T.mjs → output-DnIFEmi5.mjs} +1 -1
- package/dist/package-manager-BP3-q8hh.mjs +162 -0
- package/dist/{paused.handler-DHvxz-cC.mjs → paused.handler-4wKMTKZ-.mjs} +20 -33
- package/dist/{projects-C5GZ5Jrf.mjs → projects-Wu_2fB_x.mjs} +11 -9
- package/dist/{register.handler-CePNU3sP.mjs → register.handler-BvAkXCwE.mjs} +2 -2
- package/dist/{render-credential-Bn15FEUC.mjs → render-credential-D-H1ECDt.mjs} +1 -1
- package/dist/{render-operation-Bc7Wu1sP.mjs → render-operation-VdEPhoII.mjs} +2 -2
- package/dist/{requirements.handler-B5rqCjMu.mjs → requirements.handler-Bab4kBtw.mjs} +7 -7
- package/dist/{resolve-cli-credentials-CAOSVMJP.mjs → resolve-cli-credentials-GVOOedoQ.mjs} +1 -1
- package/dist/{resolve-project-E9mrh_el.mjs → resolve-project-DLKlAy0z.mjs} +24 -8
- package/dist/{run-polling-DawiBus-.mjs → run-polling-C5fI7xTp.mjs} +97 -14
- package/dist/{run.handler-BG7xitEK.mjs → run.handler-BKD5Xu0A.mjs} +42 -30
- package/dist/{runs-swYYBT6C.mjs → runs-CT31dczt.mjs} +4 -4
- package/dist/{schema-display-FvI8QjOQ.mjs → schema-display-sZ6ConJd.mjs} +33 -26
- package/dist/schemas-ClAIoIrX.mjs +281 -0
- package/dist/{search-BEfy2fG9.mjs → search-BeQW_pf4.mjs} +3 -3
- package/dist/{search.handler-V7ObLGjN.mjs → search.handler-BJ-ZlDL4.mjs} +6 -6
- package/dist/{show.handler-C_VDYU91.mjs → show.handler-BrIHUH28.mjs} +4 -4
- package/dist/{show.handler-CsidInW8.mjs → show.handler-Cqe_hCqU.mjs} +5 -5
- package/dist/{show.handler-Wmv0tkxx.mjs → show.handler-DB8xl5FU.mjs} +6 -6
- package/dist/{skill-installer-D6j9IA3Z.mjs → skill-installer-DuMhavmM.mjs} +3 -1
- package/dist/{skills-sync.handler-BAATdT6N.mjs → skills-sync.handler-BGs-_YD9.mjs} +13 -7
- package/dist/{skills.command-0-E8mcYE.mjs → skills.command-DUWn6FbL.mjs} +5 -5
- package/dist/skills.handler-DqLXJepA.mjs +9 -0
- package/dist/{spinner-progress-lrKDs4YF.mjs → spinner-progress-BYxlr3lY.mjs} +1 -1
- package/dist/status.handler-DAId4bVU.mjs +72 -0
- package/dist/{switch.handler-BwYndsP-.mjs → switch.handler-Cd4Yg2n8.mjs} +17 -4
- package/dist/{sync-6fZkIUtn.mjs → sync-DgC4lcxh.mjs} +2 -2
- package/dist/{sync.handler-Ctr-cN9X.mjs → sync.handler-Cm_WtGmH.mjs} +8 -8
- package/dist/{task-BWuIKWh4.mjs → task-DTvLzUkA.mjs} +2 -88
- package/dist/{task-target-build-QllcCfoN.mjs → task-target-build-CtvRyVjH.mjs} +5 -5
- package/dist/task-target-deploy-runner.mjs +6 -6
- package/dist/{test-C8VIZe9V.mjs → test-4V7nh67i.mjs} +5 -5
- package/dist/{test.handler-BCW0YBPd.mjs → test.handler-BdCYcwR4.mjs} +2 -2
- package/dist/{test.handler-DLaxrJ9V.mjs → test.handler-Bo4YTs2Z.mjs} +19 -16
- package/dist/{tool.handler-8qNmgdRe.mjs → tool.handler-CPCrSDq2.mjs} +12 -12
- package/dist/{trigger-artifacts-BcRScRSp-BiD2h6do.mjs → trigger-artifacts-BcRScRSp-BRpU-He5.mjs} +2 -2
- package/dist/{trigger-manifest-C07EM-b2.mjs → trigger-manifest-BVqjDhxU.mjs} +1 -1
- package/dist/{upgrade-DgOcc8IT.mjs → upgrade-2qUOcjxb.mjs} +4 -8
- package/dist/upgrade.handler-PqlKSuUE.mjs +99 -0
- package/dist/{upload.handler-B7xle1oX.mjs → upload.handler-CS-vLpzC.mjs} +9 -9
- package/dist/{users.get.handler-C4t1vXwi.mjs → users.get.handler-CH1c6Lnj.mjs} +4 -4
- package/dist/{users.list.handler-Dvl90grq.mjs → users.list.handler-CxbZFgjO.mjs} +4 -4
- package/dist/{users.set-role.handler-Djw1_VGf.mjs → users.set-role.handler-CBRE-Ws6.mjs} +4 -4
- package/dist/{validate.handler-Drf_lssw.mjs → validate.handler-1d-UmtXB.mjs} +171 -26
- package/dist/{workflow-build-Begvjfq8.mjs → workflow-build-Bm8JoVv4.mjs} +234 -32
- package/dist/{workflow-build-manifest-1sC52TIG.mjs → workflow-build-manifest-CV6bBmDO.mjs} +1 -1
- package/dist/{workflow-bundler-BzHk73PM-muPv1yGG.mjs → workflow-bundler-Bs3zQNQv-Dy7lXxy3.mjs} +15 -4
- package/dist/{workflows-DjMlxuBX.mjs → workflows-ny7rOdeH.mjs} +34 -37
- package/dist/{writer-byNNUjRm-B-on1n6c.mjs → writer-BLg0RuZa-Y6ExdYH9.mjs} +6 -4
- package/package.json +11 -11
- package/dist/current-deployment-workflow-B1VQCYC-.mjs +0 -94
- package/dist/current.handler-BaGaCLzB.mjs +0 -21
- package/dist/list.handler-BEMj3FyH.mjs +0 -76
- package/dist/list.handler-Cq_oQY5B.mjs +0 -52
- package/dist/list.handler-htR9TeiS.mjs +0 -24
- package/dist/package-manager-DT1EhOkS.mjs +0 -61
- package/dist/schemas-D2zfmyC-.mjs +0 -671
- package/dist/skills.handler-DYIQK0Vu.mjs +0 -9
- package/dist/status.handler-Ch_DtyBp.mjs +0 -109
- package/dist/upgrade.handler-DSZuw7-9.mjs +0 -80
- /package/dist/{build-metadata-BB_L45ZS-DSJL7dTy.mjs → build-metadata-BB_L45ZS-DRQsV6JK.mjs} +0 -0
- /package/dist/{deploy-DhCbYFc7.mjs → deploy-BiKBH25R.mjs} +0 -0
- /package/dist/{detect-env-access-CwkOYeYM-COq4U-4Y.mjs → detect-env-access-CwkOYeYM-r4aynBU0.mjs} +0 -0
- /package/dist/{read-credential-keys-77a91T8M-DGK5XTQp.mjs → read-credential-keys-77a91T8M-I07NYwfH.mjs} +0 -0
- /package/dist/{run-polling-fBouPjJ2.mjs → run-polling-1c0ckC1A.mjs} +0 -0
- /package/dist/{schemas-4Mq_bxob.mjs → schemas-8nhXlXWh.mjs} +0 -0
- /package/dist/{task-target-deploy-B_3HPSo2.mjs → task-target-deploy-m9LfE488.mjs} +0 -0
- /package/dist/{types-AlA-ifK9.mjs → types-Cb0eWmUU.mjs} +0 -0
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { i as projects } from "./dist-
|
|
5
|
-
import { t as requireWorkflowsDir } from "./resolve-project-
|
|
6
|
-
import { a as runWorkflowBuild, i as renderBuildSummary, n as renderBuildFailure, r as renderBuildHeader } from "./workflow-build-
|
|
7
|
-
import { t as createBuildProgress } from "./build-progress-
|
|
8
|
-
import { t as withErrorBoundary } from "./error-boundary-
|
|
3
|
+
import { k as CliExitError, z as setDebug } from "./keystroke.mjs";
|
|
4
|
+
import { i as projects } from "./dist-B5jy238v.mjs";
|
|
5
|
+
import { t as requireWorkflowsDir } from "./resolve-project-DLKlAy0z.mjs";
|
|
6
|
+
import { a as runWorkflowBuild, i as renderBuildSummary, n as renderBuildFailure, r as renderBuildHeader } from "./workflow-build-Bm8JoVv4.mjs";
|
|
7
|
+
import { t as createBuildProgress } from "./build-progress-CM-b6Bby.mjs";
|
|
8
|
+
import { t as withErrorBoundary } from "./error-boundary-BRxUsPi7.mjs";
|
|
9
|
+
import { n as assertAuthoredWorkflowId, t as WORKFLOW_ID_COMMANDS } from "./authored-workflow-ref-fkHEEVnd.mjs";
|
|
9
10
|
//#region src/commands/workflows/build.handler.ts
|
|
10
11
|
async function handleWorkflowsBuild(options, _ctx) {
|
|
11
12
|
return withErrorBoundary("Build", async () => {
|
|
13
|
+
if (options.verbose) setDebug(true);
|
|
12
14
|
const workflowsDir = await requireWorkflowsDir(options.path);
|
|
13
15
|
projects.track(workflowsDir);
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
if (options.id) await assertAuthoredWorkflowId(options.id, workflowsDir, WORKFLOW_ID_COMMANDS.build);
|
|
17
|
+
renderBuildHeader(options.id);
|
|
18
|
+
const progress = createBuildProgress(options.id ?? "workflow");
|
|
16
19
|
try {
|
|
17
20
|
const { result, outDir } = await runWorkflowBuild({
|
|
18
21
|
workflowsDir,
|
|
19
22
|
verbose: options.verbose,
|
|
20
|
-
|
|
23
|
+
workflowRef: options.id,
|
|
21
24
|
force: options.force,
|
|
22
25
|
targetFiles: options.target,
|
|
23
26
|
...options.disableSourcemaps ? { sourceMaps: false } : {},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { i as projects } from "./dist-
|
|
3
|
+
import { p as ui } from "./keystroke.mjs";
|
|
4
|
+
import { i as projects } from "./dist-B5jy238v.mjs";
|
|
5
5
|
//#region src/commands/projects/clear-cache.handler.ts
|
|
6
6
|
async function handleProjectsClearCache(_options, _ctx) {
|
|
7
7
|
if (await projects.clear()) ui.success("Projects cache cleared.");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { F as closeLogger, P as clearLog } from "./keystroke.mjs";
|
|
4
4
|
import { log } from "@clack/prompts";
|
|
5
5
|
//#region src/commands/logs/clear.handler.ts
|
|
6
6
|
async function handleLogsClear(_options, _ctx) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { n as credentials } from "./dist-
|
|
3
|
+
import { I as logger, h as AUTH_HINT, p as ui, x as toErrorMessage } from "./keystroke.mjs";
|
|
4
|
+
import { n as credentials } from "./dist-B5jy238v.mjs";
|
|
5
5
|
import { createClient } from "./src-DI-ybNjR.mjs";
|
|
6
6
|
//#region src/commands/auth/clear.handler.ts
|
|
7
7
|
async function tryRevokeKey(apiKey, apiKeyId, baseUrl, organizationId) {
|
|
@@ -1,9 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { a as writeJsonError, r as isJsonMode } from "./output-
|
|
3
|
+
import { A as InputValidationError, f as applyCommanderOutput, h as AUTH_HINT, k as CliExitError, m as captureCliTelemetryResolvedContext, o as createHiddenGlobalOptions, p as ui, x as toErrorMessage, y as isAuthError, z as setDebug } from "./keystroke.mjs";
|
|
4
|
+
import { a as writeJsonError, r as isJsonMode } from "./output-DnIFEmi5.mjs";
|
|
5
5
|
import { Command } from "commander";
|
|
6
6
|
//#region src/lib/commander.ts
|
|
7
|
+
function mergeParentCommandPath(rawOptions, command, schema) {
|
|
8
|
+
if (!("path" in schema.shape)) return rawOptions;
|
|
9
|
+
const options = rawOptions && typeof rawOptions === "object" ? { ...rawOptions } : {};
|
|
10
|
+
const currentPath = options.path;
|
|
11
|
+
if (typeof currentPath === "string" && currentPath.length > 0) return options;
|
|
12
|
+
let current = command.parent;
|
|
13
|
+
while (current) {
|
|
14
|
+
const parentPath = current.opts().path;
|
|
15
|
+
if (typeof parentPath === "string" && parentPath.length > 0) {
|
|
16
|
+
options.path = parentPath;
|
|
17
|
+
break;
|
|
18
|
+
}
|
|
19
|
+
current = current.parent;
|
|
20
|
+
}
|
|
21
|
+
return options;
|
|
22
|
+
}
|
|
7
23
|
/**
|
|
8
24
|
* Applies typed options to a Commander command from a schema and configuration
|
|
9
25
|
* Type-safe: ensures all schema keys have corresponding option configurations
|
|
@@ -46,6 +62,8 @@ function applyTypedOptionsToCommand(command, schema, optionsConfig, skipKeys) {
|
|
|
46
62
|
function createTypedCommand(params) {
|
|
47
63
|
const { name, description, schema, optionsConfig, resolve, subcommands } = params;
|
|
48
64
|
const command = new Command(name).description(description).enablePositionalOptions();
|
|
65
|
+
applyCommanderOutput(command);
|
|
66
|
+
command.exitOverride();
|
|
49
67
|
for (const opt of createHiddenGlobalOptions()) command.addOption(opt);
|
|
50
68
|
const positionalArguments = params.arguments ?? (params.argument ? [params.argument] : []);
|
|
51
69
|
for (const arg of positionalArguments) {
|
|
@@ -66,6 +84,7 @@ function createTypedCommand(params) {
|
|
|
66
84
|
rawOptions = args[0];
|
|
67
85
|
cmd = args[1];
|
|
68
86
|
}
|
|
87
|
+
rawOptions = mergeParentCommandPath(rawOptions, cmd, schema);
|
|
69
88
|
const parseResult = schema.safeParse(rawOptions);
|
|
70
89
|
if (!parseResult.success) {
|
|
71
90
|
ui.error("Invalid options provided:");
|
|
@@ -78,7 +97,7 @@ function createTypedCommand(params) {
|
|
|
78
97
|
const globalOpts = cmd.optsWithGlobals();
|
|
79
98
|
if (globalOpts.debug) setDebug(true);
|
|
80
99
|
const contextMode = params.contextMode ?? "full";
|
|
81
|
-
const contextModule = await import("./context-
|
|
100
|
+
const contextModule = await import("./context-ebZssGCY.mjs").then((n) => n.n);
|
|
82
101
|
const contextOptions = {
|
|
83
102
|
apiKey: globalOpts.apiKey,
|
|
84
103
|
serverUrl: globalOpts.serverUrl,
|
|
@@ -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-DnIFEmi5.mjs";
|
|
4
|
+
import { t as createTypedCommand } from "./commander-C6SSTQJ2.mjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
//#region src/commands/connect/connect.command.ts
|
|
7
7
|
const ConnectOptionsSchema = JsonOptionSchema.extend({
|
|
@@ -61,7 +61,7 @@ function createConnectCommand() {
|
|
|
61
61
|
description: "Connect an official integration via OAuth (e.g., keystroke connect slack)",
|
|
62
62
|
schema: ConnectOptionsSchema,
|
|
63
63
|
optionsConfig: CONNECT_OPTIONS_CONFIG,
|
|
64
|
-
loadHandler: async () => (await import("./connect.handler-
|
|
64
|
+
loadHandler: async () => (await import("./connect.handler-COM1LnNg.mjs")).handleConnect,
|
|
65
65
|
argument: {
|
|
66
66
|
name: "integrationId",
|
|
67
67
|
description: "Integration to connect (e.g., slack, linear)",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { N as throwReportedCliExit, b as isNetworkError, h as AUTH_HINT, p as ui, x as toErrorMessage } from "./keystroke.mjs";
|
|
4
4
|
import { t as assertWorkflowProjectRoot } from "./project-config-DudGRFPO.mjs";
|
|
5
|
-
import { i as writeJson } from "./output-
|
|
6
|
-
import { n as resolveWorkflowsDir } from "./resolve-project-
|
|
5
|
+
import { i as writeJson } from "./output-DnIFEmi5.mjs";
|
|
6
|
+
import { n as resolveWorkflowsDir } from "./resolve-project-DLKlAy0z.mjs";
|
|
7
7
|
import { t as openBrowser } from "./browser-Dvv5OQrt.mjs";
|
|
8
|
-
import { i as InitiateConnectionResponseSchema, n as ConnectionStatusResponseSchema, r as InitiateConnectionRequestSchema } from "./api-
|
|
9
|
-
import { t as getIntegrationCatalog } from "./integration-catalog-
|
|
8
|
+
import { i as InitiateConnectionResponseSchema, n as ConnectionStatusResponseSchema, r as InitiateConnectionRequestSchema } from "./api-sWkB_Wta.mjs";
|
|
9
|
+
import { t as getIntegrationCatalog } from "./integration-catalog-pSmWHFLQ.mjs";
|
|
10
10
|
//#region src/commands/connect/connect.handler.ts
|
|
11
11
|
function formatIntegrationLabel(catalog, integrationId) {
|
|
12
12
|
return catalog.lookupByPublicId(integrationId)?.name ?? integrationId;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { n as __exportAll } from "./chunk-CH6r78ws.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { n as credentials } from "./dist-
|
|
6
|
-
import { t as resolveCliCredentials } from "./resolve-cli-credentials-
|
|
7
|
-
import { a as writeJsonError } from "./output-
|
|
4
|
+
import { I as logger, O as AuthenticationError, c as getProcessEnv, g as REAUTH_HINT, h as AUTH_HINT, k as CliExitError, p as ui, s as getEnv, x as toErrorMessage, y as isAuthError } from "./keystroke.mjs";
|
|
5
|
+
import { n as credentials } from "./dist-B5jy238v.mjs";
|
|
6
|
+
import { t as resolveCliCredentials } from "./resolve-cli-credentials-GVOOedoQ.mjs";
|
|
7
|
+
import { a as writeJsonError } from "./output-DnIFEmi5.mjs";
|
|
8
8
|
//#region src/lib/context.ts
|
|
9
9
|
var context_exports = /* @__PURE__ */ __exportAll({
|
|
10
10
|
assertProjectConfigMatchesAuthenticatedOrg: () => assertProjectConfigMatchesAuthenticatedOrg,
|
|
@@ -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 { N as throwReportedCliExit, p as ui, x as toErrorMessage } from "./keystroke.mjs";
|
|
4
|
+
import { i as writeJson } from "./output-DnIFEmi5.mjs";
|
|
5
|
+
import { i as requireClient } from "./context-ebZssGCY.mjs";
|
|
6
6
|
//#region src/commands/api-keys/create.handler.ts
|
|
7
7
|
async function handleApiKeysCreate(options, ctx) {
|
|
8
8
|
const client = requireClient(ctx);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { r as getKeystrokeProjectPath } from "./paths-DpHfoaXN-CdPimpky.mjs";
|
|
4
|
-
import "./dist-
|
|
4
|
+
import "./dist-B5jy238v.mjs";
|
|
5
5
|
import * as fs from "node:fs/promises";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/lib/credential-env-map.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
//#region ../../packages/core/dist/chunks/schema-
|
|
4
|
+
//#region ../../packages/core/dist/chunks/schema-DuaOhhRR.mjs
|
|
5
5
|
const MAX_JSON_DEPTH = 20;
|
|
6
6
|
function buildJsonValueSchema(depth) {
|
|
7
7
|
const primitives = z.union([
|
|
@@ -51,7 +51,7 @@ function optionalDescriptionString(fieldName) {
|
|
|
51
51
|
return descriptionString(fieldName).optional();
|
|
52
52
|
}
|
|
53
53
|
//#endregion
|
|
54
|
-
//#region ../../packages/core/dist/chunks/schemas-
|
|
54
|
+
//#region ../../packages/core/dist/chunks/schemas-BvH7lOGL.mjs
|
|
55
55
|
/**
|
|
56
56
|
* Shared constants for the credential/connection system.
|
|
57
57
|
* Defined in core (bottom of dependency chain) so all packages can import them.
|
|
@@ -280,7 +280,7 @@ z.object({
|
|
|
280
280
|
return data.constant !== void 0 !== (data.exponential !== void 0);
|
|
281
281
|
}, { error: "Retry config must specify exactly one of constant or exponential strategy" });
|
|
282
282
|
//#endregion
|
|
283
|
-
//#region ../../packages/core/dist/chunks/credential-requirements-
|
|
283
|
+
//#region ../../packages/core/dist/chunks/credential-requirements-B5Alhu1v.mjs
|
|
284
284
|
const SourceLocationSchema = z.object({
|
|
285
285
|
filePath: z.string().min(1),
|
|
286
286
|
absoluteFilePath: z.string().min(1).optional(),
|
package/dist/{credential-schema-mismatch-ClQgEVtO.mjs → credential-schema-mismatch-c17ktoNU.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { i as writeJson } from "./output-
|
|
3
|
+
import { i as writeJson } from "./output-DnIFEmi5.mjs";
|
|
4
4
|
//#region src/lib/credential-schema-mismatch.ts
|
|
5
5
|
/**
|
|
6
6
|
* Structured detection and rendering for `CredentialSchemaMismatchError`
|
|
@@ -1,9 +1,9 @@
|
|
|
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-DnIFEmi5.mjs";
|
|
4
|
+
import { t as createTypedCommand } from "./commander-C6SSTQJ2.mjs";
|
|
5
5
|
import { i as CredentialScopeValues, n as CredentialConnectionIdSchema, r as CredentialScopeSchema } from "./schema-DFJiNWyd.mjs";
|
|
6
|
-
import { t as ConnectionKindValues } from "./api-
|
|
6
|
+
import { t as ConnectionKindValues } from "./api-sWkB_Wta.mjs";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
//#region ../../packages/shared-types/src/credentials/models/definition-records.ts
|
|
9
9
|
const JsonRecordSchema = z.record(z.string(), z.unknown());
|
|
@@ -265,13 +265,13 @@ function createCredentialsDefinitionsCommand() {
|
|
|
265
265
|
description: "Browse and inspect credential definitions (catalog metadata; not per-org credential sets)",
|
|
266
266
|
schema: CredentialDefinitionsListOptionsSchema,
|
|
267
267
|
optionsConfig: DEFINITIONS_LIST_OPTIONS_CONFIG,
|
|
268
|
-
loadHandler: async () => (await import("./list.handler-
|
|
268
|
+
loadHandler: async () => (await import("./list.handler-KcCaG3PZ.mjs")).handleCredentialDefinitionsList,
|
|
269
269
|
subcommands: [createTypedCommand({
|
|
270
270
|
name: "list",
|
|
271
271
|
description: "List credential definitions",
|
|
272
272
|
schema: CredentialDefinitionsListOptionsSchema,
|
|
273
273
|
optionsConfig: DEFINITIONS_LIST_OPTIONS_CONFIG,
|
|
274
|
-
loadHandler: async () => (await import("./list.handler-
|
|
274
|
+
loadHandler: async () => (await import("./list.handler-KcCaG3PZ.mjs")).handleCredentialDefinitionsList
|
|
275
275
|
}), createTypedCommand({
|
|
276
276
|
name: "show",
|
|
277
277
|
description: "Show one credential definition including auth schema",
|
|
@@ -282,7 +282,7 @@ function createCredentialsDefinitionsCommand() {
|
|
|
282
282
|
description: "Credential definition id, e.g. keystroke:aws-s3",
|
|
283
283
|
key: "id"
|
|
284
284
|
},
|
|
285
|
-
loadHandler: async () => (await import("./show.handler-
|
|
285
|
+
loadHandler: async () => (await import("./show.handler-Cqe_hCqU.mjs")).handleCredentialDefinitionShow
|
|
286
286
|
})]
|
|
287
287
|
});
|
|
288
288
|
}
|
|
@@ -329,7 +329,7 @@ function createCredentialsListCommand() {
|
|
|
329
329
|
description: "List credential sets on the server",
|
|
330
330
|
schema: ListOptionsSchema,
|
|
331
331
|
optionsConfig: LIST_OPTIONS_CONFIG,
|
|
332
|
-
loadHandler: async () => (await import("./list.handler-
|
|
332
|
+
loadHandler: async () => (await import("./list.handler-DYE48apa.mjs")).handleCredentialsList
|
|
333
333
|
});
|
|
334
334
|
}
|
|
335
335
|
//#endregion
|
|
@@ -348,7 +348,7 @@ function createCredentialsRequirementsCommand() {
|
|
|
348
348
|
description: "Show what credentials built workflows need (keys, KEYSTROKE_* env names, workflows) — from dist manifests, no API call",
|
|
349
349
|
schema: RequirementsOptionsSchema,
|
|
350
350
|
optionsConfig: REQUIREMENTS_OPTIONS_CONFIG,
|
|
351
|
-
loadHandler: async () => (await import("./requirements.handler-
|
|
351
|
+
loadHandler: async () => (await import("./requirements.handler-Bab4kBtw.mjs")).handleCredentialsRequirements
|
|
352
352
|
});
|
|
353
353
|
}
|
|
354
354
|
//#endregion
|
|
@@ -409,7 +409,7 @@ function createCredentialsUploadCommand() {
|
|
|
409
409
|
description: "Upload credentials from env vars to the server. Default: reads requirements from built workflow manifests. Use --integration for an official integration or --credential-set + --keys for a custom explicit upload.",
|
|
410
410
|
schema: UploadOptionsSchema,
|
|
411
411
|
optionsConfig: UPLOAD_OPTIONS_CONFIG,
|
|
412
|
-
loadHandler: async () => (await import("./upload.handler-
|
|
412
|
+
loadHandler: async () => (await import("./upload.handler-CS-vLpzC.mjs")).handleCredentialsUpload
|
|
413
413
|
});
|
|
414
414
|
}
|
|
415
415
|
//#endregion
|
|
@@ -440,7 +440,7 @@ function createCredentialsCommand() {
|
|
|
440
440
|
}
|
|
441
441
|
},
|
|
442
442
|
handler: async (opts, ctx) => {
|
|
443
|
-
const { handleCredentialsList } = await import("./list.handler-
|
|
443
|
+
const { handleCredentialsList } = await import("./list.handler-DYE48apa.mjs");
|
|
444
444
|
await handleCredentialsList({
|
|
445
445
|
...opts,
|
|
446
446
|
scope: void 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { f as collectCredentialRequirementEntries } from "./credential-requirements-
|
|
3
|
+
import { f as collectCredentialRequirementEntries } from "./credential-requirements-B5Alhu1v-DanlSKnT.mjs";
|
|
4
4
|
//#region ../../packages/workflow-deploy/dist/credentials/index.mjs
|
|
5
5
|
/**
|
|
6
6
|
* Resolves credential values from environment using KEYSTROKE_<KEY> convention.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { _ as getApiErrorCode, v as getHttpStatus } from "./keystroke.mjs";
|
|
4
|
+
//#region src/commands/workflows/_shared/current-deployment-workflow.ts
|
|
5
|
+
async function lookupCurrentDeploymentWorkflow(client, params) {
|
|
6
|
+
try {
|
|
7
|
+
return {
|
|
8
|
+
status: "found",
|
|
9
|
+
workflow: (await client.projects.getCurrentDeploymentWorkflow(params.projectId, params.authoredWorkflowId)).workflow
|
|
10
|
+
};
|
|
11
|
+
} catch (error) {
|
|
12
|
+
if (getHttpStatus(error) !== 404) throw error;
|
|
13
|
+
const errorCode = await getApiErrorCode(error);
|
|
14
|
+
if (errorCode === "no_current_deployment") return { status: "missingCurrentDeployment" };
|
|
15
|
+
if (errorCode === "workflow_not_in_deployment") return { status: "missingWorkflow" };
|
|
16
|
+
throw error;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { lookupCurrentDeploymentWorkflow as t };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { p as ui } from "./keystroke.mjs";
|
|
4
|
+
import { i as requireClient } from "./context-ebZssGCY.mjs";
|
|
5
|
+
import { c as resolveEffectiveOrganization, o as requireEffectiveOrganization } from "./org-context-BI9OSpbb.mjs";
|
|
6
|
+
import { n as renderOrgCurrentJson, t as renderOrgCurrentHuman } from "./org-output-DffU7DKn.mjs";
|
|
7
|
+
//#region src/commands/org/current.handler.ts
|
|
8
|
+
async function handleOrgCurrent(_options, ctx) {
|
|
9
|
+
const { user } = await requireClient(ctx).users.getMe();
|
|
10
|
+
const effective = requireEffectiveOrganization(await resolveEffectiveOrganization(ctx, user.organizations ?? []), ctx);
|
|
11
|
+
if (ctx.jsonMode) {
|
|
12
|
+
renderOrgCurrentJson(effective);
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
renderOrgCurrentHuman(effective);
|
|
16
|
+
if (ctx.storedOrgs.length > 1) ui.hint(`${ctx.storedOrgs.length} organizations with stored credentials. Use \`keystroke org switch\` to change.`);
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { handleOrgCurrent };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { i as requireClient } from "./context-
|
|
3
|
+
import { N as throwReportedCliExit, p as ui, x as toErrorMessage } from "./keystroke.mjs";
|
|
4
|
+
import { i as requireClient } from "./context-ebZssGCY.mjs";
|
|
5
5
|
//#region src/commands/api-keys/delete.handler.ts
|
|
6
6
|
async function handleApiKeysDelete(options, ctx) {
|
|
7
7
|
const client = requireClient(ctx);
|
|
@@ -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-C6SSTQJ2.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/commands/deploy/deploy.command.ts
|
|
6
6
|
/**
|
|
@@ -64,7 +64,7 @@ function createDeployCommand() {
|
|
|
64
64
|
schema: DeployOptionsSchema,
|
|
65
65
|
optionsConfig: DEPLOY_OPTIONS_CONFIG,
|
|
66
66
|
contextMode: "auth",
|
|
67
|
-
loadHandler: async () => (await import("./deploy.handler-
|
|
67
|
+
loadHandler: async () => (await import("./deploy.handler-GPS9lxGk.mjs")).handleDeploy
|
|
68
68
|
});
|
|
69
69
|
cmd.enablePositionalOptions();
|
|
70
70
|
cmd.passThroughOptions();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { t as createSpinnerProgress } from "./spinner-progress-
|
|
3
|
+
import { p as ui } from "./keystroke.mjs";
|
|
4
|
+
import { t as createSpinnerProgress } from "./spinner-progress-BYxlr3lY.mjs";
|
|
5
5
|
//#region src/lib/deploy-progress.ts
|
|
6
6
|
function renderItemFailure(event, kind, spinner) {
|
|
7
7
|
if (event.result === "failure") spinner.fail(`${kind} failed (${event.name})`, void 0, event.error);
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { i as projects } from "./dist-
|
|
3
|
+
import { I as logger, k as CliExitError, l as isLocalMode, n as style, p as ui, t as ANSI } from "./keystroke.mjs";
|
|
4
|
+
import { i as projects } from "./dist-B5jy238v.mjs";
|
|
5
5
|
import { t as assertWorkflowProjectRoot } from "./project-config-DudGRFPO.mjs";
|
|
6
|
-
import { r as requireAuthOptions, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-
|
|
7
|
-
import { i as readAgentManifestsFromOutDir, o as readWorkflowsFromDisk } from "./dist-
|
|
8
|
-
import { t as requireWorkflowsDir } from "./resolve-project-
|
|
9
|
-
import { n as renderBuildFailure, r as renderBuildHeader } from "./workflow-build-
|
|
10
|
-
import { t as createBuildProgress } from "./build-progress-
|
|
11
|
-
import { t as createDeployProgress } from "./deploy-progress-
|
|
12
|
-
import { t as withErrorBoundary } from "./error-boundary-
|
|
13
|
-
import { t as lookupCurrentDeploymentWorkflow } from "./current-deployment-workflow-
|
|
14
|
-
import { t as computeWorkflowDiff } from "./diff-utils-
|
|
6
|
+
import { r as requireAuthOptions, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-ebZssGCY.mjs";
|
|
7
|
+
import { i as readAgentManifestsFromOutDir, o as readWorkflowsFromDisk } from "./dist-BmbFJq8U.mjs";
|
|
8
|
+
import { t as requireWorkflowsDir } from "./resolve-project-DLKlAy0z.mjs";
|
|
9
|
+
import { n as renderBuildFailure, r as renderBuildHeader } from "./workflow-build-Bm8JoVv4.mjs";
|
|
10
|
+
import { t as createBuildProgress } from "./build-progress-CM-b6Bby.mjs";
|
|
11
|
+
import { t as createDeployProgress } from "./deploy-progress-Bt86Yc1r.mjs";
|
|
12
|
+
import { t as withErrorBoundary } from "./error-boundary-BRxUsPi7.mjs";
|
|
13
|
+
import { t as lookupCurrentDeploymentWorkflow } from "./current-deployment-workflow-C6x65imE.mjs";
|
|
14
|
+
import { t as computeWorkflowDiff } from "./diff-utils-YEUYtSRs.mjs";
|
|
15
15
|
import path from "node:path";
|
|
16
16
|
import { access } from "node:fs/promises";
|
|
17
17
|
//#region src/commands/deploy/deploy-diff.ts
|
|
@@ -198,7 +198,7 @@ async function handleDeploy(options, ctx) {
|
|
|
198
198
|
let outDir;
|
|
199
199
|
let artifactFilter;
|
|
200
200
|
try {
|
|
201
|
-
const { runWorkflowBuild } = await import("./workflow-build-
|
|
201
|
+
const { runWorkflowBuild } = await import("./workflow-build-Bm8JoVv4.mjs").then((n) => n.o);
|
|
202
202
|
const buildOutcome = await runWorkflowBuild({
|
|
203
203
|
workflowsDir,
|
|
204
204
|
verbose: options.verbose,
|
|
@@ -233,7 +233,7 @@ async function handleDeploy(options, ctx) {
|
|
|
233
233
|
const progress = createDeployProgress();
|
|
234
234
|
let result;
|
|
235
235
|
try {
|
|
236
|
-
result = await (deployHandlerDependencies.deployFromDir ?? (await import("./dist-
|
|
236
|
+
result = await (deployHandlerDependencies.deployFromDir ?? (await import("./dist-BmbFJq8U.mjs").then((n) => n.r)).deployFromDir)({
|
|
237
237
|
outDir,
|
|
238
238
|
workflowsDir,
|
|
239
239
|
client,
|
|
@@ -271,7 +271,7 @@ function emitNewWebhookCredentials(result) {
|
|
|
271
271
|
}
|
|
272
272
|
async function handleTaskTargetDeploy(options) {
|
|
273
273
|
renderBuildHeader(void 0);
|
|
274
|
-
const buildResult = await (deployHandlerDependencies.buildTaskTargets ?? (await import("./task-target-build-
|
|
274
|
+
const buildResult = await (deployHandlerDependencies.buildTaskTargets ?? (await import("./task-target-build-CtvRyVjH.mjs")).buildTaskTargets)({
|
|
275
275
|
projectRoot: options.workflowsDir,
|
|
276
276
|
targetFiles: options.targetFiles,
|
|
277
277
|
disableSourcemaps: options.options.disableSourcemaps
|
|
@@ -289,7 +289,7 @@ async function handleTaskTargetDeploy(options) {
|
|
|
289
289
|
const progress = createDeployProgress();
|
|
290
290
|
let result;
|
|
291
291
|
try {
|
|
292
|
-
result = await (deployHandlerDependencies.deployTaskTargets ?? (await import("./task-target-deploy-
|
|
292
|
+
result = await (deployHandlerDependencies.deployTaskTargets ?? (await import("./task-target-deploy-m9LfE488.mjs")).deployTaskTargets)({
|
|
293
293
|
preparedTasks: buildResult.preparedTasks,
|
|
294
294
|
client,
|
|
295
295
|
organizationId: options.projectConfig.organizationId,
|
|
@@ -327,7 +327,7 @@ async function createFullDeployClient(ctx) {
|
|
|
327
327
|
}
|
|
328
328
|
async function createTaskDeployClient(ctx) {
|
|
329
329
|
const authOptions = requireAuthOptions(ctx);
|
|
330
|
-
return (deployHandlerDependencies.createDeployClient ?? (await import("./deploy-
|
|
330
|
+
return (deployHandlerDependencies.createDeployClient ?? (await import("./deploy-BiKBH25R.mjs")).createDeployClient)(authOptions);
|
|
331
331
|
}
|
|
332
332
|
function renderSuccessSummary(result) {
|
|
333
333
|
const tasks = result.tasks || [];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { n as style, p as ui, t as ANSI } from "./keystroke.mjs";
|
|
4
4
|
//#region src/commands/workflows/diff/diff-utils.ts
|
|
5
5
|
function computeWorkflowDiff(local, deployed, meta) {
|
|
6
6
|
if (!deployed) return {
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { i as projects } from "./dist-
|
|
5
|
-
import { i as writeJson } from "./output-
|
|
6
|
-
import { i as requireClient, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-
|
|
7
|
-
import {
|
|
8
|
-
import { n as renderDiff, t as computeWorkflowDiff } from "./diff-utils-
|
|
3
|
+
import { N as throwReportedCliExit, k as CliExitError, p as ui, x as toErrorMessage } from "./keystroke.mjs";
|
|
4
|
+
import { i as projects } from "./dist-B5jy238v.mjs";
|
|
5
|
+
import { i as writeJson } from "./output-DnIFEmi5.mjs";
|
|
6
|
+
import { i as requireClient, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-ebZssGCY.mjs";
|
|
7
|
+
import { t as lookupCurrentDeploymentWorkflow } from "./current-deployment-workflow-C6x65imE.mjs";
|
|
8
|
+
import { n as renderDiff, t as computeWorkflowDiff } from "./diff-utils-YEUYtSRs.mjs";
|
|
9
|
+
import { r as requireLocalWorkflowManifest, t as WORKFLOW_ID_COMMANDS } from "./authored-workflow-ref-fkHEEVnd.mjs";
|
|
9
10
|
//#region src/commands/workflows/diff/diff.handler.ts
|
|
10
11
|
async function handleWorkflowsDiff(options, ctx) {
|
|
11
|
-
const resolved = await
|
|
12
|
+
const resolved = await requireLocalWorkflowManifest({
|
|
13
|
+
authoredWorkflowId: options.workflow,
|
|
14
|
+
path: options.path,
|
|
15
|
+
command: WORKFLOW_ID_COMMANDS.diff,
|
|
16
|
+
jsonMode: ctx.jsonMode
|
|
17
|
+
});
|
|
12
18
|
projects.track(resolved.workflowsDir);
|
|
13
19
|
const client = requireClient(ctx);
|
|
14
20
|
await assertProjectConfigMatchesAuthenticatedOrg(client, { organizationId: resolved.organizationId });
|
|
@@ -28,9 +34,9 @@ async function handleWorkflowsDiff(options, ctx) {
|
|
|
28
34
|
throwReportedCliExit("This project has no current deployment.");
|
|
29
35
|
}
|
|
30
36
|
if (deploymentLookup.status === "missingWorkflow") {
|
|
31
|
-
ui.error(`Workflow "${
|
|
37
|
+
ui.error(`Workflow "${resolved.authoredWorkflowId}" is not part of the current deployment.`);
|
|
32
38
|
ui.hint("Run `keystroke deploy` to include it in the current deployment, then try again.");
|
|
33
|
-
throwReportedCliExit(`Workflow "${
|
|
39
|
+
throwReportedCliExit(`Workflow "${resolved.authoredWorkflowId}" is not part of the current deployment.`);
|
|
34
40
|
}
|
|
35
41
|
const diff = computeWorkflowDiff(resolved.manifest, deploymentLookup.workflow.manifest, {
|
|
36
42
|
workflowName: resolved.manifest.name,
|
|
@@ -4,6 +4,7 @@ import { n as getKeystrokeBaseDir, t as KEYSTROKE_DIR } from "./paths-DpHfoaXN-C
|
|
|
4
4
|
import * as path$1 from "node:path";
|
|
5
5
|
import * as os from "node:os";
|
|
6
6
|
import * as fs from "node:fs/promises";
|
|
7
|
+
import { realpath } from "node:fs/promises";
|
|
7
8
|
import { z } from "zod";
|
|
8
9
|
//#region ../../packages/local-memory/dist/index.mjs
|
|
9
10
|
/**
|
|
@@ -518,6 +519,29 @@ const PROJECTS_DEFAULTS = {
|
|
|
518
519
|
version: PROJECTS_VERSION,
|
|
519
520
|
projects: {}
|
|
520
521
|
};
|
|
522
|
+
/** Resolve symlinks (e.g. macOS `/tmp` → `/private/tmp`) so aliases share one cache key. */
|
|
523
|
+
async function normalizeProjectPath(projectPath) {
|
|
524
|
+
const resolved = path$1.resolve(projectPath);
|
|
525
|
+
try {
|
|
526
|
+
return await realpath(resolved);
|
|
527
|
+
} catch {
|
|
528
|
+
return resolved;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
async function resolveProjectPaths(projectPath) {
|
|
532
|
+
return {
|
|
533
|
+
resolvedInput: path$1.resolve(projectPath),
|
|
534
|
+
canonicalPath: await normalizeProjectPath(projectPath)
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
function findStoredProjectKey(storedProjects, paths) {
|
|
538
|
+
if (paths.canonicalPath in storedProjects) return paths.canonicalPath;
|
|
539
|
+
if (paths.resolvedInput !== paths.canonicalPath && paths.resolvedInput in storedProjects) return paths.resolvedInput;
|
|
540
|
+
}
|
|
541
|
+
function readStoredProjectEntry(storedProjects, paths) {
|
|
542
|
+
const key = findStoredProjectKey(storedProjects, paths);
|
|
543
|
+
return key ? storedProjects[key] : void 0;
|
|
544
|
+
}
|
|
521
545
|
/**
|
|
522
546
|
* Domain controller for tracked Keystroke projects.
|
|
523
547
|
*
|
|
@@ -549,21 +573,21 @@ var Projects = class {
|
|
|
549
573
|
* up to a CLI command and degrade UX.
|
|
550
574
|
*/
|
|
551
575
|
async track(projectPath, options) {
|
|
552
|
-
const
|
|
576
|
+
const paths = await resolveProjectPaths(projectPath);
|
|
553
577
|
try {
|
|
554
578
|
await this.store.update((data) => {
|
|
555
|
-
const previous = data.projects
|
|
579
|
+
const previous = readStoredProjectEntry(data.projects, paths);
|
|
556
580
|
const entry = {
|
|
557
581
|
lastAccessed: (/* @__PURE__ */ new Date()).toISOString(),
|
|
558
582
|
...options?.name ? { name: options.name } : previous?.name ? { name: previous.name } : {}
|
|
559
583
|
};
|
|
584
|
+
const nextProjects = { ...data.projects };
|
|
585
|
+
if (paths.resolvedInput !== paths.canonicalPath && paths.resolvedInput in nextProjects) delete nextProjects[paths.resolvedInput];
|
|
586
|
+
nextProjects[paths.canonicalPath] = entry;
|
|
560
587
|
return {
|
|
561
588
|
...data,
|
|
562
|
-
projects:
|
|
563
|
-
|
|
564
|
-
[absolutePath]: entry
|
|
565
|
-
},
|
|
566
|
-
lastProject: absolutePath
|
|
589
|
+
projects: nextProjects,
|
|
590
|
+
lastProject: paths.canonicalPath
|
|
567
591
|
};
|
|
568
592
|
});
|
|
569
593
|
} catch {}
|
|
@@ -574,11 +598,13 @@ var Projects = class {
|
|
|
574
598
|
* explicit user action; the caller should know if it failed).
|
|
575
599
|
*/
|
|
576
600
|
async untrack(projectPath) {
|
|
577
|
-
const
|
|
601
|
+
const paths = await resolveProjectPaths(projectPath);
|
|
578
602
|
const existing = await this.store.read();
|
|
579
|
-
if (!existing
|
|
580
|
-
const
|
|
581
|
-
|
|
603
|
+
if (!existing) return false;
|
|
604
|
+
const trackedKey = findStoredProjectKey(existing.projects, paths);
|
|
605
|
+
if (!trackedKey) return false;
|
|
606
|
+
const { [trackedKey]: _removed, ...remaining } = existing.projects;
|
|
607
|
+
const newLastProject = existing.lastProject === trackedKey || existing.lastProject === paths.resolvedInput ? void 0 : existing.lastProject;
|
|
582
608
|
await this.store.write({
|
|
583
609
|
...existing,
|
|
584
610
|
projects: remaining,
|