jamdesk 1.1.119 → 1.1.120
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jamdesk",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.120",
|
|
4
4
|
"description": "CLI for Jamdesk — build, preview, and deploy documentation sites from MDX. Dev server with hot reload, 50+ components, OpenAPI support, AI search, and Mintlify migration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jamdesk",
|
|
@@ -59,7 +59,7 @@ export function formatCloneError(err: CloneError): ErrorDetails {
|
|
|
59
59
|
case 'auth_failed': {
|
|
60
60
|
return {
|
|
61
61
|
type: 'clone_failed',
|
|
62
|
-
message: 'GitHub authentication failed',
|
|
62
|
+
message: fitInHeadline('GitHub authentication failed'),
|
|
63
63
|
details:
|
|
64
64
|
`The GitHub App token was rejected when cloning ${repoQuoted}. ` +
|
|
65
65
|
`The installation may have been suspended, revoked, or had its ` +
|
|
@@ -70,11 +70,28 @@ export function formatCloneError(err: CloneError): ErrorDetails {
|
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
case 'network_error': {
|
|
74
|
+
return {
|
|
75
|
+
type: 'clone_failed',
|
|
76
|
+
message: fitInHeadline(`Network error cloning ${repoText}`),
|
|
77
|
+
details:
|
|
78
|
+
`git could not reach GitHub when cloning ${repoQuoted}. This is ` +
|
|
79
|
+
`usually transient — DNS, TLS, or GitHub's git endpoint having a ` +
|
|
80
|
+
`bad moment — but a persistent firewall or proxy change can also ` +
|
|
81
|
+
`cause it.`,
|
|
82
|
+
suggestion:
|
|
83
|
+
'Re-trigger the build. If it keeps failing:\n' +
|
|
84
|
+
'• Check https://www.githubstatus.com for ongoing incidents\n' +
|
|
85
|
+
'• Confirm any custom egress proxy/firewall still allows ' +
|
|
86
|
+
'github.com:443',
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
73
90
|
case 'unknown':
|
|
74
91
|
default: {
|
|
75
92
|
return {
|
|
76
93
|
type: 'clone_failed',
|
|
77
|
-
message: 'Failed to clone repository',
|
|
94
|
+
message: fitInHeadline('Failed to clone repository'),
|
|
78
95
|
details: `Could not clone ${repoText}.`,
|
|
79
96
|
suggestion:
|
|
80
97
|
'Check that:\n' +
|
|
@@ -65,15 +65,39 @@ const styles = {
|
|
|
65
65
|
fontStyle: 'italic' as const,
|
|
66
66
|
margin: '4px 0 0 0',
|
|
67
67
|
},
|
|
68
|
+
// Used when the previous source line was blank — gives a visible paragraph
|
|
69
|
+
// break (e.g. between bullets and the "If you need help…" reference line).
|
|
70
|
+
suggestionParagraphBreak: {
|
|
71
|
+
color: colors.textSecondary,
|
|
72
|
+
fontSize: '13px',
|
|
73
|
+
fontStyle: 'italic' as const,
|
|
74
|
+
margin: '14px 0 0 0',
|
|
75
|
+
},
|
|
68
76
|
};
|
|
69
77
|
|
|
70
78
|
export function ErrorBox({ error, errorRef, errorType, errorSuggestion }: ErrorBoxProps) {
|
|
71
79
|
// Split on `\n` so multi-line suggestions render as a real list. A single
|
|
72
80
|
// <Text> (which becomes <p>) collapses whitespace, so "Either:\n• one\n• two"
|
|
73
|
-
// would otherwise reach the reader as a wall of prose.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
81
|
+
// would otherwise reach the reader as a wall of prose. Blank source lines
|
|
82
|
+
// (from "...\n\nIf you need help...") translate to a visible paragraph
|
|
83
|
+
// break — the next non-empty line gets a larger top margin.
|
|
84
|
+
const suggestionLines: Array<{ text: string; afterBlank: boolean }> = [];
|
|
85
|
+
if (errorSuggestion) {
|
|
86
|
+
let pendingBlank = false;
|
|
87
|
+
for (const raw of errorSuggestion.split('\n')) {
|
|
88
|
+
if (raw.trim().length === 0) {
|
|
89
|
+
pendingBlank = true;
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
suggestionLines.push({ text: raw, afterBlank: pendingBlank });
|
|
93
|
+
pendingBlank = false;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const styleFor = (i: number, afterBlank: boolean) => {
|
|
98
|
+
if (i === 0) return styles.suggestion;
|
|
99
|
+
return afterBlank ? styles.suggestionParagraphBreak : styles.suggestionContinuation;
|
|
100
|
+
};
|
|
77
101
|
|
|
78
102
|
return (
|
|
79
103
|
<Section style={styles.container} className="email-error-box">
|
|
@@ -88,13 +112,13 @@ export function ErrorBox({ error, errorRef, errorType, errorSuggestion }: ErrorB
|
|
|
88
112
|
<Text style={styles.errorType} className="email-paragraph">Type: {errorType}</Text>
|
|
89
113
|
)}
|
|
90
114
|
|
|
91
|
-
{suggestionLines.map((
|
|
115
|
+
{suggestionLines.map(({ text, afterBlank }, i) => (
|
|
92
116
|
<Text
|
|
93
117
|
key={i}
|
|
94
|
-
style={i
|
|
118
|
+
style={styleFor(i, afterBlank)}
|
|
95
119
|
className="email-paragraph"
|
|
96
120
|
>
|
|
97
|
-
{i === 0 ? `💡 ${
|
|
121
|
+
{i === 0 ? `💡 ${text}` : text}
|
|
98
122
|
</Text>
|
|
99
123
|
))}
|
|
100
124
|
</Section>
|