@keystrokehq/cli 0.0.16 → 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-PTwX63_P.mjs → init-jaqNLGmB.mjs} +3 -3
- package/dist/{init.handler-CdytFiFt.mjs → init.handler-DamvbPEw.mjs} +11 -9
- 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-B0Gv-L0s.mjs → integrations-DRL3JmC8.mjs} +12 -7
- 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-BjutlIkE.mjs → list.handler-CEjKSezx.mjs} +59 -13
- 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-BISghlKg.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-Bu130Vcz.mjs → tool.handler-B-mOL128.mjs} +115 -95
- 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 +6 -6
- 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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { i as writeJson } from "./output-
|
|
5
|
-
import { i as requireClient } from "./context-
|
|
6
|
-
import { n as isIamJsonMode, t as handleIamError } from "./iam-command-utils-
|
|
3
|
+
import { a as ui } from "./keystroke.mjs";
|
|
4
|
+
import { i as writeJson } from "./output-BWcVRt-T.mjs";
|
|
5
|
+
import { i as requireClient } from "./context-Bid-Rqj7.mjs";
|
|
6
|
+
import { n as isIamJsonMode, t as handleIamError } from "./iam-command-utils-CSZj4XlH.mjs";
|
|
7
7
|
//#region src/commands/invites/accept.handler.ts
|
|
8
8
|
async function handleInvitesAccept(options, ctx) {
|
|
9
9
|
const client = requireClient(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 OrgRoleSchema } from "./schema-
|
|
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 OrgRoleSchema } from "./schema-Lbp5lGJu.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/commands/admin/orgs.command.ts
|
|
8
8
|
const AdminOrgsCreateOptionsSchema = JsonOptionSchema.extend({ name: z.string().min(1) });
|
|
@@ -28,21 +28,21 @@ function createAdminOrgsCommand() {
|
|
|
28
28
|
description: "Manage organizations as a platform admin",
|
|
29
29
|
schema: AdminOrgsListOptionsSchema,
|
|
30
30
|
optionsConfig: { ...JSON_OPTION_CONFIG },
|
|
31
|
-
loadHandler: async () => (await import("./orgs.list.handler-
|
|
31
|
+
loadHandler: async () => (await import("./orgs.list.handler-CJ2byIEj.mjs")).handleAdminOrgsList,
|
|
32
32
|
subcommands: [
|
|
33
33
|
createTypedCommand({
|
|
34
34
|
name: "create",
|
|
35
35
|
description: "Create an organization (requires system.create_org)",
|
|
36
36
|
schema: AdminOrgsCreateOptionsSchema,
|
|
37
37
|
optionsConfig: CREATE_OPTIONS_CONFIG,
|
|
38
|
-
loadHandler: async () => (await import("./orgs.create.handler-
|
|
38
|
+
loadHandler: async () => (await import("./orgs.create.handler-B4naNUSN.mjs")).handleAdminOrgsCreate
|
|
39
39
|
}),
|
|
40
40
|
createTypedCommand({
|
|
41
41
|
name: "list",
|
|
42
42
|
description: "List organizations (requires system.view_orgs)",
|
|
43
43
|
schema: AdminOrgsListOptionsSchema,
|
|
44
44
|
optionsConfig: { ...JSON_OPTION_CONFIG },
|
|
45
|
-
loadHandler: async () => (await import("./orgs.list.handler-
|
|
45
|
+
loadHandler: async () => (await import("./orgs.list.handler-CJ2byIEj.mjs")).handleAdminOrgsList
|
|
46
46
|
}),
|
|
47
47
|
createTypedCommand({
|
|
48
48
|
name: "get",
|
|
@@ -54,7 +54,7 @@ function createAdminOrgsCommand() {
|
|
|
54
54
|
description: "Organization ID",
|
|
55
55
|
key: "orgId"
|
|
56
56
|
},
|
|
57
|
-
loadHandler: async () => (await import("./orgs.get.handler-
|
|
57
|
+
loadHandler: async () => (await import("./orgs.get.handler-Ci_JrT08.mjs")).handleAdminOrgsGet
|
|
58
58
|
})
|
|
59
59
|
]
|
|
60
60
|
});
|
|
@@ -157,14 +157,14 @@ function createAdminUsersCommand() {
|
|
|
157
157
|
description: "Manage platform users",
|
|
158
158
|
schema: AdminUsersListOptionsSchema,
|
|
159
159
|
optionsConfig: { ...JSON_OPTION_CONFIG },
|
|
160
|
-
loadHandler: async () => (await import("./users.list.handler-
|
|
160
|
+
loadHandler: async () => (await import("./users.list.handler-CacJz6eC.mjs")).handleAdminUsersList,
|
|
161
161
|
subcommands: [
|
|
162
162
|
createTypedCommand({
|
|
163
163
|
name: "list",
|
|
164
164
|
description: "List platform users",
|
|
165
165
|
schema: AdminUsersListOptionsSchema,
|
|
166
166
|
optionsConfig: { ...JSON_OPTION_CONFIG },
|
|
167
|
-
loadHandler: async () => (await import("./users.list.handler-
|
|
167
|
+
loadHandler: async () => (await import("./users.list.handler-CacJz6eC.mjs")).handleAdminUsersList
|
|
168
168
|
}),
|
|
169
169
|
createTypedCommand({
|
|
170
170
|
name: "get",
|
|
@@ -176,7 +176,7 @@ function createAdminUsersCommand() {
|
|
|
176
176
|
description: "User ID",
|
|
177
177
|
key: "userId"
|
|
178
178
|
},
|
|
179
|
-
loadHandler: async () => (await import("./users.get.handler-
|
|
179
|
+
loadHandler: async () => (await import("./users.get.handler-Bd0OBI-E.mjs")).handleAdminUsersGet
|
|
180
180
|
}),
|
|
181
181
|
createTypedCommand({
|
|
182
182
|
name: "set-role",
|
|
@@ -188,7 +188,7 @@ function createAdminUsersCommand() {
|
|
|
188
188
|
description: "User ID",
|
|
189
189
|
key: "userId"
|
|
190
190
|
},
|
|
191
|
-
loadHandler: async () => (await import("./users.set-role.handler-
|
|
191
|
+
loadHandler: async () => (await import("./users.set-role.handler-bZMQtUR0.mjs")).handleAdminUsersSetRole
|
|
192
192
|
})
|
|
193
193
|
]
|
|
194
194
|
});
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { i as writeJson, n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-
|
|
6
|
-
import { t as createTypedCommand } from "./commander-
|
|
7
|
-
import { i as readAgentManifestsFromOutDir } from "./dist-
|
|
8
|
-
import { t as requireWorkflowsDir } from "./resolve-project-
|
|
9
|
-
import { t as createSpinnerProgress } from "./spinner-progress-
|
|
10
|
-
import { a as runWorkflowBuild, n as renderBuildFailure } from "./workflow-build-
|
|
11
|
-
import { i as resolveTypeHint } from "./schema-display-
|
|
3
|
+
import { a as ui, j as throwReportedCliExit, n as style, t as ANSI, y as toErrorMessage } from "./keystroke.mjs";
|
|
4
|
+
import { i as projects } from "./dist-CIInPRGh.mjs";
|
|
5
|
+
import { i as writeJson, n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-BWcVRt-T.mjs";
|
|
6
|
+
import { t as createTypedCommand } from "./commander-BE37hxR3.mjs";
|
|
7
|
+
import { i as readAgentManifestsFromOutDir } from "./dist-WFPTDQB3.mjs";
|
|
8
|
+
import { t as requireWorkflowsDir } from "./resolve-project-CNQtOWE4.mjs";
|
|
9
|
+
import { t as createSpinnerProgress } from "./spinner-progress-Bx-fYItP.mjs";
|
|
10
|
+
import { a as runWorkflowBuild, n as renderBuildFailure } from "./workflow-build-_WNsLKwW.mjs";
|
|
11
|
+
import { i as resolveTypeHint } from "./schema-display-NVEl_DFY.mjs";
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
//#region src/commands/agents/inspect-display.ts
|
|
14
14
|
function renderAgentManifestInspect(manifest, options = {}) {
|
|
@@ -114,7 +114,7 @@ const agentInspectDependencies = {
|
|
|
114
114
|
};
|
|
115
115
|
async function handleAgentsInspect(options, ctx) {
|
|
116
116
|
const resolved = await resolveAgentManifest(options.agent, options.path, { jsonMode: ctx.jsonMode });
|
|
117
|
-
|
|
117
|
+
projects.track(resolved.workflowsDir);
|
|
118
118
|
if (ctx.jsonMode) {
|
|
119
119
|
writeJson({
|
|
120
120
|
manifest: resolved.manifest,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { n as CredentialConnectionIdSchema, r as CredentialScopeSchema, t as ConnectionStatusSchema } from "./schema-
|
|
3
|
+
import { n as CredentialConnectionIdSchema, r as CredentialScopeSchema, t as ConnectionStatusSchema } from "./schema-BjH_e4Fo.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region ../../packages/shared-types/src/connections/api.ts
|
|
6
6
|
/**
|
|
@@ -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/api-keys/api-keys.command.ts
|
|
7
7
|
const ApiKeysCreateOptionsSchema = JsonOptionSchema.extend({ name: z.string().optional() });
|
|
@@ -23,21 +23,21 @@ function createApiKeysCommand() {
|
|
|
23
23
|
description: "Manage API keys for your organization",
|
|
24
24
|
schema: JsonOptionSchema,
|
|
25
25
|
optionsConfig: { ...JSON_OPTION_CONFIG },
|
|
26
|
-
loadHandler: async () => (await import("./list.handler-
|
|
26
|
+
loadHandler: async () => (await import("./list.handler-BdRsjRlf.mjs")).handleApiKeysList,
|
|
27
27
|
subcommands: [
|
|
28
28
|
createTypedCommand({
|
|
29
29
|
name: "list",
|
|
30
30
|
description: "List all API keys for your organization",
|
|
31
31
|
schema: JsonOptionSchema,
|
|
32
32
|
optionsConfig: { ...JSON_OPTION_CONFIG },
|
|
33
|
-
loadHandler: async () => (await import("./list.handler-
|
|
33
|
+
loadHandler: async () => (await import("./list.handler-BdRsjRlf.mjs")).handleApiKeysList
|
|
34
34
|
}),
|
|
35
35
|
createTypedCommand({
|
|
36
36
|
name: "create",
|
|
37
37
|
description: "Create a new API key (raw key shown once)",
|
|
38
38
|
schema: ApiKeysCreateOptionsSchema,
|
|
39
39
|
optionsConfig: CREATE_OPTIONS_CONFIG,
|
|
40
|
-
loadHandler: async () => (await import("./create.handler-
|
|
40
|
+
loadHandler: async () => (await import("./create.handler-Cp9CV6SN.mjs")).handleApiKeysCreate
|
|
41
41
|
}),
|
|
42
42
|
createTypedCommand({
|
|
43
43
|
name: "delete",
|
|
@@ -49,7 +49,7 @@ function createApiKeysCommand() {
|
|
|
49
49
|
description: "API key ID to delete",
|
|
50
50
|
key: "apiKeyId"
|
|
51
51
|
},
|
|
52
|
-
loadHandler: async () => (await import("./delete.handler-
|
|
52
|
+
loadHandler: async () => (await import("./delete.handler-D4ElSAcr.mjs")).handleApiKeysDelete
|
|
53
53
|
})
|
|
54
54
|
]
|
|
55
55
|
});
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { n as DEFAULT_CLI_WEB_URL } from "./default-urls-
|
|
4
|
-
import {
|
|
5
|
-
import { t as createTypedCommand } from "./commander-
|
|
3
|
+
import { n as DEFAULT_CLI_WEB_URL } from "./default-urls-CTQqM1_A.mjs";
|
|
4
|
+
import { b as AUTH_TIMEOUT_SECONDS } from "./keystroke.mjs";
|
|
5
|
+
import { t as createTypedCommand } from "./commander-BE37hxR3.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/commands/auth/auth.command.ts
|
|
8
8
|
const AuthOptionsSchema = z.object({
|
|
9
9
|
webUrl: z.url().optional().describe("Keystroke web URL"),
|
|
10
|
+
insecureStorage: z.boolean().default(false).describe("Store API keys in plaintext file storage instead of the OS credential store"),
|
|
10
11
|
timeout: z.coerce.number().int().min(AUTH_TIMEOUT_SECONDS.min).max(AUTH_TIMEOUT_SECONDS.max).default(AUTH_TIMEOUT_SECONDS.default).describe("Timeout in seconds")
|
|
11
12
|
});
|
|
12
13
|
const AUTH_OPTIONS_CONFIG = {
|
|
@@ -14,6 +15,10 @@ const AUTH_OPTIONS_CONFIG = {
|
|
|
14
15
|
flag: "--web-url <url>",
|
|
15
16
|
description: `Keystroke web URL (default: saved credentials, WEB_URL env, or ${DEFAULT_CLI_WEB_URL})`
|
|
16
17
|
},
|
|
18
|
+
insecureStorage: {
|
|
19
|
+
flag: "--insecure-storage",
|
|
20
|
+
description: "Store the API key in plaintext file storage instead of the OS credential store"
|
|
21
|
+
},
|
|
17
22
|
timeout: {
|
|
18
23
|
flag: "--timeout <seconds>",
|
|
19
24
|
description: `Authentication timeout in seconds (default: ${AUTH_TIMEOUT_SECONDS.default})`
|
|
@@ -25,28 +30,28 @@ function createAuthCommand() {
|
|
|
25
30
|
description: "Authenticate Keystroke CLI via device flow",
|
|
26
31
|
schema: AuthOptionsSchema,
|
|
27
32
|
optionsConfig: AUTH_OPTIONS_CONFIG,
|
|
28
|
-
loadHandler: async () => (await import("./auth.handler-
|
|
33
|
+
loadHandler: async () => (await import("./auth.handler-BTH-Qb00.mjs")).handleAuth,
|
|
29
34
|
subcommands: [
|
|
30
35
|
createTypedCommand({
|
|
31
36
|
name: "clear",
|
|
32
37
|
description: "Revoke the saved API key and remove local credentials",
|
|
33
38
|
schema: z.object({}),
|
|
34
39
|
optionsConfig: {},
|
|
35
|
-
loadHandler: async () => (await import("./clear.handler-
|
|
40
|
+
loadHandler: async () => (await import("./clear.handler-BDlwBzX4.mjs")).handleAuthClear
|
|
36
41
|
}),
|
|
37
42
|
createTypedCommand({
|
|
38
43
|
name: "test",
|
|
39
44
|
description: "Verify that the saved API key is valid",
|
|
40
45
|
schema: z.object({}),
|
|
41
46
|
optionsConfig: {},
|
|
42
|
-
loadHandler: async () => (await import("./test.handler-
|
|
47
|
+
loadHandler: async () => (await import("./test.handler-Cq2l7SAr.mjs")).handleAuthTest
|
|
43
48
|
}),
|
|
44
49
|
createTypedCommand({
|
|
45
50
|
name: "status",
|
|
46
51
|
description: "Show the current signed-in identity and organization context",
|
|
47
52
|
schema: z.object({}),
|
|
48
53
|
optionsConfig: {},
|
|
49
|
-
loadHandler: async () => (await import("./status.handler-
|
|
54
|
+
loadHandler: async () => (await import("./status.handler-BsVtDW_V.mjs")).handleAuthStatus
|
|
50
55
|
})
|
|
51
56
|
]
|
|
52
57
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { n as DEFAULT_CLI_WEB_URL, t as DEFAULT_CLI_SERVER_URL } from "./default-urls-
|
|
4
|
-
import { C as
|
|
5
|
-
import {
|
|
6
|
-
import { t as openBrowser } from "./browser-
|
|
3
|
+
import { n as DEFAULT_CLI_WEB_URL, t as DEFAULT_CLI_SERVER_URL } from "./default-urls-CTQqM1_A.mjs";
|
|
4
|
+
import { C as CALLBACK_LOOPBACK_ORIGIN, D as CliExitError, P as logger, S as CALLBACK_LOOPBACK_HOST, T as CLI_AUTH_COMMAND, a as ui, d as resolveCliWebUrl, u as resolveCliServerUrl, w as CALLBACK_PATH, x as AUTH_URL_PATH, y as toErrorMessage } from "./keystroke.mjs";
|
|
5
|
+
import { n as credentials } from "./dist-CIInPRGh.mjs";
|
|
6
|
+
import { t as openBrowser } from "./browser-BpJ8ut9z.mjs";
|
|
7
7
|
import { hostname } from "node:os";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { confirm, isCancel } from "@clack/prompts";
|
|
@@ -253,8 +253,8 @@ function isLoopbackUrl(rawUrl) {
|
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
function resolveAuthHosts(options, ctx) {
|
|
256
|
-
const savedWeb = ctx.
|
|
257
|
-
const savedServer = ctx.
|
|
256
|
+
const savedWeb = ctx.storedServerUrls?.webUrl;
|
|
257
|
+
const savedServer = ctx.storedServerUrls?.serverUrl;
|
|
258
258
|
const webUrl = resolveCliWebUrl(options.webUrl, savedWeb);
|
|
259
259
|
const serverUrl = resolveCliServerUrl(ctx.baseUrl);
|
|
260
260
|
return {
|
|
@@ -283,7 +283,7 @@ function printResolvedHosts(hosts) {
|
|
|
283
283
|
async function confirmLoopbackHostsOrExit(hosts) {
|
|
284
284
|
ui.br();
|
|
285
285
|
ui.warn("About to authenticate against a local development environment");
|
|
286
|
-
if (hosts.webMatchesSaved || hosts.serverMatchesSaved) ui.hint(`Saved at: ${
|
|
286
|
+
if (hosts.webMatchesSaved || hosts.serverMatchesSaved) ui.hint(`Saved at: ${credentials.metadataFilePath} (from a previous keystroke auth run)`);
|
|
287
287
|
else ui.hint("Resolved from your environment (WEB_URL / SERVER_URL).");
|
|
288
288
|
ui.hint(`CLI default is ${DEFAULT_CLI_WEB_URL} / ${DEFAULT_CLI_SERVER_URL}.`);
|
|
289
289
|
ui.hint("To switch hosts:");
|
|
@@ -322,11 +322,30 @@ function printAuthIntro(params) {
|
|
|
322
322
|
ui.hint(`Opening browser: ${params.authUrl}`);
|
|
323
323
|
ui.br();
|
|
324
324
|
}
|
|
325
|
-
function printAuthSuccess(
|
|
325
|
+
function printAuthSuccess(params) {
|
|
326
326
|
ui.success("Authentication successful.");
|
|
327
|
-
if (email) ui.hint(`Connected as: ${email}`);
|
|
328
|
-
if (organizationName) ui.hint(`Organization: ${organizationName}`);
|
|
329
|
-
ui.hint(`Credentials saved to ${
|
|
327
|
+
if (params.email) ui.hint(`Connected as: ${params.email}`);
|
|
328
|
+
if (params.organizationName) ui.hint(`Organization: ${params.organizationName}`);
|
|
329
|
+
ui.hint(`Credentials metadata saved to ${credentials.metadataFilePath}`);
|
|
330
|
+
if (params.insecureStorage) {
|
|
331
|
+
ui.warn(`API key saved to plaintext file storage at ${credentials.secretsFilePath}`);
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
ui.hint("Secret saved to OS credential store.");
|
|
335
|
+
}
|
|
336
|
+
function isCredentialStoreError(message) {
|
|
337
|
+
const normalized = message.toLowerCase();
|
|
338
|
+
return normalized.includes("credential store") || normalized.includes("keychain");
|
|
339
|
+
}
|
|
340
|
+
function exitCredentialStoreSaveFailed(error) {
|
|
341
|
+
const message = toErrorMessage(error);
|
|
342
|
+
ui.error("Could not save the API key to the OS credential store.");
|
|
343
|
+
ui.hint("Unlock your keychain or credential store, then rerun `keystroke auth`.");
|
|
344
|
+
ui.hint("For intentional plaintext file storage, rerun `keystroke auth --insecure-storage`.");
|
|
345
|
+
throw new CliExitError(message, {
|
|
346
|
+
cause: error,
|
|
347
|
+
reported: true
|
|
348
|
+
});
|
|
330
349
|
}
|
|
331
350
|
async function warnIfAlreadyAuthenticated(ctx) {
|
|
332
351
|
if (!ctx.client) return;
|
|
@@ -335,9 +354,8 @@ async function warnIfAlreadyAuthenticated(ctx) {
|
|
|
335
354
|
} catch {
|
|
336
355
|
return;
|
|
337
356
|
}
|
|
338
|
-
const
|
|
339
|
-
const
|
|
340
|
-
const activeOrg = stored?.orgs.find((o) => o.organizationId === stored?.activeOrgId);
|
|
357
|
+
const identity = ctx.storedUser?.email ?? "unknown user";
|
|
358
|
+
const activeOrg = ctx.storedOrgs.find((o) => o.organizationId === ctx.storedActiveOrgId);
|
|
341
359
|
ui.br();
|
|
342
360
|
ui.warn("Already authenticated");
|
|
343
361
|
ui.hint(`Signed in as ${identity}${activeOrg ? ` (${activeOrg.organizationName})` : ""}`);
|
|
@@ -348,6 +366,10 @@ async function handleAuth(options, ctx, overrides) {
|
|
|
348
366
|
await warnIfAlreadyAuthenticated(ctx);
|
|
349
367
|
const hosts = resolveAuthHosts(options, ctx);
|
|
350
368
|
printResolvedHosts(hosts);
|
|
369
|
+
if (options.insecureStorage) {
|
|
370
|
+
ui.warn("Using insecure plaintext file storage for this API key.");
|
|
371
|
+
ui.hint("For CI/headless usage, prefer KEYSTROKE_API_KEY.");
|
|
372
|
+
}
|
|
351
373
|
if (shouldConfirmLoopback(hosts)) await confirmLoopbackHostsOrExit(hosts);
|
|
352
374
|
const { webUrl, serverUrl } = hosts;
|
|
353
375
|
const timeoutMs = options.timeout * 1e3;
|
|
@@ -385,23 +407,34 @@ async function handleAuth(options, ctx, overrides) {
|
|
|
385
407
|
email: callbackPayload.userEmail,
|
|
386
408
|
name: callbackPayload.userName
|
|
387
409
|
} : void 0;
|
|
388
|
-
if (callbackPayload.organizationId)
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
410
|
+
if (callbackPayload.organizationId) try {
|
|
411
|
+
await credentials.upsertOrg({
|
|
412
|
+
org: {
|
|
413
|
+
organizationId: callbackPayload.organizationId,
|
|
414
|
+
organizationName: callbackPayload.organizationName ?? "Unknown",
|
|
415
|
+
apiKeyId: callbackPayload.apiKeyId,
|
|
416
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
417
|
+
},
|
|
392
418
|
apiKey: callbackPayload.apiKey,
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
419
|
+
serverUrl: callbackPayload.serverUrl,
|
|
420
|
+
webUrl,
|
|
421
|
+
user,
|
|
422
|
+
secretStorage: options.insecureStorage ? "file" : "keychain"
|
|
423
|
+
});
|
|
424
|
+
} catch (error) {
|
|
425
|
+
const message = toErrorMessage(error);
|
|
426
|
+
if (!options.insecureStorage && isCredentialStoreError(message)) exitCredentialStoreSaveFailed(error);
|
|
427
|
+
throw error;
|
|
428
|
+
}
|
|
400
429
|
logger.info("Auth successful", {
|
|
401
430
|
email: callbackPayload.userEmail,
|
|
402
431
|
organizationId: callbackPayload.organizationId
|
|
403
432
|
});
|
|
404
|
-
printAuthSuccess(
|
|
433
|
+
printAuthSuccess({
|
|
434
|
+
email: callbackPayload.userEmail,
|
|
435
|
+
organizationName: callbackPayload.organizationName,
|
|
436
|
+
insecureStorage: options.insecureStorage
|
|
437
|
+
});
|
|
405
438
|
} catch (error) {
|
|
406
439
|
if (toErrorMessage(error).includes("Timed out waiting for device authentication")) ui.error(`Authentication timed out after ${options.timeout}s. Re-run ${CLI_AUTH_COMMAND} and complete the browser prompt before timeout.`);
|
|
407
440
|
throw error;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { n as readOptionalJsonSchemaKeys, t as manifestToDeclaredCredentialRequirement } from "./declared-credential-requirements-
|
|
4
|
-
import { t as AgentVersionManifestSchema } from "./agent-manifest-
|
|
5
|
-
import { i as createAgentSandboxPackage, n as AGENT_VM_PI_SKILLS_ROOT, r as AGENT_VM_TOOLS_RUNTIME_RELATIVE_PATH, t as AGENT_VM_HOST_CALL_RELATIVE_PATH } from "./agent-bundle-package-DWV6B_5q-
|
|
6
|
-
import { t as readCredentialKeysFromSchemaObject } from "./read-credential-keys-77a91T8M-
|
|
7
|
-
import { t as bundleSandboxAgentTarget } from "./workflow-bundler-BzHk73PM-
|
|
3
|
+
import { n as readOptionalJsonSchemaKeys, t as manifestToDeclaredCredentialRequirement } from "./declared-credential-requirements-D6KT-r-e.mjs";
|
|
4
|
+
import { t as AgentVersionManifestSchema } from "./agent-manifest-tIsqF2OP.mjs";
|
|
5
|
+
import { i as createAgentSandboxPackage, n as AGENT_VM_PI_SKILLS_ROOT, r as AGENT_VM_TOOLS_RUNTIME_RELATIVE_PATH, t as AGENT_VM_HOST_CALL_RELATIVE_PATH } from "./agent-bundle-package-DWV6B_5q-FPT0bJaA.mjs";
|
|
6
|
+
import { t as readCredentialKeysFromSchemaObject } from "./read-credential-keys-77a91T8M-B0eiobOd.mjs";
|
|
7
|
+
import { t as bundleSandboxAgentTarget } from "./workflow-bundler-BzHk73PM-WI31RJjH.mjs";
|
|
8
8
|
import { builtinModules } from "node:module";
|
|
9
|
-
import { lstat, readFile, readdir, realpath } from "node:fs/promises";
|
|
10
9
|
import path from "node:path";
|
|
10
|
+
import { lstat, readFile, readdir, realpath } from "node:fs/promises";
|
|
11
11
|
import * as crypto from "node:crypto";
|
|
12
12
|
import { createHash } from "node:crypto";
|
|
13
13
|
import { performance } from "node:perf_hooks";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { i as __toESM } from "./chunk-CH6r78ws.mjs";
|
|
4
|
-
import { n as FileMetadataSchema, t as FILE_METADATA_SCHEMA_VERSION } from "./file-metadata-
|
|
5
|
-
import { d as getMetadataRoot, l as createMetadataOutputFile, n as BUILD_OUTPUT_DIR_NAME, u as getFileMetadataPath } from "./layout-
|
|
6
|
-
import { l as require_out, s as sha256String, t as BASE_IGNORE_PATTERNS } from "./metadata-layout-Bv-B0nHj-
|
|
7
|
-
import { a as literalString, c as readStringProperty, i as literalNumber, l as unwrapExpression, n as identifierName, o as parseSourceFile, r as isNode, s as readPropertyValue, t as getFirstObjectArgument, u as visitNode } from "./oxc-B3KI3rf_-
|
|
8
|
-
import { a as getLocalModuleSpecifier, f as resolveLocalModulePath, l as removeEmptyMetadataDirectories, o as getVariableDeclarators, s as isExportedVariableStatement } from "./source-analysis-BBg2E_6G-
|
|
9
|
-
import { n as parseRelativeFilePath, r as toRelativeFilePath, t as normalizeRelativeFilePath } from "./normalize-path-CojS-CgQ-
|
|
10
|
-
import { mkdir, readFile, rm, stat, writeFile } from "node:fs/promises";
|
|
4
|
+
import { n as FileMetadataSchema, t as FILE_METADATA_SCHEMA_VERSION } from "./file-metadata-lrX05iRt.mjs";
|
|
5
|
+
import { d as getMetadataRoot, l as createMetadataOutputFile, n as BUILD_OUTPUT_DIR_NAME, u as getFileMetadataPath } from "./layout-P1v-Gssz.mjs";
|
|
6
|
+
import { l as require_out, s as sha256String, t as BASE_IGNORE_PATTERNS } from "./metadata-layout-Bv-B0nHj-B1c5giJ7.mjs";
|
|
7
|
+
import { a as literalString, c as readStringProperty, i as literalNumber, l as unwrapExpression, n as identifierName, o as parseSourceFile, r as isNode, s as readPropertyValue, t as getFirstObjectArgument, u as visitNode } from "./oxc-B3KI3rf_-Cvx4Z-4H.mjs";
|
|
8
|
+
import { a as getLocalModuleSpecifier, f as resolveLocalModulePath, l as removeEmptyMetadataDirectories, o as getVariableDeclarators, s as isExportedVariableStatement } from "./source-analysis-BBg2E_6G-Ut7kYHOz.mjs";
|
|
9
|
+
import { n as parseRelativeFilePath, r as toRelativeFilePath, t as normalizeRelativeFilePath } from "./normalize-path-CojS-CgQ-D4wSBHgG.mjs";
|
|
11
10
|
import path from "node:path";
|
|
11
|
+
import { mkdir, readFile, rm, stat, writeFile } from "node:fs/promises";
|
|
12
12
|
import { performance } from "node:perf_hooks";
|
|
13
13
|
//#region ../../packages/workflow-builder/dist/build-metadata-C8Ra_Gi-.mjs
|
|
14
14
|
var import_out = /* @__PURE__ */ __toESM(require_out(), 1);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { n as formatProgressDuration, t as createSpinnerProgress } from "./spinner-progress-
|
|
3
|
+
import { P as logger } from "./keystroke.mjs";
|
|
4
|
+
import { n as formatProgressDuration, t as createSpinnerProgress } from "./spinner-progress-Bx-fYItP.mjs";
|
|
5
5
|
//#region src/lib/build-progress.ts
|
|
6
6
|
const NEW_STAGE_LABELS = {
|
|
7
7
|
start: "Starting build",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { n as TaskBuildManifestSchema } from "./task-
|
|
4
|
-
import { n as bundleWorkflowTarget } from "./workflow-bundler-BzHk73PM-
|
|
5
|
-
import { t as buildTriggerArtifacts } from "./trigger-artifacts-RizI57RC-
|
|
3
|
+
import { n as TaskBuildManifestSchema } from "./task-BguWXIiH.mjs";
|
|
4
|
+
import { n as bundleWorkflowTarget } from "./workflow-bundler-BzHk73PM-WI31RJjH.mjs";
|
|
5
|
+
import { t as buildTriggerArtifacts } from "./trigger-artifacts-RizI57RC-DjhOsdOm.mjs";
|
|
6
6
|
import { performance } from "node:perf_hooks";
|
|
7
7
|
//#region ../../packages/workflow-builder/dist/build-tasks-GVuMLS0h.mjs
|
|
8
8
|
async function buildTaskArtifact(options) {
|
package/dist/{build-workflows-CV4tBo6S-knCnBKTc.mjs → build-workflows-CV4tBo6S-DhFBlp6m.mjs}
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { f as deduplicateCredentialRequirementEntries } from "./credential-requirements-
|
|
4
|
-
import { r as WorkflowBuildManifestSchema, t as WORKFLOW_MANIFEST_GENERATOR } from "./workflow-build-manifest-
|
|
5
|
-
import { a as MANIFEST_FILE_NAME, i as FLOW_FILE_NAME, r as BUNDLE_FILE_NAME, s as SOURCE_MAP_FILE_NAME, t as BUILD_DIR_NAME } from "./layout-
|
|
6
|
-
import { t as runWithConcurrency } from "./concurrency-gXn9Rw8x-
|
|
7
|
-
import { n as WorkflowLoaderProtocolError, r as WorkflowMetadataLoadError, s as createLoaderProtocolFailure } from "./import-module--8x5SLum-
|
|
8
|
-
import { r as toRelativeFilePath } from "./normalize-path-CojS-CgQ-
|
|
9
|
-
import { n as bundleWorkflowTarget } from "./workflow-bundler-BzHk73PM-
|
|
10
|
-
import { t as buildTriggerArtifacts } from "./trigger-artifacts-RizI57RC-
|
|
11
|
-
import { realpathSync } from "node:fs";
|
|
12
|
-
import { readFile } from "node:fs/promises";
|
|
3
|
+
import { f as deduplicateCredentialRequirementEntries } from "./credential-requirements-DrrQ9x9P.mjs";
|
|
4
|
+
import { r as WorkflowBuildManifestSchema, t as WORKFLOW_MANIFEST_GENERATOR } from "./workflow-build-manifest-B2GqHyWE.mjs";
|
|
5
|
+
import { a as MANIFEST_FILE_NAME, i as FLOW_FILE_NAME, r as BUNDLE_FILE_NAME, s as SOURCE_MAP_FILE_NAME, t as BUILD_DIR_NAME } from "./layout-P1v-Gssz.mjs";
|
|
6
|
+
import { t as runWithConcurrency } from "./concurrency-gXn9Rw8x-BTlfau8D.mjs";
|
|
7
|
+
import { n as WorkflowLoaderProtocolError, r as WorkflowMetadataLoadError, s as createLoaderProtocolFailure } from "./import-module--8x5SLum-D7EiPjwl.mjs";
|
|
8
|
+
import { r as toRelativeFilePath } from "./normalize-path-CojS-CgQ-D4wSBHgG.mjs";
|
|
9
|
+
import { n as bundleWorkflowTarget } from "./workflow-bundler-BzHk73PM-WI31RJjH.mjs";
|
|
10
|
+
import { t as buildTriggerArtifacts } from "./trigger-artifacts-RizI57RC-DjhOsdOm.mjs";
|
|
13
11
|
import * as path$1 from "node:path";
|
|
12
|
+
import { readFile } from "node:fs/promises";
|
|
13
|
+
import { realpathSync } from "node:fs";
|
|
14
14
|
import { createHash } from "node:crypto";
|
|
15
15
|
import { performance } from "node:perf_hooks";
|
|
16
16
|
//#region ../../packages/workflow-builder/dist/build-workflows-CV4tBo6S.mjs
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
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 { D as CliExitError } from "./keystroke.mjs";
|
|
4
|
+
import { i as projects } from "./dist-CIInPRGh.mjs";
|
|
5
|
+
import { t as requireWorkflowsDir } from "./resolve-project-CNQtOWE4.mjs";
|
|
6
|
+
import { a as runWorkflowBuild, i as renderBuildSummary, n as renderBuildFailure, r as renderBuildHeader } from "./workflow-build-_WNsLKwW.mjs";
|
|
7
|
+
import { t as createBuildProgress } from "./build-progress-AR8xow4_.mjs";
|
|
8
|
+
import { t as withErrorBoundary } from "./error-boundary-B8cmSwJH.mjs";
|
|
9
9
|
//#region src/commands/workflows/build.handler.ts
|
|
10
10
|
async function handleWorkflowsBuild(options, _ctx) {
|
|
11
11
|
return withErrorBoundary("Build", async () => {
|
|
12
12
|
const workflowsDir = await requireWorkflowsDir(options.path);
|
|
13
|
-
|
|
13
|
+
projects.track(workflowsDir);
|
|
14
14
|
renderBuildHeader(options.name);
|
|
15
15
|
const progress = createBuildProgress(options.name ?? "workflow");
|
|
16
16
|
try {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { a as ui } from "./keystroke.mjs";
|
|
4
|
+
import { i as projects } from "./dist-CIInPRGh.mjs";
|
|
5
5
|
//#region src/commands/projects/clear-cache.handler.ts
|
|
6
6
|
async function handleProjectsClearCache(_options, _ctx) {
|
|
7
|
-
if (await
|
|
7
|
+
if (await projects.clear()) ui.success("Projects cache cleared.");
|
|
8
8
|
else ui.text("No projects cache found. Nothing to clear.");
|
|
9
9
|
}
|
|
10
10
|
//#endregion
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { P as logger, a as ui, p as AUTH_HINT, y as toErrorMessage } from "./keystroke.mjs";
|
|
4
|
+
import { n as credentials } from "./dist-CIInPRGh.mjs";
|
|
5
|
+
import { createClient } from "./src-B0tNjKMg.mjs";
|
|
6
|
+
//#region src/commands/auth/clear.handler.ts
|
|
7
|
+
async function tryRevokeKey(apiKey, apiKeyId, baseUrl, organizationId) {
|
|
8
|
+
try {
|
|
9
|
+
await createClient({
|
|
10
|
+
apiKey,
|
|
11
|
+
baseUrl,
|
|
12
|
+
organizationId
|
|
13
|
+
}).public.auth.revoke({ apiKeyId });
|
|
14
|
+
logger.info("API key revoked on server", { apiKeyId });
|
|
15
|
+
} catch (error) {
|
|
16
|
+
logger.error("Failed to revoke API key on server", { error: toErrorMessage(error) });
|
|
17
|
+
ui.warn(`Could not revoke API key on server: ${toErrorMessage(error)}`);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
async function readApiKeyForRevocation(organizationId) {
|
|
21
|
+
try {
|
|
22
|
+
return await credentials.getApiKey(organizationId);
|
|
23
|
+
} catch (error) {
|
|
24
|
+
logger.warn("Could not read saved API key for server revocation", {
|
|
25
|
+
error: toErrorMessage(error),
|
|
26
|
+
organizationId
|
|
27
|
+
});
|
|
28
|
+
ui.warn(`Could not read the saved API key for organization ${organizationId}; skipping server revocation and removing local credentials.`);
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
async function handleAuthClear(_options, ctx) {
|
|
33
|
+
const storedOrgs = ctx.storedOrgs;
|
|
34
|
+
const serverUrl = ctx.storedServerUrls?.serverUrl;
|
|
35
|
+
if (storedOrgs.length === 0) {
|
|
36
|
+
const hadFiles = await credentials.hasStoredCredentials();
|
|
37
|
+
await credentials.clear();
|
|
38
|
+
if (hadFiles) ui.success("Local credentials removed.");
|
|
39
|
+
else ui.text(`No credentials found. ${AUTH_HINT}`);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
if (ctx.organizationId && ctx.orgSource === "flag") {
|
|
43
|
+
const apiKey = await readApiKeyForRevocation(ctx.organizationId);
|
|
44
|
+
const removed = await credentials.removeOrg(ctx.organizationId);
|
|
45
|
+
if (!removed) {
|
|
46
|
+
ui.warn(`No stored credentials for organization ${ctx.organizationId}.`);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (removed.apiKeyId && serverUrl && apiKey) await tryRevokeKey(apiKey, removed.apiKeyId, serverUrl, removed.organizationId);
|
|
50
|
+
ui.success(`Credentials removed for ${removed.organizationName}.`);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const revokeInputs = [];
|
|
54
|
+
for (const org of storedOrgs) if (org.apiKeyId && serverUrl) {
|
|
55
|
+
const apiKey = await readApiKeyForRevocation(org.organizationId);
|
|
56
|
+
if (apiKey) revokeInputs.push({
|
|
57
|
+
apiKey,
|
|
58
|
+
apiKeyId: org.apiKeyId,
|
|
59
|
+
baseUrl: serverUrl,
|
|
60
|
+
organizationId: org.organizationId
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
await credentials.clear();
|
|
64
|
+
for (const revokeInput of revokeInputs) await tryRevokeKey(revokeInput.apiKey, revokeInput.apiKeyId, revokeInput.baseUrl, revokeInput.organizationId);
|
|
65
|
+
ui.success("All local credentials removed.");
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
68
|
+
export { handleAuthClear };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { M as clearLog, N as closeLogger } 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) {
|
|
7
|
-
|
|
7
|
+
await closeLogger();
|
|
8
|
+
if (await clearLog()) log.success("Log file cleared.");
|
|
8
9
|
else log.message("No log file found. Nothing to clear.");
|
|
9
10
|
}
|
|
10
11
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { a as writeJsonError, r as isJsonMode } from "./output-
|
|
3
|
+
import { D as CliExitError, L as setDebug, O as InputValidationError, _ as isAuthError, a as ui, f as captureCliTelemetryResolvedContext, o as createHiddenGlobalOptions, p as AUTH_HINT, y as toErrorMessage } from "./keystroke.mjs";
|
|
4
|
+
import { a as writeJsonError, r as isJsonMode } from "./output-BWcVRt-T.mjs";
|
|
5
5
|
import { Command } from "commander";
|
|
6
6
|
//#region src/lib/commander.ts
|
|
7
7
|
/**
|
|
@@ -76,9 +76,9 @@ function createTypedCommand(params) {
|
|
|
76
76
|
if ("json" in parsed) jsonMode = isJsonMode(parsed);
|
|
77
77
|
else if (process.argv.includes("--json")) jsonMode = true;
|
|
78
78
|
const globalOpts = cmd.optsWithGlobals();
|
|
79
|
-
if (globalOpts.debug)
|
|
79
|
+
if (globalOpts.debug) setDebug(true);
|
|
80
80
|
const contextMode = params.contextMode ?? "full";
|
|
81
|
-
const contextModule = await import("./context-
|
|
81
|
+
const contextModule = await import("./context-Bid-Rqj7.mjs").then((n) => n.n);
|
|
82
82
|
const base = contextMode === "auth" ? await contextModule.resolveAuthContext({
|
|
83
83
|
apiKey: globalOpts.apiKey,
|
|
84
84
|
serverUrl: globalOpts.serverUrl,
|