@kodycodes/cli 3.22.7 → 3.22.8
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 +8 -7
- package/dist/api-token-store.d.ts +0 -2
- package/dist/api-token.d.ts +5 -20
- package/dist/{auth-W5RWT6IP.js → auth-4N35PHF7.js} +8 -8
- package/dist/auth-bootstrap.d.ts +3 -18
- package/dist/bin.js +13 -14
- package/dist/bin.js.map +1 -1
- package/dist/capability-proxy.d.ts +5 -35
- package/dist/{chunk-FHLTB67D.js → chunk-2Y4VVWIL.js} +3 -3
- package/dist/chunk-2Y4VVWIL.js.map +6 -0
- package/dist/{chunk-K2G6GYKA.js → chunk-62N7DN7L.js} +1 -1
- package/dist/{chunk-K2G6GYKA.js.map → chunk-62N7DN7L.js.map} +1 -1
- package/dist/{chunk-4LAKIU3Y.js → chunk-C7GRF5V5.js} +2 -2
- package/dist/{chunk-ZUROJOJ2.js → chunk-CA7AAWGW.js} +3 -5
- package/dist/chunk-CA7AAWGW.js.map +6 -0
- package/dist/{chunk-XV6D6HSG.js → chunk-DH5RPHG6.js} +1 -2
- package/dist/chunk-DH5RPHG6.js.map +6 -0
- package/dist/{chunk-G7GRULRW.js → chunk-DHCDUGD2.js} +2 -2
- package/dist/{chunk-YQRMKXCC.js → chunk-DJ6XKQEC.js} +4 -6
- package/dist/chunk-DJ6XKQEC.js.map +6 -0
- package/dist/{chunk-SLNAWWQK.js → chunk-E4R3Y6MM.js} +1 -1
- package/dist/{chunk-SLNAWWQK.js.map → chunk-E4R3Y6MM.js.map} +1 -1
- package/dist/{chunk-DEI4SMFK.js → chunk-F34Q7D5C.js} +4 -8
- package/dist/{chunk-DEI4SMFK.js.map → chunk-F34Q7D5C.js.map} +1 -1
- package/dist/{chunk-M7PRSUCC.js → chunk-IOG54R4P.js} +1 -1
- package/dist/{chunk-M7PRSUCC.js.map → chunk-IOG54R4P.js.map} +1 -1
- package/dist/{chunk-76OYRT4A.js → chunk-LQNGII7U.js} +1 -1
- package/dist/{chunk-76OYRT4A.js.map → chunk-LQNGII7U.js.map} +1 -1
- package/dist/{chunk-RD6ZJU2N.js → chunk-LTSHQAUL.js} +5 -5
- package/dist/{chunk-2XPH7L2P.js → chunk-MIT3TUWB.js} +1 -1
- package/dist/{chunk-2XPH7L2P.js.map → chunk-MIT3TUWB.js.map} +1 -1
- package/dist/{chunk-VP2O3HLT.js → chunk-NKH2L5RA.js} +17 -1
- package/dist/chunk-NKH2L5RA.js.map +6 -0
- package/dist/{chunk-CWQVWIAQ.js → chunk-NZ7JT42A.js} +2 -2
- package/dist/{chunk-CWQVWIAQ.js.map → chunk-NZ7JT42A.js.map} +1 -1
- package/dist/{chunk-FPYLVYHC.js → chunk-OKIL5IUB.js} +58 -42
- package/dist/chunk-OKIL5IUB.js.map +6 -0
- package/dist/{chunk-2FU3OO7F.js → chunk-PQPGW43A.js} +5 -19
- package/dist/chunk-PQPGW43A.js.map +6 -0
- package/dist/{chunk-NPQ2XAK5.js → chunk-QL776E77.js} +3 -3
- package/dist/chunk-QL776E77.js.map +6 -0
- package/dist/{chunk-D6XME4RY.js → chunk-RE7LNPRO.js} +2 -5
- package/dist/{chunk-D6XME4RY.js.map → chunk-RE7LNPRO.js.map} +1 -1
- package/dist/{chunk-ZXNYKFSN.js → chunk-SX3MQHCJ.js} +5 -5
- package/dist/{chunk-ZXNYKFSN.js.map → chunk-SX3MQHCJ.js.map} +1 -1
- package/dist/{chunk-OXBMXZ6S.js → chunk-T3V6WFHI.js} +2 -2
- package/dist/{chunk-5E2HSGBZ.js → chunk-UQIY7RY4.js} +4 -5
- package/dist/chunk-UQIY7RY4.js.map +6 -0
- package/dist/{chunk-SLBG76VX.js → chunk-VA5KCKCC.js} +9 -9
- package/dist/{chunk-SLBG76VX.js.map → chunk-VA5KCKCC.js.map} +1 -1
- package/dist/{chunk-DBNNDB7I.js → chunk-WAZTX2ED.js} +9 -9
- package/dist/{chunk-DBNNDB7I.js.map → chunk-WAZTX2ED.js.map} +1 -1
- package/dist/{chunk-F3XGCTRQ.js → chunk-XAXNNOEC.js} +122 -71
- package/dist/chunk-XAXNNOEC.js.map +6 -0
- package/dist/{chunk-OKM2QMOV.js → chunk-ZU5QBMXR.js} +6 -11
- package/dist/{chunk-OKM2QMOV.js.map → chunk-ZU5QBMXR.js.map} +1 -1
- package/dist/cli.d.ts +10 -1
- package/dist/cli.js +15 -14
- package/dist/{commands-MZMI3MEY.js → commands-QL2SLSIL.js} +23 -37
- package/dist/commands-QL2SLSIL.js.map +6 -0
- package/dist/credential-call-map.d.ts +0 -6
- package/dist/credential-dir.d.ts +0 -2
- package/dist/credentialed-fetch-scan.d.ts +2 -2
- package/dist/defaults.d.ts +5 -5
- package/dist/dev/dev-assets.d.ts +0 -2
- package/dist/dev/dev-bundler.d.ts +0 -5
- package/dist/dev/dev-events.d.ts +2 -2
- package/dist/dev/dev-port.d.ts +1 -1
- package/dist/dev/error-page.d.ts +2 -4
- package/dist/dev/live-reload.d.ts +2 -1
- package/dist/dev/workerd-process.d.ts +0 -1
- package/dist/{dev-command-XIQY56LW.js → dev-command-P73A4I3C.js} +16 -19
- package/dist/{dev-command-XIQY56LW.js.map → dev-command-P73A4I3C.js.map} +1 -1
- package/dist/dev-command.d.ts +0 -9
- package/dist/execution-context/auto-update.d.ts +1 -66
- package/dist/execution-context/client.d.ts +2 -3
- package/dist/execution-context/commands.d.ts +0 -11
- package/dist/execution-context/daemon.d.ts +1 -6
- package/dist/execution-context/fs-access.d.ts +5 -4
- package/dist/execution-context/host-commands.d.ts +3 -47
- package/dist/execution-context/host-fs-bridge.d.ts +0 -2
- package/dist/execution-context/keystore.d.ts +0 -1
- package/dist/execution-context/runner-lock.d.ts +0 -8
- package/dist/execution-context/service-commands.d.ts +17 -8
- package/dist/execution-context/service.d.ts +3 -13
- package/dist/execution-context/windows-command.d.ts +0 -2
- package/dist/fetch-body-secret-resolution.d.ts +0 -1
- package/dist/{git-credential-BT363OJQ.js → git-credential-L5AR3JRT.js} +9 -9
- package/dist/help.d.ts +0 -6
- package/dist/host-catalog.d.ts +2 -5
- package/dist/host-config.d.ts +2 -3
- package/dist/{install-NTS5BOCR.js → install-24DK5RBH.js} +3 -5
- package/dist/{install-NTS5BOCR.js.map → install-24DK5RBH.js.map} +1 -1
- package/dist/install-hosts.d.ts +2 -1
- package/dist/install.d.ts +0 -5
- package/dist/invoke-passthrough.d.ts +0 -1
- package/dist/local-egress.d.ts +2 -1
- package/dist/{local-execute-BI5253MQ.js → local-execute-WDKUY2JK.js} +14 -14
- package/dist/{local-package-graph-WFDNSNOJ.js → local-package-graph-3TRAIUBT.js} +6 -18
- package/dist/local-package-graph.d.ts +0 -34
- package/dist/{local-package-run-RRELUZEM.js → local-package-run-N3O2SD3L.js} +15 -15
- package/dist/local-runtime-bridge.d.ts +2 -5
- package/dist/local-runtime-source.d.ts +0 -2
- package/dist/login-callback-page.d.ts +3 -2
- package/dist/mock/load-package-mocks.d.ts +0 -1
- package/dist/mock/mock-fetch-gateway.d.ts +0 -3
- package/dist/mock/mock-server.d.ts +0 -1
- package/dist/mock/mock-storage.d.ts +2 -2
- package/dist/mock/mock-supported.d.ts +2 -1
- package/dist/{mock-dep-resolve-G7TA4CJB.js → mock-dep-resolve-IVZOW4QE.js} +9 -9
- package/dist/{mock-fetch-gateway-QNUFNYAH.js → mock-fetch-gateway-VAGQFWVN.js} +5 -9
- package/dist/{mock-local-deps-K2NARQ7F.js → mock-local-deps-AUAWEK46.js} +9 -13
- package/dist/mock-local-deps.d.ts +0 -4
- package/dist/{mock-server-2FMSQMBT.js → mock-server-7P53AZUZ.js} +6 -8
- package/dist/node-engine.d.ts +0 -2
- package/dist/oauth-browser.d.ts +0 -3
- package/dist/{open-api-client-DJL2PE7P.js → open-api-client-QVDDK27F.js} +7 -15
- package/dist/open-api-client.d.ts +0 -6
- package/dist/{org-SGFIXD42.js → org-NWSSC7L7.js} +3 -10
- package/dist/org-NWSSC7L7.js.map +6 -0
- package/dist/org.d.ts +0 -2
- package/dist/package-collaborators.d.ts +2 -4
- package/dist/package-local-runtime-source.d.ts +2 -2
- package/dist/{package-manifest-KCLPIMOZ.js → package-manifest-AEBPXNCJ.js} +3 -3
- package/dist/package-manifest.d.ts +7 -6
- package/dist/process-info.d.ts +0 -2
- package/dist/publish-exit.d.ts +0 -11
- package/dist/{remote-execute-KUSUI6UT.js → remote-execute-PBSB32YY.js} +8 -8
- package/dist/{run-executor-4TY5KNQQ.js → run-executor-TSI7J56V.js} +16 -16
- package/dist/{setup-git-KBH7GA6E.js → setup-git-S57U4NT5.js} +8 -38
- package/dist/setup-git.d.ts +5 -59
- package/dist/{skill-IY263IXV.js → skill-QM3N6H55.js} +3 -3
- package/dist/skill-refresh.js +2 -2
- package/dist/{store-ZPBJTYRI.js → store-4G2J5DRZ.js} +3 -9
- package/dist/store.d.ts +2 -6
- package/dist/{structured-error-QYNRZZKC.js → structured-error-KS24XUSZ.js} +2 -4
- package/dist/structured-error.d.ts +2 -2
- package/dist/{whoami-SGE7VKGY.js → whoami-RUMTWBZL.js} +6 -7
- package/dist/{whoami-SGE7VKGY.js.map → whoami-RUMTWBZL.js.map} +1 -1
- package/dist/whoami.d.ts +0 -11
- package/dist/workerd-binary.d.ts +2 -3
- package/package.json +1 -1
- package/dist/chunk-2FU3OO7F.js.map +0 -6
- package/dist/chunk-5E2HSGBZ.js.map +0 -6
- package/dist/chunk-7PRJ36I5.js +0 -23
- package/dist/chunk-7PRJ36I5.js.map +0 -6
- package/dist/chunk-F3XGCTRQ.js.map +0 -6
- package/dist/chunk-FHLTB67D.js.map +0 -6
- package/dist/chunk-FPYLVYHC.js.map +0 -6
- package/dist/chunk-NPQ2XAK5.js.map +0 -6
- package/dist/chunk-VP2O3HLT.js.map +0 -6
- package/dist/chunk-XV6D6HSG.js.map +0 -6
- package/dist/chunk-YQRMKXCC.js.map +0 -6
- package/dist/chunk-ZUROJOJ2.js.map +0 -6
- package/dist/commands-MZMI3MEY.js.map +0 -6
- package/dist/org-SGFIXD42.js.map +0 -6
- /package/dist/{auth-W5RWT6IP.js.map → auth-4N35PHF7.js.map} +0 -0
- /package/dist/{chunk-4LAKIU3Y.js.map → chunk-C7GRF5V5.js.map} +0 -0
- /package/dist/{chunk-G7GRULRW.js.map → chunk-DHCDUGD2.js.map} +0 -0
- /package/dist/{chunk-RD6ZJU2N.js.map → chunk-LTSHQAUL.js.map} +0 -0
- /package/dist/{chunk-OXBMXZ6S.js.map → chunk-T3V6WFHI.js.map} +0 -0
- /package/dist/{git-credential-BT363OJQ.js.map → git-credential-L5AR3JRT.js.map} +0 -0
- /package/dist/{local-execute-BI5253MQ.js.map → local-execute-WDKUY2JK.js.map} +0 -0
- /package/dist/{local-package-graph-WFDNSNOJ.js.map → local-package-graph-3TRAIUBT.js.map} +0 -0
- /package/dist/{local-package-run-RRELUZEM.js.map → local-package-run-N3O2SD3L.js.map} +0 -0
- /package/dist/{mock-dep-resolve-G7TA4CJB.js.map → mock-dep-resolve-IVZOW4QE.js.map} +0 -0
- /package/dist/{mock-fetch-gateway-QNUFNYAH.js.map → mock-fetch-gateway-VAGQFWVN.js.map} +0 -0
- /package/dist/{mock-local-deps-K2NARQ7F.js.map → mock-local-deps-AUAWEK46.js.map} +0 -0
- /package/dist/{mock-server-2FMSQMBT.js.map → mock-server-7P53AZUZ.js.map} +0 -0
- /package/dist/{open-api-client-DJL2PE7P.js.map → open-api-client-QVDDK27F.js.map} +0 -0
- /package/dist/{package-manifest-KCLPIMOZ.js.map → package-manifest-AEBPXNCJ.js.map} +0 -0
- /package/dist/{remote-execute-KUSUI6UT.js.map → remote-execute-PBSB32YY.js.map} +0 -0
- /package/dist/{run-executor-4TY5KNQQ.js.map → run-executor-TSI7J56V.js.map} +0 -0
- /package/dist/{setup-git-KBH7GA6E.js.map → setup-git-S57U4NT5.js.map} +0 -0
- /package/dist/{skill-IY263IXV.js.map → skill-QM3N6H55.js.map} +0 -0
- /package/dist/{store-ZPBJTYRI.js.map → store-4G2J5DRZ.js.map} +0 -0
- /package/dist/{structured-error-QYNRZZKC.js.map → structured-error-KS24XUSZ.js.map} +0 -0
|
@@ -7,20 +7,17 @@ import {
|
|
|
7
7
|
formatLoginUrlNotice,
|
|
8
8
|
hostIds,
|
|
9
9
|
loginBrowserOpenFailedNotice
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import {
|
|
12
|
-
resolveOrgSlug
|
|
13
|
-
} from "./chunk-7PRJ36I5.js";
|
|
10
|
+
} from "./chunk-IOG54R4P.js";
|
|
14
11
|
import {
|
|
15
12
|
isPublishedPackageInvokeSpecifier,
|
|
16
13
|
resolveExecuteInvokeCode
|
|
17
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-E4R3Y6MM.js";
|
|
18
15
|
import {
|
|
19
16
|
resolveLocalExecuteBearer
|
|
20
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-LTSHQAUL.js";
|
|
21
18
|
import {
|
|
22
19
|
assertLocalExecuteNodeEngine
|
|
23
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-MIT3TUWB.js";
|
|
24
21
|
import {
|
|
25
22
|
authBootstrap,
|
|
26
23
|
authBootstrapWithScopes,
|
|
@@ -30,7 +27,7 @@ import {
|
|
|
30
27
|
parseCliScopesFlag,
|
|
31
28
|
refreshGitCredentialHelperPinIfNeeded,
|
|
32
29
|
resolveCliTokenLifetime
|
|
33
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-PQPGW43A.js";
|
|
34
31
|
import {
|
|
35
32
|
orgEnvVar,
|
|
36
33
|
orgSlugFromFlag
|
|
@@ -43,9 +40,10 @@ import {
|
|
|
43
40
|
} from "./chunk-46IJPEID.js";
|
|
44
41
|
import {
|
|
45
42
|
cliBootstrapMintCall,
|
|
43
|
+
expectedPairedApiOrigin,
|
|
46
44
|
parseCredentialFlags,
|
|
47
45
|
readPackageVersion
|
|
48
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-OKIL5IUB.js";
|
|
49
47
|
import {
|
|
50
48
|
deleteStoredApiToken,
|
|
51
49
|
describeCliCredential,
|
|
@@ -54,22 +52,23 @@ import {
|
|
|
54
52
|
replaceStoredTokenCommand,
|
|
55
53
|
resetActiveCliCredential,
|
|
56
54
|
resolveCliCredential
|
|
57
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-2Y4VVWIL.js";
|
|
58
56
|
import {
|
|
59
57
|
deleteCredentials,
|
|
60
58
|
listStoredOrgs,
|
|
61
59
|
loadCredentialStore,
|
|
62
60
|
loadCredentials
|
|
63
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-RE7LNPRO.js";
|
|
64
62
|
import {
|
|
65
63
|
apiTokenEnvVar,
|
|
66
64
|
defaultApiUrl,
|
|
67
65
|
defaultMcpUrl,
|
|
68
66
|
onboardingUrl
|
|
69
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-NKH2L5RA.js";
|
|
70
68
|
|
|
71
69
|
// src/cli.ts
|
|
72
70
|
import { parseArgs } from "node:util";
|
|
71
|
+
import { statSync } from "node:fs";
|
|
73
72
|
import { readFile } from "node:fs/promises";
|
|
74
73
|
|
|
75
74
|
// src/help.ts
|
|
@@ -510,6 +509,19 @@ Environment:
|
|
|
510
509
|
`;
|
|
511
510
|
}
|
|
512
511
|
|
|
512
|
+
// src/org-resolve.ts
|
|
513
|
+
function resolveOrgSlug(input) {
|
|
514
|
+
if (input.flag !== void 0) return orgSlugFromFlag(input.flag);
|
|
515
|
+
const fromEnv = input.env?.[orgEnvVar] ?? process.env[orgEnvVar];
|
|
516
|
+
if (typeof fromEnv === "string" && fromEnv.trim()) {
|
|
517
|
+
return orgSlugFromFlag(fromEnv);
|
|
518
|
+
}
|
|
519
|
+
if (typeof input.activeOrg === "string" && input.activeOrg.trim()) {
|
|
520
|
+
return orgSlugFromFlag(input.activeOrg);
|
|
521
|
+
}
|
|
522
|
+
return void 0;
|
|
523
|
+
}
|
|
524
|
+
|
|
513
525
|
// src/publish-exit.ts
|
|
514
526
|
function isRecord(value) {
|
|
515
527
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
@@ -592,7 +604,11 @@ var packageCollaboratorPresets = [
|
|
|
592
604
|
"contribute",
|
|
593
605
|
"manage"
|
|
594
606
|
];
|
|
595
|
-
var packageCollaboratorActions = [
|
|
607
|
+
var packageCollaboratorActions = [
|
|
608
|
+
"collaborators",
|
|
609
|
+
"grant",
|
|
610
|
+
"revoke"
|
|
611
|
+
];
|
|
596
612
|
function isPackageCollaboratorAction(value) {
|
|
597
613
|
return packageCollaboratorActions.includes(value);
|
|
598
614
|
}
|
|
@@ -824,8 +840,12 @@ var orgScopedCommands = /* @__PURE__ */ new Set([
|
|
|
824
840
|
function mcpUrlFrom(values) {
|
|
825
841
|
return values.mcpUrl || process.env.KODY_MCP_URL || defaultMcpUrl;
|
|
826
842
|
}
|
|
827
|
-
function apiUrlFrom(values, env = process.env) {
|
|
828
|
-
|
|
843
|
+
function apiUrlFrom(values, env = process.env, mcpUrl) {
|
|
844
|
+
if (values.apiUrl || env.KODY_API_URL) {
|
|
845
|
+
return values.apiUrl || env.KODY_API_URL;
|
|
846
|
+
}
|
|
847
|
+
const paired = mcpUrl ? expectedPairedApiOrigin(mcpUrl) : null;
|
|
848
|
+
return paired?.startsWith("https://") ? paired : defaultApiUrl;
|
|
829
849
|
}
|
|
830
850
|
var cliFlagOptions = {
|
|
831
851
|
help: { type: "boolean", short: "h" },
|
|
@@ -956,7 +976,7 @@ async function runCli(argv = process.argv.slice(2), io = {}) {
|
|
|
956
976
|
}
|
|
957
977
|
const skipSkillRefresh = underNodeTest || process.env.KODY_SKIP_SKILL_REFRESH === "1" || head === "git-credential" || head === "skill" || head === "version" || head === "--version" || head === "-v" || head === "help" || head === "--help" || head === "-h" || head === void 0;
|
|
958
978
|
if (!skipSkillRefresh) {
|
|
959
|
-
void import("./skill-
|
|
979
|
+
void import("./skill-QM3N6H55.js").then(({ scheduleDetachedSkillRefresh }) => {
|
|
960
980
|
scheduleDetachedSkillRefresh({
|
|
961
981
|
origin: process.env.KODY_MCP_URL ? new URL(process.env.KODY_MCP_URL).origin : void 0
|
|
962
982
|
});
|
|
@@ -1075,7 +1095,7 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
1075
1095
|
const apiUrl = apiUrlFrom({
|
|
1076
1096
|
apiUrl: typeof parsed.values["api-url"] === "string" ? parsed.values["api-url"] : void 0
|
|
1077
1097
|
});
|
|
1078
|
-
const { runExecutionContextCommand } = await import("./commands-
|
|
1098
|
+
const { runExecutionContextCommand } = await import("./commands-QL2SLSIL.js");
|
|
1079
1099
|
return await runExecutionContextCommand({
|
|
1080
1100
|
command: parsed.command,
|
|
1081
1101
|
positionals: parsed.positionals,
|
|
@@ -1105,14 +1125,18 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
1105
1125
|
});
|
|
1106
1126
|
}
|
|
1107
1127
|
case "login": {
|
|
1108
|
-
const { login, loginWithDevice } = await import("./auth-
|
|
1128
|
+
const { login, loginWithDevice } = await import("./auth-4N35PHF7.js");
|
|
1109
1129
|
const openBrowser = parsed.values["no-browser"] !== true;
|
|
1110
1130
|
const lifetimeOption = typeof parsed.values.lifetime === "string" ? {
|
|
1111
1131
|
lifetime: parsed.values.lifetime === "short" ? "short" : "long"
|
|
1112
1132
|
} : {};
|
|
1113
|
-
const loginApiUrl = apiUrlFrom(
|
|
1114
|
-
|
|
1115
|
-
|
|
1133
|
+
const loginApiUrl = apiUrlFrom(
|
|
1134
|
+
{
|
|
1135
|
+
apiUrl: typeof parsed.values["api-url"] === "string" ? parsed.values["api-url"] : void 0
|
|
1136
|
+
},
|
|
1137
|
+
process.env,
|
|
1138
|
+
mcpUrl
|
|
1139
|
+
);
|
|
1116
1140
|
if (parsed.values.device === true) {
|
|
1117
1141
|
const result2 = await loginWithDevice({
|
|
1118
1142
|
mcpUrl,
|
|
@@ -1145,9 +1169,13 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
1145
1169
|
return 0;
|
|
1146
1170
|
}
|
|
1147
1171
|
case "logout": {
|
|
1148
|
-
const apiUrl = apiUrlFrom(
|
|
1149
|
-
|
|
1150
|
-
|
|
1172
|
+
const apiUrl = apiUrlFrom(
|
|
1173
|
+
{
|
|
1174
|
+
apiUrl: typeof parsed.values["api-url"] === "string" ? parsed.values["api-url"] : void 0
|
|
1175
|
+
},
|
|
1176
|
+
process.env,
|
|
1177
|
+
mcpUrl
|
|
1178
|
+
);
|
|
1151
1179
|
const oauth = deleteCredentials(
|
|
1152
1180
|
mcpUrl,
|
|
1153
1181
|
void 0,
|
|
@@ -1180,8 +1208,8 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
1180
1208
|
formatOrgListHuman,
|
|
1181
1209
|
formatOrgListJson,
|
|
1182
1210
|
useOrg
|
|
1183
|
-
} = await import("./org-
|
|
1184
|
-
const { listStoredOrgs: listStoredOrgs2 } = await import("./store-
|
|
1211
|
+
} = await import("./org-NWSSC7L7.js");
|
|
1212
|
+
const { listStoredOrgs: listStoredOrgs2 } = await import("./store-4G2J5DRZ.js");
|
|
1185
1213
|
const action = parsed.positionals[0];
|
|
1186
1214
|
if (action === "list") {
|
|
1187
1215
|
const orgs = listStoredOrgs2(mcpUrl);
|
|
@@ -1206,9 +1234,13 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
1206
1234
|
throw new Error("Usage: kody org list [--json] | kody org use [<slug>]");
|
|
1207
1235
|
}
|
|
1208
1236
|
case "status": {
|
|
1209
|
-
const apiUrl = apiUrlFrom(
|
|
1210
|
-
|
|
1211
|
-
|
|
1237
|
+
const apiUrl = apiUrlFrom(
|
|
1238
|
+
{
|
|
1239
|
+
apiUrl: typeof parsed.values["api-url"] === "string" ? parsed.values["api-url"] : void 0
|
|
1240
|
+
},
|
|
1241
|
+
process.env,
|
|
1242
|
+
mcpUrl
|
|
1243
|
+
);
|
|
1212
1244
|
const credentials = loadCredentials(mcpUrl);
|
|
1213
1245
|
const orgs = listStoredOrgs(mcpUrl);
|
|
1214
1246
|
const storedApi = loadStoredApiToken(apiUrl);
|
|
@@ -1237,7 +1269,7 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
1237
1269
|
`api: ${storedApi.apiUrl}`,
|
|
1238
1270
|
`stored API token: yes (${storedApi.tokenId})`,
|
|
1239
1271
|
`API token scopes: ${scopes}`,
|
|
1240
|
-
`API token expires: ${storedApi.expiresAt ?? "unknown"}`,
|
|
1272
|
+
`API token expires: ${storedApi.expiresAt ?? "unknown"} (saved at mint; idle tokens slide on use, \`kody whoami\` shows the live deadline)`,
|
|
1241
1273
|
`API token via: ${storedApi.createdVia ?? "unknown"}`
|
|
1242
1274
|
);
|
|
1243
1275
|
} else {
|
|
@@ -1343,7 +1375,7 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
1343
1375
|
parseGitCredentialAction,
|
|
1344
1376
|
parseGitCredentialInput,
|
|
1345
1377
|
readGitCredentialStdin
|
|
1346
|
-
} = await import("./git-credential-
|
|
1378
|
+
} = await import("./git-credential-L5AR3JRT.js");
|
|
1347
1379
|
const action = parseGitCredentialAction(parsed.positionals);
|
|
1348
1380
|
const raw = await readGitCredentialStdin(process.stdin);
|
|
1349
1381
|
const output = await handleGitCredential({
|
|
@@ -1368,7 +1400,7 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
1368
1400
|
apiUrl: typeof parsed.values["api-url"] === "string" ? parsed.values["api-url"] : void 0
|
|
1369
1401
|
});
|
|
1370
1402
|
if (target === "mock") {
|
|
1371
|
-
const { ensureMockTarget } = await import("./mock-server-
|
|
1403
|
+
const { ensureMockTarget } = await import("./mock-server-7P53AZUZ.js");
|
|
1372
1404
|
const mock = await ensureMockTarget({
|
|
1373
1405
|
resetStorage: parsed.values["reset-storage"] === true,
|
|
1374
1406
|
...org ? { orgSlug: org } : {}
|
|
@@ -1403,7 +1435,7 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
1403
1435
|
if (mock.started) await mock.server.close();
|
|
1404
1436
|
}
|
|
1405
1437
|
}
|
|
1406
|
-
const { runWhoami } = await import("./whoami-
|
|
1438
|
+
const { runWhoami } = await import("./whoami-RUMTWBZL.js");
|
|
1407
1439
|
return await runWhoami({
|
|
1408
1440
|
tokenValues,
|
|
1409
1441
|
mcpUrl,
|
|
@@ -1427,13 +1459,13 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
1427
1459
|
let closeMock;
|
|
1428
1460
|
try {
|
|
1429
1461
|
if (target === "mock") {
|
|
1430
|
-
const { ensureMockTarget } = await import("./mock-server-
|
|
1462
|
+
const { ensureMockTarget } = await import("./mock-server-7P53AZUZ.js");
|
|
1431
1463
|
const mock = await ensureMockTarget({
|
|
1432
1464
|
resetStorage: parsed.values["reset-storage"] === true
|
|
1433
1465
|
});
|
|
1434
1466
|
apiUrl = mock.apiUrl;
|
|
1435
1467
|
closeMock = mock.started ? () => mock.server.close() : void 0;
|
|
1436
|
-
const { searchWithApiToken: searchWithApiToken2 } = await import("./open-api-client-
|
|
1468
|
+
const { searchWithApiToken: searchWithApiToken2 } = await import("./open-api-client-QVDDK27F.js");
|
|
1437
1469
|
const result2 = await searchWithApiToken2({
|
|
1438
1470
|
token: mock.token,
|
|
1439
1471
|
apiUrl,
|
|
@@ -1453,7 +1485,7 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
1453
1485
|
...org ? { org } : {}
|
|
1454
1486
|
});
|
|
1455
1487
|
if (searchCredential?.token) {
|
|
1456
|
-
const { searchWithApiToken: searchWithApiToken2 } = await import("./open-api-client-
|
|
1488
|
+
const { searchWithApiToken: searchWithApiToken2 } = await import("./open-api-client-QVDDK27F.js");
|
|
1457
1489
|
const result2 = await searchWithApiToken2({
|
|
1458
1490
|
token: searchCredential.token,
|
|
1459
1491
|
apiUrl,
|
|
@@ -1466,14 +1498,14 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
1466
1498
|
write(formatToolResult(result2, json));
|
|
1467
1499
|
return result2.isError ? 1 : 0;
|
|
1468
1500
|
}
|
|
1469
|
-
const { ensureOpenApiCredentials } = await import("./auth-
|
|
1501
|
+
const { ensureOpenApiCredentials } = await import("./auth-4N35PHF7.js");
|
|
1470
1502
|
const credentials = await ensureOpenApiCredentials({
|
|
1471
1503
|
mcpUrl,
|
|
1472
1504
|
org,
|
|
1473
1505
|
apiUrl
|
|
1474
1506
|
});
|
|
1475
1507
|
noteActiveLoginCredential({ login: credentials, purpose: "session" });
|
|
1476
|
-
const { searchWithApiToken } = await import("./open-api-client-
|
|
1508
|
+
const { searchWithApiToken } = await import("./open-api-client-QVDDK27F.js");
|
|
1477
1509
|
const result = await searchWithApiToken({
|
|
1478
1510
|
token: credentials.accessToken,
|
|
1479
1511
|
apiUrl,
|
|
@@ -1523,7 +1555,8 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
1523
1555
|
);
|
|
1524
1556
|
}
|
|
1525
1557
|
if (local) assertLocalExecuteNodeEngine();
|
|
1526
|
-
const
|
|
1558
|
+
const positionalFile = !hasCodeFlag && !hasFileFlag && invoke === void 0 ? positionalModuleFile(positionalModule) : void 0;
|
|
1559
|
+
const fileArg = hasFileFlag ? parsed.values.file : positionalFile;
|
|
1527
1560
|
const modulePath = localPackageInvoke?.modulePath ?? (!hasCodeFlag && fileArg !== void 0 && fileArg !== "-" ? fileArg : void 0);
|
|
1528
1561
|
const code = publishedInvokeCode !== void 0 ? publishedInvokeCode : invoke !== void 0 && !localPackageInvoke ? void 0 : hasCodeFlag ? parsed.values.code : modulePath !== void 0 && !localPackageInvoke ? await readFile(modulePath, "utf8") : localPackageInvoke ? await readFile(localPackageInvoke.modulePath, "utf8") : fileArg === "-" ? await readStdin() : positionalModule || void 0;
|
|
1529
1562
|
const credentials = parseCredentialFlags(
|
|
@@ -1531,7 +1564,7 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
1531
1564
|
(value) => typeof value === "string"
|
|
1532
1565
|
) : typeof parsed.values.credential === "string" ? [parsed.values.credential] : void 0
|
|
1533
1566
|
);
|
|
1534
|
-
const executeRouting = (await import("./remote-execute-
|
|
1567
|
+
const executeRouting = (await import("./remote-execute-PBSB32YY.js")).executeRoutingFromFlags(parsed.values);
|
|
1535
1568
|
if (executeRouting && local) {
|
|
1536
1569
|
writeErr(
|
|
1537
1570
|
"--context, --fallback, --requires, and --chain route cloud execute; drop --local.\n"
|
|
@@ -1550,7 +1583,7 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
1550
1583
|
apiUrl: typeof parsed.values["api-url"] === "string" ? parsed.values["api-url"] : void 0
|
|
1551
1584
|
});
|
|
1552
1585
|
let apiUrl = prodApiUrl;
|
|
1553
|
-
const { parsePassthroughHosts } = await import("./mock-fetch-gateway-
|
|
1586
|
+
const { parsePassthroughHosts } = await import("./mock-fetch-gateway-VAGQFWVN.js");
|
|
1554
1587
|
const passthroughHosts = parsePassthroughHosts(
|
|
1555
1588
|
typeof parsed.values.passthrough === "string" ? parsed.values.passthrough : void 0
|
|
1556
1589
|
);
|
|
@@ -1565,7 +1598,7 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
1565
1598
|
let localPackageRun = localPackageInvoke;
|
|
1566
1599
|
if (!localPackageRun && local && modulePath !== void 0) {
|
|
1567
1600
|
try {
|
|
1568
|
-
const { loadPackageManifest } = await import("./package-manifest-
|
|
1601
|
+
const { loadPackageManifest } = await import("./package-manifest-AEBPXNCJ.js");
|
|
1569
1602
|
const manifest = await loadPackageManifest(process.cwd());
|
|
1570
1603
|
localPackageRun = {
|
|
1571
1604
|
modulePath,
|
|
@@ -1578,7 +1611,7 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
1578
1611
|
}
|
|
1579
1612
|
try {
|
|
1580
1613
|
if (target === "mock") {
|
|
1581
|
-
const { ensureMockTarget } = await import("./mock-server-
|
|
1614
|
+
const { ensureMockTarget } = await import("./mock-server-7P53AZUZ.js");
|
|
1582
1615
|
const mock = await ensureMockTarget({
|
|
1583
1616
|
resetStorage: parsed.values["reset-storage"] === true,
|
|
1584
1617
|
packageId: localPackageRun ? `local:${localPackageRun.kodyId}` : void 0,
|
|
@@ -1587,7 +1620,7 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
1587
1620
|
apiUrl = mock.apiUrl;
|
|
1588
1621
|
mockToken = mock.token;
|
|
1589
1622
|
closeMock = mock.started ? () => mock.server.close() : void 0;
|
|
1590
|
-
const { tryResolveMockDepResolve } = await import("./mock-dep-resolve-
|
|
1623
|
+
const { tryResolveMockDepResolve } = await import("./mock-dep-resolve-IVZOW4QE.js");
|
|
1591
1624
|
mockDepResolve = await tryResolveMockDepResolve({
|
|
1592
1625
|
tokenValues,
|
|
1593
1626
|
apiUrl: prodApiUrl,
|
|
@@ -1596,7 +1629,7 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
1596
1629
|
});
|
|
1597
1630
|
}
|
|
1598
1631
|
if (localPackageRun) {
|
|
1599
|
-
const { buildLocalPackageContext, runLocalPackageModule } = await import("./local-package-run-
|
|
1632
|
+
const { buildLocalPackageContext, runLocalPackageModule } = await import("./local-package-run-N3O2SD3L.js");
|
|
1600
1633
|
const result2 = await runLocalPackageModule({
|
|
1601
1634
|
modulePath: localPackageRun.modulePath,
|
|
1602
1635
|
params: args.params,
|
|
@@ -1635,13 +1668,13 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
1635
1668
|
let packageRootForMocks;
|
|
1636
1669
|
if (target === "mock") {
|
|
1637
1670
|
try {
|
|
1638
|
-
const { loadPackageManifest } = await import("./package-manifest-
|
|
1671
|
+
const { loadPackageManifest } = await import("./package-manifest-AEBPXNCJ.js");
|
|
1639
1672
|
packageRootForMocks = (await loadPackageManifest(process.cwd())).root;
|
|
1640
1673
|
} catch {
|
|
1641
1674
|
packageRootForMocks = void 0;
|
|
1642
1675
|
}
|
|
1643
1676
|
}
|
|
1644
|
-
const result = local ? await (await import("./local-execute-
|
|
1677
|
+
const result = local ? await (await import("./local-execute-WDKUY2JK.js")).runLocalExecute({
|
|
1645
1678
|
code: args.code,
|
|
1646
1679
|
...modulePath !== void 0 ? { modulePath } : {},
|
|
1647
1680
|
params: args.params,
|
|
@@ -1663,7 +1696,7 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
1663
1696
|
allowPrivateNetwork: parsed.values["allow-private-network"] === true,
|
|
1664
1697
|
onStatus: (message) => writeErr(`${message}
|
|
1665
1698
|
`)
|
|
1666
|
-
}) : cloudToken ? await (await import("./remote-execute-
|
|
1699
|
+
}) : cloudToken ? await (await import("./remote-execute-PBSB32YY.js")).runRemoteExecuteWithToken({
|
|
1667
1700
|
code: typeof args.code === "string" ? args.code : void 0,
|
|
1668
1701
|
params: args.params,
|
|
1669
1702
|
conversationId: args.conversationId,
|
|
@@ -1673,7 +1706,7 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
1673
1706
|
apiUrl,
|
|
1674
1707
|
...org ? { org } : {}
|
|
1675
1708
|
}) : await (async () => {
|
|
1676
|
-
const { ensureOpenApiCredentials } = await import("./auth-
|
|
1709
|
+
const { ensureOpenApiCredentials } = await import("./auth-4N35PHF7.js");
|
|
1677
1710
|
const session = await ensureOpenApiCredentials({
|
|
1678
1711
|
mcpUrl,
|
|
1679
1712
|
org,
|
|
@@ -1683,7 +1716,7 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
1683
1716
|
login: session,
|
|
1684
1717
|
purpose: "session"
|
|
1685
1718
|
});
|
|
1686
|
-
return (await import("./remote-execute-
|
|
1719
|
+
return (await import("./remote-execute-PBSB32YY.js")).runRemoteExecuteWithToken({
|
|
1687
1720
|
code: typeof args.code === "string" ? args.code : void 0,
|
|
1688
1721
|
params: args.params,
|
|
1689
1722
|
conversationId: args.conversationId,
|
|
@@ -1698,7 +1731,7 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
1698
1731
|
return result.isError ? 1 : 0;
|
|
1699
1732
|
} catch (error) {
|
|
1700
1733
|
if (json && local) {
|
|
1701
|
-
const { LocalPackageGraphError, packageGraphErrorToolResult } = await import("./local-package-graph-
|
|
1734
|
+
const { LocalPackageGraphError, packageGraphErrorToolResult } = await import("./local-package-graph-3TRAIUBT.js");
|
|
1702
1735
|
if (error instanceof LocalPackageGraphError) {
|
|
1703
1736
|
const redacted = redactError(error).message;
|
|
1704
1737
|
const result = packageGraphErrorToolResult(error);
|
|
@@ -1728,7 +1761,7 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
1728
1761
|
runDevServe,
|
|
1729
1762
|
runDevWebhook,
|
|
1730
1763
|
tryAttachedDevFetch
|
|
1731
|
-
} = await import("./dev-command-
|
|
1764
|
+
} = await import("./dev-command-P73A4I3C.js");
|
|
1732
1765
|
const target = resolveTarget({
|
|
1733
1766
|
command: "dev",
|
|
1734
1767
|
flag: typeof parsed.values.target === "string" ? parsed.values.target : void 0
|
|
@@ -1754,8 +1787,8 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
1754
1787
|
{ callOpenApiOperation, formatOpenApiHttpDebugLine },
|
|
1755
1788
|
{ parsePackageCheckResult, PublishChecksAuthError }
|
|
1756
1789
|
] = await Promise.all([
|
|
1757
|
-
import("./open-api-client-
|
|
1758
|
-
import("./dev-command-
|
|
1790
|
+
import("./open-api-client-QVDDK27F.js"),
|
|
1791
|
+
import("./dev-command-P73A4I3C.js")
|
|
1759
1792
|
]);
|
|
1760
1793
|
let token2;
|
|
1761
1794
|
try {
|
|
@@ -1869,13 +1902,13 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
1869
1902
|
purpose: "kody dev",
|
|
1870
1903
|
...org ? { org } : {}
|
|
1871
1904
|
}) : "mock";
|
|
1872
|
-
const mockDepResolve = target === "mock" ? await (await import("./mock-dep-resolve-
|
|
1905
|
+
const mockDepResolve = target === "mock" ? await (await import("./mock-dep-resolve-IVZOW4QE.js")).tryResolveMockDepResolve({
|
|
1873
1906
|
tokenValues,
|
|
1874
1907
|
apiUrl: prodApiUrl,
|
|
1875
1908
|
mcpUrl,
|
|
1876
1909
|
...org ? { org } : {}
|
|
1877
1910
|
}) : void 0;
|
|
1878
|
-
const { parsePassthroughHosts } = await import("./mock-fetch-gateway-
|
|
1911
|
+
const { parsePassthroughHosts } = await import("./mock-fetch-gateway-VAGQFWVN.js");
|
|
1879
1912
|
const passthroughHosts = parsePassthroughHosts(
|
|
1880
1913
|
typeof parsed.values.passthrough === "string" ? parsed.values.passthrough : void 0
|
|
1881
1914
|
);
|
|
@@ -1887,7 +1920,7 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
1887
1920
|
const allowPrivateNetwork = parsed.values["allow-private-network"] === true;
|
|
1888
1921
|
let packageId;
|
|
1889
1922
|
try {
|
|
1890
|
-
const { loadPackageManifest } = await import("./package-manifest-
|
|
1923
|
+
const { loadPackageManifest } = await import("./package-manifest-AEBPXNCJ.js");
|
|
1891
1924
|
const manifest = await loadPackageManifest(process.cwd());
|
|
1892
1925
|
packageId = `local:${manifest.kodyId}`;
|
|
1893
1926
|
} catch {
|
|
@@ -2010,7 +2043,7 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
2010
2043
|
const params = parseApiParamsJson(
|
|
2011
2044
|
typeof parsed.values.params === "string" ? parsed.values.params : void 0
|
|
2012
2045
|
);
|
|
2013
|
-
const { callOpenApiOperation } = await import("./open-api-client-
|
|
2046
|
+
const { callOpenApiOperation } = await import("./open-api-client-QVDDK27F.js");
|
|
2014
2047
|
const result = await callOpenApiOperation({
|
|
2015
2048
|
operationId,
|
|
2016
2049
|
params,
|
|
@@ -2045,7 +2078,7 @@ async function dispatch(parsed, write, writeErr) {
|
|
|
2045
2078
|
mcpUrl,
|
|
2046
2079
|
org
|
|
2047
2080
|
});
|
|
2048
|
-
const { callOpenApiOperation: callOpenApiOperation2 } = await import("./open-api-client-
|
|
2081
|
+
const { callOpenApiOperation: callOpenApiOperation2 } = await import("./open-api-client-QVDDK27F.js");
|
|
2049
2082
|
write(
|
|
2050
2083
|
await runPackageCollaboratorPlan({
|
|
2051
2084
|
plan,
|
|
@@ -2071,7 +2104,7 @@ ${packageCollaboratorUsage}`
|
|
|
2071
2104
|
positional: parsed.positionals[1],
|
|
2072
2105
|
paramsJson: typeof parsed.values.params === "string" ? parsed.values.params : void 0
|
|
2073
2106
|
});
|
|
2074
|
-
const { callOpenApiOperation } = await import("./open-api-client-
|
|
2107
|
+
const { callOpenApiOperation } = await import("./open-api-client-QVDDK27F.js");
|
|
2075
2108
|
const publishToken = await accessTokenForOpenApi({
|
|
2076
2109
|
tokenValues,
|
|
2077
2110
|
apiUrl,
|
|
@@ -2104,7 +2137,7 @@ ${packageCollaboratorUsage}`
|
|
|
2104
2137
|
return code;
|
|
2105
2138
|
}
|
|
2106
2139
|
case "install": {
|
|
2107
|
-
const { runInstall } = await import("./install-
|
|
2140
|
+
const { runInstall } = await import("./install-24DK5RBH.js");
|
|
2108
2141
|
const result = await runInstall(
|
|
2109
2142
|
{
|
|
2110
2143
|
mcpUrl,
|
|
@@ -2122,7 +2155,7 @@ ${packageCollaboratorUsage}`
|
|
|
2122
2155
|
if (action !== "install") {
|
|
2123
2156
|
throw new Error("Usage: kody skill install [--project]");
|
|
2124
2157
|
}
|
|
2125
|
-
const { installSkill } = await import("./skill-
|
|
2158
|
+
const { installSkill } = await import("./skill-QM3N6H55.js");
|
|
2126
2159
|
const targets = await installSkill({
|
|
2127
2160
|
project: parsed.values.project === true
|
|
2128
2161
|
});
|
|
@@ -2150,8 +2183,8 @@ async function tryResolveLocalPackageInvoke(invoke) {
|
|
|
2150
2183
|
const trimmed = invoke.trim();
|
|
2151
2184
|
if (!trimmed) return null;
|
|
2152
2185
|
if (isPublishedPackageInvokeSpecifier(trimmed)) return null;
|
|
2153
|
-
const { loadPackageManifest, resolveExportModulePath } = await import("./package-manifest-
|
|
2154
|
-
const { StructuredCliError } = await import("./structured-error-
|
|
2186
|
+
const { loadPackageManifest, resolveExportModulePath } = await import("./package-manifest-AEBPXNCJ.js");
|
|
2187
|
+
const { StructuredCliError } = await import("./structured-error-KS24XUSZ.js");
|
|
2155
2188
|
let manifest;
|
|
2156
2189
|
try {
|
|
2157
2190
|
manifest = await loadPackageManifest(process.cwd());
|
|
@@ -2182,6 +2215,23 @@ async function tryResolveLocalPackageInvoke(invoke) {
|
|
|
2182
2215
|
function executeSourcesConflict(input) {
|
|
2183
2216
|
return input.invoke !== void 0 && (input.hasCodeFlag || input.hasFileFlag || input.positionalModule.length > 0);
|
|
2184
2217
|
}
|
|
2218
|
+
var moduleFileExtension = /\.(?:[cm]?[jt]sx?)$/i;
|
|
2219
|
+
function positionalModuleFile(positionalModule, exists = (path) => {
|
|
2220
|
+
try {
|
|
2221
|
+
return statSync(path).isFile();
|
|
2222
|
+
} catch {
|
|
2223
|
+
return false;
|
|
2224
|
+
}
|
|
2225
|
+
}) {
|
|
2226
|
+
if (!positionalModule || /\s/.test(positionalModule)) return void 0;
|
|
2227
|
+
if (exists(positionalModule)) return positionalModule;
|
|
2228
|
+
if (moduleFileExtension.test(positionalModule)) {
|
|
2229
|
+
throw new Error(
|
|
2230
|
+
`No module file at ${JSON.stringify(positionalModule)}. Pass an existing path (or --file <path>), or the module source with --code.`
|
|
2231
|
+
);
|
|
2232
|
+
}
|
|
2233
|
+
return void 0;
|
|
2234
|
+
}
|
|
2185
2235
|
function buildExecuteToolArgs(input) {
|
|
2186
2236
|
const invoke = input.invoke;
|
|
2187
2237
|
const code = input.code;
|
|
@@ -2217,7 +2267,7 @@ function attachExecuteCommonArgs(args, input) {
|
|
|
2217
2267
|
return args;
|
|
2218
2268
|
}
|
|
2219
2269
|
async function runAuthSetupGit(input) {
|
|
2220
|
-
const { authSetupGit, setupGitDefaultScopes } = await import("./setup-git-
|
|
2270
|
+
const { authSetupGit, setupGitDefaultScopes } = await import("./setup-git-S57U4NT5.js");
|
|
2221
2271
|
const apiUrl = apiUrlFrom({
|
|
2222
2272
|
apiUrl: typeof input.values["api-url"] === "string" ? input.values["api-url"] : void 0
|
|
2223
2273
|
});
|
|
@@ -2274,7 +2324,7 @@ async function runAuthSetupGit(input) {
|
|
|
2274
2324
|
return 0;
|
|
2275
2325
|
}
|
|
2276
2326
|
async function runAuthRemoveGit(input) {
|
|
2277
|
-
const { authRemoveGit, formatAuthRemoveGitReport } = await import("./setup-git-
|
|
2327
|
+
const { authRemoveGit, formatAuthRemoveGitReport } = await import("./setup-git-S57U4NT5.js");
|
|
2278
2328
|
const apiUrl = apiUrlFrom({
|
|
2279
2329
|
apiUrl: typeof input.values["api-url"] === "string" ? input.values["api-url"] : void 0
|
|
2280
2330
|
});
|
|
@@ -2296,7 +2346,7 @@ function bootstrapMinter(input) {
|
|
|
2296
2346
|
});
|
|
2297
2347
|
if (minter?.token) {
|
|
2298
2348
|
const token = minter.token;
|
|
2299
|
-
const { callOpenApiOperation } = await import("./open-api-client-
|
|
2349
|
+
const { callOpenApiOperation } = await import("./open-api-client-QVDDK27F.js");
|
|
2300
2350
|
try {
|
|
2301
2351
|
return await callOpenApiOperation({
|
|
2302
2352
|
token,
|
|
@@ -2315,13 +2365,13 @@ function bootstrapMinter(input) {
|
|
|
2315
2365
|
}
|
|
2316
2366
|
}
|
|
2317
2367
|
if (minter) {
|
|
2318
|
-
const { ensureOpenApiCredentials } = await import("./auth-
|
|
2368
|
+
const { ensureOpenApiCredentials } = await import("./auth-4N35PHF7.js");
|
|
2319
2369
|
const session = await ensureOpenApiCredentials({
|
|
2320
2370
|
mcpUrl: input.mcpUrl,
|
|
2321
2371
|
apiUrl: input.apiUrl,
|
|
2322
2372
|
...input.org ? { org: input.org } : {}
|
|
2323
2373
|
});
|
|
2324
|
-
const { callOpenApiOperation } = await import("./open-api-client-
|
|
2374
|
+
const { callOpenApiOperation } = await import("./open-api-client-QVDDK27F.js");
|
|
2325
2375
|
return callOpenApiOperation({
|
|
2326
2376
|
operationId: cliCredentialBootstrapOperationId,
|
|
2327
2377
|
params,
|
|
@@ -2348,7 +2398,7 @@ async function accessTokenForOpenApi(input) {
|
|
|
2348
2398
|
...input.org ? { org: input.org } : {}
|
|
2349
2399
|
});
|
|
2350
2400
|
if (credential?.token) return credential.token;
|
|
2351
|
-
const { ensureOpenApiCredentials } = await import("./auth-
|
|
2401
|
+
const { ensureOpenApiCredentials } = await import("./auth-4N35PHF7.js");
|
|
2352
2402
|
const session = await ensureOpenApiCredentials({
|
|
2353
2403
|
mcpUrl: input.mcpUrl,
|
|
2354
2404
|
apiUrl: input.apiUrl,
|
|
@@ -2428,10 +2478,11 @@ export {
|
|
|
2428
2478
|
argvIncludesJsonFlag,
|
|
2429
2479
|
formatCliErrorJson,
|
|
2430
2480
|
executeSourcesConflict,
|
|
2481
|
+
positionalModuleFile,
|
|
2431
2482
|
buildExecuteToolArgs,
|
|
2432
2483
|
parseApiParamsJson,
|
|
2433
2484
|
packagePublishParams,
|
|
2434
2485
|
resolvePackagePublishTarget,
|
|
2435
2486
|
storedApiTokenAfterLoginNotice
|
|
2436
2487
|
};
|
|
2437
|
-
//# sourceMappingURL=chunk-
|
|
2488
|
+
//# sourceMappingURL=chunk-XAXNNOEC.js.map
|