@kodycodes/cli 1.31.5 → 1.31.7
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 +6 -0
- package/dist/{auth-CDE7OTGY.js → auth-QVK2QZCG.js} +4 -4
- package/dist/auth.d.ts +15 -0
- package/dist/bin.js +6 -6
- package/dist/{chunk-CSHXLQ3B.js → chunk-4TU44MXD.js} +2 -2
- package/dist/chunk-GVSGNTG6.js +43 -0
- package/dist/chunk-GVSGNTG6.js.map +6 -0
- package/dist/{chunk-6AUXJTDA.js → chunk-MA2Q2AWD.js} +140 -10
- package/dist/chunk-MA2Q2AWD.js.map +6 -0
- package/dist/{chunk-YKSELVAI.js → chunk-NTIJ36ZW.js} +68 -17
- package/dist/{chunk-YKSELVAI.js.map → chunk-NTIJ36ZW.js.map} +1 -1
- package/dist/{chunk-LIE42B73.js → chunk-WNQYXLQ5.js} +82 -46
- package/dist/chunk-WNQYXLQ5.js.map +6 -0
- package/dist/{chunk-BLPFUGNH.js → chunk-YM4IIHH5.js} +2 -2
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +6 -6
- package/dist/credential-dir.d.ts +30 -0
- package/dist/{dev-command-75DM5QWK.js → dev-command-RS24SIQM.js} +50 -7
- package/dist/{dev-command-75DM5QWK.js.map → dev-command-RS24SIQM.js.map} +1 -1
- package/dist/dev-command.d.ts +18 -0
- package/dist/{git-credential-XLD2N62E.js → git-credential-6EBU7AD4.js} +5 -5
- package/dist/{install-ONEJRYZ3.js → install-IR4MAVPG.js} +2 -2
- package/dist/login-callback-page.d.ts +1 -1
- package/dist/login-notice.d.ts +10 -0
- package/dist/{mock-dep-resolve-FRLPKTU2.js → mock-dep-resolve-MFFL6O7J.js} +5 -5
- package/dist/{open-api-client-HVWBTRXF.js → open-api-client-KC5DL744.js} +6 -2
- package/dist/open-api-client.d.ts +30 -0
- package/dist/open-url.d.ts +15 -1
- package/dist/{remote-execute-JIL4G3OF.js → remote-execute-ARIXR6ID.js} +2 -2
- package/dist/{setup-git-6VJBUPOI.js → setup-git-U6RXCG5T.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-6AUXJTDA.js.map +0 -6
- package/dist/chunk-LIE42B73.js.map +0 -6
- package/dist/chunk-ZILB2HWE.js +0 -24
- package/dist/chunk-ZILB2HWE.js.map +0 -6
- /package/dist/{auth-CDE7OTGY.js.map → auth-QVK2QZCG.js.map} +0 -0
- /package/dist/{chunk-CSHXLQ3B.js.map → chunk-4TU44MXD.js.map} +0 -0
- /package/dist/{chunk-BLPFUGNH.js.map → chunk-YM4IIHH5.js.map} +0 -0
- /package/dist/{git-credential-XLD2N62E.js.map → git-credential-6EBU7AD4.js.map} +0 -0
- /package/dist/{install-ONEJRYZ3.js.map → install-IR4MAVPG.js.map} +0 -0
- /package/dist/{mock-dep-resolve-FRLPKTU2.js.map → mock-dep-resolve-MFFL6O7J.js.map} +0 -0
- /package/dist/{open-api-client-HVWBTRXF.js.map → open-api-client-KC5DL744.js.map} +0 -0
- /package/dist/{remote-execute-JIL4G3OF.js.map → remote-execute-ARIXR6ID.js.map} +0 -0
- /package/dist/{setup-git-6VJBUPOI.js.map → setup-git-U6RXCG5T.js.map} +0 -0
package/dist/cli.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ declare function parseKnown(args: Array<string>): {
|
|
|
40
40
|
'reset-storage'?: string | boolean | undefined;
|
|
41
41
|
'dry-run'?: string | boolean | undefined;
|
|
42
42
|
offline?: string | boolean | undefined;
|
|
43
|
+
debug?: string | boolean | undefined;
|
|
43
44
|
passthrough?: string | boolean | undefined;
|
|
44
45
|
port?: string | boolean | undefined;
|
|
45
46
|
'app-base-path'?: string | boolean | undefined;
|
package/dist/cli.js
CHANGED
|
@@ -13,13 +13,13 @@ import {
|
|
|
13
13
|
resolvePackagePublishTarget,
|
|
14
14
|
runCli,
|
|
15
15
|
shouldUseApiToken
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WNQYXLQ5.js";
|
|
17
17
|
import "./chunk-2XPH7L2P.js";
|
|
18
18
|
import "./chunk-SLNAWWQK.js";
|
|
19
19
|
import "./chunk-YDWTXEKQ.js";
|
|
20
20
|
import {
|
|
21
21
|
resolveLocalExecuteBearer
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-4TU44MXD.js";
|
|
23
23
|
import {
|
|
24
24
|
authBootstrap,
|
|
25
25
|
authBootstrapWithScopes,
|
|
@@ -31,12 +31,12 @@ import {
|
|
|
31
31
|
parseCliScopesFlag,
|
|
32
32
|
redeemBootstrapCode,
|
|
33
33
|
resolveCliTokenLifetime
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-YM4IIHH5.js";
|
|
35
35
|
import "./chunk-6ZYUGXVW.js";
|
|
36
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-MA2Q2AWD.js";
|
|
37
37
|
import "./chunk-CASGRYOF.js";
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-GVSGNTG6.js";
|
|
39
|
+
import "./chunk-NTIJ36ZW.js";
|
|
40
40
|
import "./chunk-46IJPEID.js";
|
|
41
41
|
import "./chunk-PWWN6JI2.js";
|
|
42
42
|
import {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type StoreResolution } from './store.js';
|
|
2
|
+
/** True when a failed save looks like a folder permission or path problem. */
|
|
3
|
+
export declare function isCredentialFolderError(error: unknown): boolean;
|
|
4
|
+
/**
|
|
5
|
+
* Folder where `kody login` keeps its credential file (and falls back to when
|
|
6
|
+
* the OS keychain is unavailable).
|
|
7
|
+
*/
|
|
8
|
+
export declare function credentialDirFor(mcpUrl: string, resolution?: StoreResolution): string;
|
|
9
|
+
/** Plain-language steps to make the credential folder writable again. */
|
|
10
|
+
export declare function credentialDirFixSteps(dir: string, platform?: NodeJS.Platform): string;
|
|
11
|
+
/** Thrown when the credential folder is missing and cannot be created, or is read-only. */
|
|
12
|
+
export declare class CredentialDirError extends Error {
|
|
13
|
+
readonly dir: string;
|
|
14
|
+
readonly code: string | undefined;
|
|
15
|
+
constructor(input: {
|
|
16
|
+
dir: string;
|
|
17
|
+
cause: unknown;
|
|
18
|
+
phase: 'preflight' | 'save';
|
|
19
|
+
platform?: NodeJS.Platform;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Make sure the credential folder exists and accepts writes. Creates it when
|
|
24
|
+
* missing (mode 0700), then writes and removes a tiny probe file so a folder
|
|
25
|
+
* that exists but is read-only (for example macOS blocking
|
|
26
|
+
* ~/Library/Application Support) fails here, before the browser opens.
|
|
27
|
+
*/
|
|
28
|
+
export declare function ensureCredentialDirWritable(dir: string, options?: {
|
|
29
|
+
platform?: NodeJS.Platform;
|
|
30
|
+
}): void;
|
|
@@ -5523,6 +5523,41 @@ async function runDevEmit(input) {
|
|
|
5523
5523
|
surface: `subscription:${input.event}`
|
|
5524
5524
|
});
|
|
5525
5525
|
}
|
|
5526
|
+
var PublishChecksAuthError = class extends Error {
|
|
5527
|
+
constructor(message, options) {
|
|
5528
|
+
super(message, options);
|
|
5529
|
+
this.name = "PublishChecksAuthError";
|
|
5530
|
+
}
|
|
5531
|
+
};
|
|
5532
|
+
function readPublishChecksFailureMeta(error) {
|
|
5533
|
+
const record = error && typeof error === "object" ? error : {};
|
|
5534
|
+
const text = (key) => typeof record[key] === "string" ? record[key] : null;
|
|
5535
|
+
return {
|
|
5536
|
+
status: typeof record.status === "number" ? record.status : null,
|
|
5537
|
+
code: text("code"),
|
|
5538
|
+
reason: text("reason"),
|
|
5539
|
+
requestId: text("requestId")
|
|
5540
|
+
};
|
|
5541
|
+
}
|
|
5542
|
+
function isPublishChecksAuthFailure(error) {
|
|
5543
|
+
if (error instanceof PublishChecksAuthError) return true;
|
|
5544
|
+
const meta = readPublishChecksFailureMeta(error);
|
|
5545
|
+
return meta.status === 401 || meta.code === "unauthorized" || meta.code === "insufficient_scope";
|
|
5546
|
+
}
|
|
5547
|
+
function formatPublishChecksRunFailure(error) {
|
|
5548
|
+
const message = (error instanceof Error ? error.message : String(error)).replace(/\.+$/, "");
|
|
5549
|
+
if (isPublishChecksAuthFailure(error)) {
|
|
5550
|
+
return `could not run: ${message}. Sign in with \`kody login\` (or pass --token), or pass --offline to run only the local checks.`;
|
|
5551
|
+
}
|
|
5552
|
+
const meta = readPublishChecksFailureMeta(error);
|
|
5553
|
+
const facts = [
|
|
5554
|
+
...meta.status !== null ? [`HTTP ${meta.status}`] : [],
|
|
5555
|
+
...meta.code ? [`code ${meta.code}`] : [],
|
|
5556
|
+
...meta.reason ? [`reason ${meta.reason}`] : [],
|
|
5557
|
+
...meta.requestId && !message.includes(meta.requestId) ? [`request id ${meta.requestId}`] : []
|
|
5558
|
+
];
|
|
5559
|
+
return `could not run: ${message}${facts.length > 0 ? ` (${facts.join(", ")})` : ""}. Pass --debug for the HTTP details, or --offline to run only the local checks.`;
|
|
5560
|
+
}
|
|
5526
5561
|
var devCheckOfflineDetail = "skipped (--offline). Only local checks ran; publish runs the full publish checks and can still refuse this package.";
|
|
5527
5562
|
function parsePackageCheckResult(value) {
|
|
5528
5563
|
const body = value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
@@ -5650,6 +5685,7 @@ async function runDevCheck(input) {
|
|
|
5650
5685
|
push("secret-resolution", true, fetchBodyWarning, "warning");
|
|
5651
5686
|
}
|
|
5652
5687
|
let publishChecksOk = null;
|
|
5688
|
+
let publishChecksError = null;
|
|
5653
5689
|
if (input.offline) {
|
|
5654
5690
|
push("publish checks", true, devCheckOfflineDetail, "warning");
|
|
5655
5691
|
} else if (!input.runPublishChecks) {
|
|
@@ -5677,11 +5713,11 @@ async function runDevCheck(input) {
|
|
|
5677
5713
|
);
|
|
5678
5714
|
}
|
|
5679
5715
|
} catch (error) {
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
);
|
|
5716
|
+
publishChecksError = {
|
|
5717
|
+
message: error instanceof Error ? error.message : String(error),
|
|
5718
|
+
...readPublishChecksFailureMeta(error)
|
|
5719
|
+
};
|
|
5720
|
+
push("publish checks", false, formatPublishChecksRunFailure(error));
|
|
5685
5721
|
}
|
|
5686
5722
|
}
|
|
5687
5723
|
const failed = checks.filter((check) => !check.ok);
|
|
@@ -5692,7 +5728,11 @@ async function runDevCheck(input) {
|
|
|
5692
5728
|
target: input.target,
|
|
5693
5729
|
checks,
|
|
5694
5730
|
ok: failed.length === 0,
|
|
5695
|
-
publishChecks: input.offline ? { ran: false, skipped: "offline" } : {
|
|
5731
|
+
publishChecks: input.offline ? { ran: false, skipped: "offline" } : {
|
|
5732
|
+
ran: publishChecksOk !== null,
|
|
5733
|
+
ok: publishChecksOk,
|
|
5734
|
+
...publishChecksError ? { error: publishChecksError } : {}
|
|
5735
|
+
},
|
|
5696
5736
|
...credentialSignals.length > 0 ? {
|
|
5697
5737
|
credentialedFetch: {
|
|
5698
5738
|
detected: true,
|
|
@@ -5828,7 +5868,10 @@ async function removeOwnedReadyFile(path, ownerPid) {
|
|
|
5828
5868
|
}
|
|
5829
5869
|
}
|
|
5830
5870
|
export {
|
|
5871
|
+
PublishChecksAuthError,
|
|
5831
5872
|
devCheckOfflineDetail,
|
|
5873
|
+
formatPublishChecksRunFailure,
|
|
5874
|
+
isPublishChecksAuthFailure,
|
|
5832
5875
|
parseDevPort,
|
|
5833
5876
|
parseDevSubcommand,
|
|
5834
5877
|
parsePackageCheckResult,
|
|
@@ -5847,4 +5890,4 @@ export {
|
|
|
5847
5890
|
chokidar/esm/index.js:
|
|
5848
5891
|
(*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) *)
|
|
5849
5892
|
*/
|
|
5850
|
-
//# sourceMappingURL=dev-command-
|
|
5893
|
+
//# sourceMappingURL=dev-command-RS24SIQM.js.map
|