@shopify/cli-kit 4.8.4 → 4.9.0
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/private/node/analytics.js +5 -3
- package/dist/private/node/analytics.js.map +1 -1
- package/dist/private/node/api/status-checks.d.ts +7 -0
- package/dist/private/node/api/status-checks.js +11 -0
- package/dist/private/node/api/status-checks.js.map +1 -0
- package/dist/private/node/api.d.ts +15 -0
- package/dist/private/node/api.js +28 -0
- package/dist/private/node/api.js.map +1 -1
- package/dist/private/node/command-event-context.d.ts +29 -0
- package/dist/private/node/command-event-context.js +43 -0
- package/dist/private/node/command-event-context.js.map +1 -0
- package/dist/private/node/command-event-output.d.ts +7 -0
- package/dist/private/node/command-event-output.js +16 -0
- package/dist/private/node/command-event-output.js.map +1 -0
- package/dist/private/node/command-json-schema.d.ts +10 -0
- package/dist/private/node/command-json-schema.js +38 -0
- package/dist/private/node/command-json-schema.js.map +1 -0
- package/dist/private/node/context/agent.d.ts +1 -0
- package/dist/private/node/context/agent.js +44 -0
- package/dist/private/node/context/agent.js.map +1 -0
- package/dist/private/node/json-error.d.ts +23 -0
- package/dist/private/node/json-error.js +123 -0
- package/dist/private/node/json-error.js.map +1 -0
- package/dist/private/node/output.js +3 -1
- package/dist/private/node/output.js.map +1 -1
- package/dist/private/node/output.test.d.ts +1 -0
- package/dist/private/node/output.test.js +74 -0
- package/dist/private/node/output.test.js.map +1 -0
- package/dist/private/node/session/device-authorization.js +49 -15
- package/dist/private/node/session/device-authorization.js.map +1 -1
- package/dist/private/node/session/validate.js +9 -22
- package/dist/private/node/session/validate.js.map +1 -1
- package/dist/private/node/ui/alert.d.ts +1 -1
- package/dist/private/node/ui/alert.js +29 -3
- package/dist/private/node/ui/alert.js.map +1 -1
- package/dist/private/node/ui/components/ConcurrentOutput.d.ts +8 -1
- package/dist/private/node/ui/components/ConcurrentOutput.js +54 -0
- package/dist/private/node/ui/components/ConcurrentOutput.js.map +1 -1
- package/dist/private/node/ui/components/DangerousConfirmationPrompt.js +3 -3
- package/dist/private/node/ui/components/DangerousConfirmationPrompt.js.map +1 -1
- package/dist/private/node/ui/components/DangerousConfirmationPrompt.test.js +16 -1
- package/dist/private/node/ui/components/DangerousConfirmationPrompt.test.js.map +1 -1
- package/dist/private/node/ui/components/Prompts/PromptLayout.js +3 -2
- package/dist/private/node/ui/components/Prompts/PromptLayout.js.map +1 -1
- package/dist/private/node/ui/components/Prompts/PromptLayout.test.js +20 -1
- package/dist/private/node/ui/components/Prompts/PromptLayout.test.js.map +1 -1
- package/dist/private/node/ui/components/Tasks.d.ts +2 -9
- package/dist/private/node/ui/components/Tasks.js +5 -44
- package/dist/private/node/ui/components/Tasks.js.map +1 -1
- package/dist/private/node/ui/components/TextPrompt.js +3 -3
- package/dist/private/node/ui/components/TextPrompt.js.map +1 -1
- package/dist/private/node/ui/components/TextPrompt.test.js +15 -1
- package/dist/private/node/ui/components/TextPrompt.test.js.map +1 -1
- package/dist/private/node/ui/components/token-item.d.ts +2 -0
- package/dist/private/node/ui/components/token-item.js +26 -0
- package/dist/private/node/ui/components/token-item.js.map +1 -1
- package/dist/private/node/ui/hooks/use-async-and-unmount.d.ts +3 -3
- package/dist/private/node/ui/hooks/use-async-and-unmount.js +2 -2
- package/dist/private/node/ui/hooks/use-async-and-unmount.js.map +1 -1
- package/dist/private/node/ui/tasks.d.ts +10 -0
- package/dist/private/node/ui/tasks.js +68 -0
- package/dist/private/node/ui/tasks.js.map +1 -0
- package/dist/public/common/command-events.d.ts +125 -0
- package/dist/public/common/command-events.js +54 -0
- package/dist/public/common/command-events.js.map +1 -0
- package/dist/public/common/json-output-schema.d.ts +10 -0
- package/dist/public/common/json-output-schema.js +17 -0
- package/dist/public/common/json-output-schema.js.map +1 -0
- package/dist/public/common/version.d.ts +1 -1
- package/dist/public/common/version.js +1 -1
- package/dist/public/common/version.js.map +1 -1
- package/dist/public/node/api/admin.js +18 -1
- package/dist/public/node/api/admin.js.map +1 -1
- package/dist/public/node/api/app-management.d.ts +1 -0
- package/dist/public/node/api/app-management.js +4 -0
- package/dist/public/node/api/app-management.js.map +1 -1
- package/dist/public/node/api/bulk-operations/download-bulk-operation-results.d.ts +3 -3
- package/dist/public/node/api/bulk-operations/download-bulk-operation-results.js +5 -3
- package/dist/public/node/api/bulk-operations/download-bulk-operation-results.js.map +1 -1
- package/dist/public/node/base-command.d.ts +6 -0
- package/dist/public/node/base-command.js +34 -5
- package/dist/public/node/base-command.js.map +1 -1
- package/dist/public/node/cli-launcher.js +20 -2
- package/dist/public/node/cli-launcher.js.map +1 -1
- package/dist/public/node/cli.d.ts +1 -0
- package/dist/public/node/cli.js +2 -0
- package/dist/public/node/cli.js.map +1 -1
- package/dist/public/node/command-events.d.ts +65 -0
- package/dist/public/node/command-events.js +71 -0
- package/dist/public/node/command-events.js.map +1 -0
- package/dist/public/node/context/local.d.ts +6 -0
- package/dist/public/node/context/local.js +10 -1
- package/dist/public/node/context/local.js.map +1 -1
- package/dist/public/node/custom-oclif-loader.d.ts +6 -0
- package/dist/public/node/custom-oclif-loader.js +45 -19
- package/dist/public/node/custom-oclif-loader.js.map +1 -1
- package/dist/public/node/environment.d.ts +2 -1
- package/dist/public/node/environment.js +3 -2
- package/dist/public/node/environment.js.map +1 -1
- package/dist/public/node/error/index.d.ts +91 -0
- package/dist/public/node/error/index.js +266 -0
- package/dist/public/node/error/index.js.map +1 -0
- package/dist/public/node/error/schema.d.ts +472 -0
- package/dist/public/node/error/schema.js +54 -0
- package/dist/public/node/error/schema.js.map +1 -0
- package/dist/public/node/error/types.d.ts +9 -0
- package/dist/public/node/error/types.js +2 -0
- package/dist/public/node/error/types.js.map +1 -0
- package/dist/public/node/error.d.ts +1 -87
- package/dist/public/node/error.js +1 -252
- package/dist/public/node/error.js.map +1 -1
- package/dist/public/node/fs.d.ts +17 -3
- package/dist/public/node/fs.js +7 -5
- package/dist/public/node/fs.js.map +1 -1
- package/dist/public/node/json-output-schema.d.ts +26 -0
- package/dist/public/node/json-output-schema.js +30 -0
- package/dist/public/node/json-output-schema.js.map +1 -0
- package/dist/public/node/local-storage.d.ts +1 -0
- package/dist/public/node/local-storage.js +54 -21
- package/dist/public/node/local-storage.js.map +1 -1
- package/dist/public/node/monorail.d.ts +3 -1
- package/dist/public/node/monorail.js +1 -1
- package/dist/public/node/monorail.js.map +1 -1
- package/dist/public/node/multiple-installation-warning.d.ts +1 -1
- package/dist/public/node/multiple-installation-warning.js +2 -3
- package/dist/public/node/multiple-installation-warning.js.map +1 -1
- package/dist/public/node/no-input.d.ts +11 -0
- package/dist/public/node/no-input.js +19 -0
- package/dist/public/node/no-input.js.map +1 -0
- package/dist/public/node/output.d.ts +6 -0
- package/dist/public/node/output.js +40 -0
- package/dist/public/node/output.js.map +1 -1
- package/dist/public/node/path.js +3 -1
- package/dist/public/node/path.js.map +1 -1
- package/dist/public/node/system.d.ts +2 -2
- package/dist/public/node/system.js +8 -4
- package/dist/public/node/system.js.map +1 -1
- package/dist/public/node/testing/output.d.ts +30 -0
- package/dist/public/node/testing/output.js +83 -0
- package/dist/public/node/testing/output.js.map +1 -1
- package/dist/public/node/ui.d.ts +5 -1
- package/dist/public/node/ui.js +89 -5
- package/dist/public/node/ui.js.map +1 -1
- package/dist/public/node/upgrade.js +17 -2
- package/dist/public/node/upgrade.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,472 @@
|
|
|
1
|
+
import { zod } from '../schema.js';
|
|
2
|
+
export declare const JsonErrorCustomSectionSchema: zod.ZodObject<{
|
|
3
|
+
title: zod.ZodOptional<zod.ZodString>;
|
|
4
|
+
body: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodArray<zod.ZodString, "many">, "many">]>;
|
|
5
|
+
}, "strict", zod.ZodTypeAny, {
|
|
6
|
+
body: string | string[][];
|
|
7
|
+
title?: string | undefined;
|
|
8
|
+
}, {
|
|
9
|
+
body: string | string[][];
|
|
10
|
+
title?: string | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const JsonAbortErrorSchema: zod.ZodObject<{
|
|
13
|
+
message: zod.ZodString;
|
|
14
|
+
code: zod.ZodOptional<zod.ZodString>;
|
|
15
|
+
tryMessage: zod.ZodOptional<zod.ZodString>;
|
|
16
|
+
nextSteps: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
17
|
+
customSections: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
18
|
+
title: zod.ZodOptional<zod.ZodString>;
|
|
19
|
+
body: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodArray<zod.ZodString, "many">, "many">]>;
|
|
20
|
+
}, "strict", zod.ZodTypeAny, {
|
|
21
|
+
body: string | string[][];
|
|
22
|
+
title?: string | undefined;
|
|
23
|
+
}, {
|
|
24
|
+
body: string | string[][];
|
|
25
|
+
title?: string | undefined;
|
|
26
|
+
}>, "many">>;
|
|
27
|
+
details: zod.ZodOptional<zod.ZodUnknown>;
|
|
28
|
+
type: zod.ZodLiteral<"abort">;
|
|
29
|
+
}, "strict", zod.ZodTypeAny, {
|
|
30
|
+
type: "abort";
|
|
31
|
+
message: string;
|
|
32
|
+
code?: string | undefined;
|
|
33
|
+
nextSteps?: string[] | undefined;
|
|
34
|
+
customSections?: {
|
|
35
|
+
body: string | string[][];
|
|
36
|
+
title?: string | undefined;
|
|
37
|
+
}[] | undefined;
|
|
38
|
+
details?: unknown;
|
|
39
|
+
tryMessage?: string | undefined;
|
|
40
|
+
}, {
|
|
41
|
+
type: "abort";
|
|
42
|
+
message: string;
|
|
43
|
+
code?: string | undefined;
|
|
44
|
+
nextSteps?: string[] | undefined;
|
|
45
|
+
customSections?: {
|
|
46
|
+
body: string | string[][];
|
|
47
|
+
title?: string | undefined;
|
|
48
|
+
}[] | undefined;
|
|
49
|
+
details?: unknown;
|
|
50
|
+
tryMessage?: string | undefined;
|
|
51
|
+
}>;
|
|
52
|
+
export declare const JsonBugErrorSchema: zod.ZodObject<{
|
|
53
|
+
stack: zod.ZodOptional<zod.ZodString>;
|
|
54
|
+
message: zod.ZodString;
|
|
55
|
+
code: zod.ZodOptional<zod.ZodString>;
|
|
56
|
+
tryMessage: zod.ZodOptional<zod.ZodString>;
|
|
57
|
+
nextSteps: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
58
|
+
customSections: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
59
|
+
title: zod.ZodOptional<zod.ZodString>;
|
|
60
|
+
body: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodArray<zod.ZodString, "many">, "many">]>;
|
|
61
|
+
}, "strict", zod.ZodTypeAny, {
|
|
62
|
+
body: string | string[][];
|
|
63
|
+
title?: string | undefined;
|
|
64
|
+
}, {
|
|
65
|
+
body: string | string[][];
|
|
66
|
+
title?: string | undefined;
|
|
67
|
+
}>, "many">>;
|
|
68
|
+
details: zod.ZodOptional<zod.ZodUnknown>;
|
|
69
|
+
type: zod.ZodLiteral<"bug">;
|
|
70
|
+
}, "strict", zod.ZodTypeAny, {
|
|
71
|
+
type: "bug";
|
|
72
|
+
message: string;
|
|
73
|
+
code?: string | undefined;
|
|
74
|
+
stack?: string | undefined;
|
|
75
|
+
nextSteps?: string[] | undefined;
|
|
76
|
+
customSections?: {
|
|
77
|
+
body: string | string[][];
|
|
78
|
+
title?: string | undefined;
|
|
79
|
+
}[] | undefined;
|
|
80
|
+
details?: unknown;
|
|
81
|
+
tryMessage?: string | undefined;
|
|
82
|
+
}, {
|
|
83
|
+
type: "bug";
|
|
84
|
+
message: string;
|
|
85
|
+
code?: string | undefined;
|
|
86
|
+
stack?: string | undefined;
|
|
87
|
+
nextSteps?: string[] | undefined;
|
|
88
|
+
customSections?: {
|
|
89
|
+
body: string | string[][];
|
|
90
|
+
title?: string | undefined;
|
|
91
|
+
}[] | undefined;
|
|
92
|
+
details?: unknown;
|
|
93
|
+
tryMessage?: string | undefined;
|
|
94
|
+
}>;
|
|
95
|
+
export declare const JsonExternalErrorSchema: zod.ZodObject<{
|
|
96
|
+
command: zod.ZodString;
|
|
97
|
+
args: zod.ZodArray<zod.ZodString, "many">;
|
|
98
|
+
message: zod.ZodString;
|
|
99
|
+
code: zod.ZodOptional<zod.ZodString>;
|
|
100
|
+
tryMessage: zod.ZodOptional<zod.ZodString>;
|
|
101
|
+
nextSteps: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
102
|
+
customSections: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
103
|
+
title: zod.ZodOptional<zod.ZodString>;
|
|
104
|
+
body: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodArray<zod.ZodString, "many">, "many">]>;
|
|
105
|
+
}, "strict", zod.ZodTypeAny, {
|
|
106
|
+
body: string | string[][];
|
|
107
|
+
title?: string | undefined;
|
|
108
|
+
}, {
|
|
109
|
+
body: string | string[][];
|
|
110
|
+
title?: string | undefined;
|
|
111
|
+
}>, "many">>;
|
|
112
|
+
details: zod.ZodOptional<zod.ZodUnknown>;
|
|
113
|
+
type: zod.ZodLiteral<"external">;
|
|
114
|
+
}, "strict", zod.ZodTypeAny, {
|
|
115
|
+
type: "external";
|
|
116
|
+
message: string;
|
|
117
|
+
command: string;
|
|
118
|
+
args: string[];
|
|
119
|
+
code?: string | undefined;
|
|
120
|
+
nextSteps?: string[] | undefined;
|
|
121
|
+
customSections?: {
|
|
122
|
+
body: string | string[][];
|
|
123
|
+
title?: string | undefined;
|
|
124
|
+
}[] | undefined;
|
|
125
|
+
details?: unknown;
|
|
126
|
+
tryMessage?: string | undefined;
|
|
127
|
+
}, {
|
|
128
|
+
type: "external";
|
|
129
|
+
message: string;
|
|
130
|
+
command: string;
|
|
131
|
+
args: string[];
|
|
132
|
+
code?: string | undefined;
|
|
133
|
+
nextSteps?: string[] | undefined;
|
|
134
|
+
customSections?: {
|
|
135
|
+
body: string | string[][];
|
|
136
|
+
title?: string | undefined;
|
|
137
|
+
}[] | undefined;
|
|
138
|
+
details?: unknown;
|
|
139
|
+
tryMessage?: string | undefined;
|
|
140
|
+
}>;
|
|
141
|
+
export declare const JsonErrorSchema: zod.ZodUnion<[zod.ZodObject<{
|
|
142
|
+
message: zod.ZodString;
|
|
143
|
+
code: zod.ZodOptional<zod.ZodString>;
|
|
144
|
+
tryMessage: zod.ZodOptional<zod.ZodString>;
|
|
145
|
+
nextSteps: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
146
|
+
customSections: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
147
|
+
title: zod.ZodOptional<zod.ZodString>;
|
|
148
|
+
body: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodArray<zod.ZodString, "many">, "many">]>;
|
|
149
|
+
}, "strict", zod.ZodTypeAny, {
|
|
150
|
+
body: string | string[][];
|
|
151
|
+
title?: string | undefined;
|
|
152
|
+
}, {
|
|
153
|
+
body: string | string[][];
|
|
154
|
+
title?: string | undefined;
|
|
155
|
+
}>, "many">>;
|
|
156
|
+
details: zod.ZodOptional<zod.ZodUnknown>;
|
|
157
|
+
type: zod.ZodLiteral<"abort">;
|
|
158
|
+
}, "strict", zod.ZodTypeAny, {
|
|
159
|
+
type: "abort";
|
|
160
|
+
message: string;
|
|
161
|
+
code?: string | undefined;
|
|
162
|
+
nextSteps?: string[] | undefined;
|
|
163
|
+
customSections?: {
|
|
164
|
+
body: string | string[][];
|
|
165
|
+
title?: string | undefined;
|
|
166
|
+
}[] | undefined;
|
|
167
|
+
details?: unknown;
|
|
168
|
+
tryMessage?: string | undefined;
|
|
169
|
+
}, {
|
|
170
|
+
type: "abort";
|
|
171
|
+
message: string;
|
|
172
|
+
code?: string | undefined;
|
|
173
|
+
nextSteps?: string[] | undefined;
|
|
174
|
+
customSections?: {
|
|
175
|
+
body: string | string[][];
|
|
176
|
+
title?: string | undefined;
|
|
177
|
+
}[] | undefined;
|
|
178
|
+
details?: unknown;
|
|
179
|
+
tryMessage?: string | undefined;
|
|
180
|
+
}>, zod.ZodObject<{
|
|
181
|
+
stack: zod.ZodOptional<zod.ZodString>;
|
|
182
|
+
message: zod.ZodString;
|
|
183
|
+
code: zod.ZodOptional<zod.ZodString>;
|
|
184
|
+
tryMessage: zod.ZodOptional<zod.ZodString>;
|
|
185
|
+
nextSteps: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
186
|
+
customSections: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
187
|
+
title: zod.ZodOptional<zod.ZodString>;
|
|
188
|
+
body: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodArray<zod.ZodString, "many">, "many">]>;
|
|
189
|
+
}, "strict", zod.ZodTypeAny, {
|
|
190
|
+
body: string | string[][];
|
|
191
|
+
title?: string | undefined;
|
|
192
|
+
}, {
|
|
193
|
+
body: string | string[][];
|
|
194
|
+
title?: string | undefined;
|
|
195
|
+
}>, "many">>;
|
|
196
|
+
details: zod.ZodOptional<zod.ZodUnknown>;
|
|
197
|
+
type: zod.ZodLiteral<"bug">;
|
|
198
|
+
}, "strict", zod.ZodTypeAny, {
|
|
199
|
+
type: "bug";
|
|
200
|
+
message: string;
|
|
201
|
+
code?: string | undefined;
|
|
202
|
+
stack?: string | undefined;
|
|
203
|
+
nextSteps?: string[] | undefined;
|
|
204
|
+
customSections?: {
|
|
205
|
+
body: string | string[][];
|
|
206
|
+
title?: string | undefined;
|
|
207
|
+
}[] | undefined;
|
|
208
|
+
details?: unknown;
|
|
209
|
+
tryMessage?: string | undefined;
|
|
210
|
+
}, {
|
|
211
|
+
type: "bug";
|
|
212
|
+
message: string;
|
|
213
|
+
code?: string | undefined;
|
|
214
|
+
stack?: string | undefined;
|
|
215
|
+
nextSteps?: string[] | undefined;
|
|
216
|
+
customSections?: {
|
|
217
|
+
body: string | string[][];
|
|
218
|
+
title?: string | undefined;
|
|
219
|
+
}[] | undefined;
|
|
220
|
+
details?: unknown;
|
|
221
|
+
tryMessage?: string | undefined;
|
|
222
|
+
}>, zod.ZodObject<{
|
|
223
|
+
command: zod.ZodString;
|
|
224
|
+
args: zod.ZodArray<zod.ZodString, "many">;
|
|
225
|
+
message: zod.ZodString;
|
|
226
|
+
code: zod.ZodOptional<zod.ZodString>;
|
|
227
|
+
tryMessage: zod.ZodOptional<zod.ZodString>;
|
|
228
|
+
nextSteps: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
229
|
+
customSections: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
230
|
+
title: zod.ZodOptional<zod.ZodString>;
|
|
231
|
+
body: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodArray<zod.ZodString, "many">, "many">]>;
|
|
232
|
+
}, "strict", zod.ZodTypeAny, {
|
|
233
|
+
body: string | string[][];
|
|
234
|
+
title?: string | undefined;
|
|
235
|
+
}, {
|
|
236
|
+
body: string | string[][];
|
|
237
|
+
title?: string | undefined;
|
|
238
|
+
}>, "many">>;
|
|
239
|
+
details: zod.ZodOptional<zod.ZodUnknown>;
|
|
240
|
+
type: zod.ZodLiteral<"external">;
|
|
241
|
+
}, "strict", zod.ZodTypeAny, {
|
|
242
|
+
type: "external";
|
|
243
|
+
message: string;
|
|
244
|
+
command: string;
|
|
245
|
+
args: string[];
|
|
246
|
+
code?: string | undefined;
|
|
247
|
+
nextSteps?: string[] | undefined;
|
|
248
|
+
customSections?: {
|
|
249
|
+
body: string | string[][];
|
|
250
|
+
title?: string | undefined;
|
|
251
|
+
}[] | undefined;
|
|
252
|
+
details?: unknown;
|
|
253
|
+
tryMessage?: string | undefined;
|
|
254
|
+
}, {
|
|
255
|
+
type: "external";
|
|
256
|
+
message: string;
|
|
257
|
+
command: string;
|
|
258
|
+
args: string[];
|
|
259
|
+
code?: string | undefined;
|
|
260
|
+
nextSteps?: string[] | undefined;
|
|
261
|
+
customSections?: {
|
|
262
|
+
body: string | string[][];
|
|
263
|
+
title?: string | undefined;
|
|
264
|
+
}[] | undefined;
|
|
265
|
+
details?: unknown;
|
|
266
|
+
tryMessage?: string | undefined;
|
|
267
|
+
}>]>;
|
|
268
|
+
export declare const jsonErrorOutputSchema: import("../json-output-schema.js").JsonOutputSchema<zod.ZodObject<{
|
|
269
|
+
error: zod.ZodUnion<[zod.ZodObject<{
|
|
270
|
+
message: zod.ZodString;
|
|
271
|
+
code: zod.ZodOptional<zod.ZodString>;
|
|
272
|
+
tryMessage: zod.ZodOptional<zod.ZodString>;
|
|
273
|
+
nextSteps: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
274
|
+
customSections: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
275
|
+
title: zod.ZodOptional<zod.ZodString>;
|
|
276
|
+
body: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodArray<zod.ZodString, "many">, "many">]>;
|
|
277
|
+
}, "strict", zod.ZodTypeAny, {
|
|
278
|
+
body: string | string[][];
|
|
279
|
+
title?: string | undefined;
|
|
280
|
+
}, {
|
|
281
|
+
body: string | string[][];
|
|
282
|
+
title?: string | undefined;
|
|
283
|
+
}>, "many">>;
|
|
284
|
+
details: zod.ZodOptional<zod.ZodUnknown>;
|
|
285
|
+
type: zod.ZodLiteral<"abort">;
|
|
286
|
+
}, "strict", zod.ZodTypeAny, {
|
|
287
|
+
type: "abort";
|
|
288
|
+
message: string;
|
|
289
|
+
code?: string | undefined;
|
|
290
|
+
nextSteps?: string[] | undefined;
|
|
291
|
+
customSections?: {
|
|
292
|
+
body: string | string[][];
|
|
293
|
+
title?: string | undefined;
|
|
294
|
+
}[] | undefined;
|
|
295
|
+
details?: unknown;
|
|
296
|
+
tryMessage?: string | undefined;
|
|
297
|
+
}, {
|
|
298
|
+
type: "abort";
|
|
299
|
+
message: string;
|
|
300
|
+
code?: string | undefined;
|
|
301
|
+
nextSteps?: string[] | undefined;
|
|
302
|
+
customSections?: {
|
|
303
|
+
body: string | string[][];
|
|
304
|
+
title?: string | undefined;
|
|
305
|
+
}[] | undefined;
|
|
306
|
+
details?: unknown;
|
|
307
|
+
tryMessage?: string | undefined;
|
|
308
|
+
}>, zod.ZodObject<{
|
|
309
|
+
stack: zod.ZodOptional<zod.ZodString>;
|
|
310
|
+
message: zod.ZodString;
|
|
311
|
+
code: zod.ZodOptional<zod.ZodString>;
|
|
312
|
+
tryMessage: zod.ZodOptional<zod.ZodString>;
|
|
313
|
+
nextSteps: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
314
|
+
customSections: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
315
|
+
title: zod.ZodOptional<zod.ZodString>;
|
|
316
|
+
body: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodArray<zod.ZodString, "many">, "many">]>;
|
|
317
|
+
}, "strict", zod.ZodTypeAny, {
|
|
318
|
+
body: string | string[][];
|
|
319
|
+
title?: string | undefined;
|
|
320
|
+
}, {
|
|
321
|
+
body: string | string[][];
|
|
322
|
+
title?: string | undefined;
|
|
323
|
+
}>, "many">>;
|
|
324
|
+
details: zod.ZodOptional<zod.ZodUnknown>;
|
|
325
|
+
type: zod.ZodLiteral<"bug">;
|
|
326
|
+
}, "strict", zod.ZodTypeAny, {
|
|
327
|
+
type: "bug";
|
|
328
|
+
message: string;
|
|
329
|
+
code?: string | undefined;
|
|
330
|
+
stack?: string | undefined;
|
|
331
|
+
nextSteps?: string[] | undefined;
|
|
332
|
+
customSections?: {
|
|
333
|
+
body: string | string[][];
|
|
334
|
+
title?: string | undefined;
|
|
335
|
+
}[] | undefined;
|
|
336
|
+
details?: unknown;
|
|
337
|
+
tryMessage?: string | undefined;
|
|
338
|
+
}, {
|
|
339
|
+
type: "bug";
|
|
340
|
+
message: string;
|
|
341
|
+
code?: string | undefined;
|
|
342
|
+
stack?: string | undefined;
|
|
343
|
+
nextSteps?: string[] | undefined;
|
|
344
|
+
customSections?: {
|
|
345
|
+
body: string | string[][];
|
|
346
|
+
title?: string | undefined;
|
|
347
|
+
}[] | undefined;
|
|
348
|
+
details?: unknown;
|
|
349
|
+
tryMessage?: string | undefined;
|
|
350
|
+
}>, zod.ZodObject<{
|
|
351
|
+
command: zod.ZodString;
|
|
352
|
+
args: zod.ZodArray<zod.ZodString, "many">;
|
|
353
|
+
message: zod.ZodString;
|
|
354
|
+
code: zod.ZodOptional<zod.ZodString>;
|
|
355
|
+
tryMessage: zod.ZodOptional<zod.ZodString>;
|
|
356
|
+
nextSteps: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
357
|
+
customSections: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
358
|
+
title: zod.ZodOptional<zod.ZodString>;
|
|
359
|
+
body: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodArray<zod.ZodString, "many">, "many">]>;
|
|
360
|
+
}, "strict", zod.ZodTypeAny, {
|
|
361
|
+
body: string | string[][];
|
|
362
|
+
title?: string | undefined;
|
|
363
|
+
}, {
|
|
364
|
+
body: string | string[][];
|
|
365
|
+
title?: string | undefined;
|
|
366
|
+
}>, "many">>;
|
|
367
|
+
details: zod.ZodOptional<zod.ZodUnknown>;
|
|
368
|
+
type: zod.ZodLiteral<"external">;
|
|
369
|
+
}, "strict", zod.ZodTypeAny, {
|
|
370
|
+
type: "external";
|
|
371
|
+
message: string;
|
|
372
|
+
command: string;
|
|
373
|
+
args: string[];
|
|
374
|
+
code?: string | undefined;
|
|
375
|
+
nextSteps?: string[] | undefined;
|
|
376
|
+
customSections?: {
|
|
377
|
+
body: string | string[][];
|
|
378
|
+
title?: string | undefined;
|
|
379
|
+
}[] | undefined;
|
|
380
|
+
details?: unknown;
|
|
381
|
+
tryMessage?: string | undefined;
|
|
382
|
+
}, {
|
|
383
|
+
type: "external";
|
|
384
|
+
message: string;
|
|
385
|
+
command: string;
|
|
386
|
+
args: string[];
|
|
387
|
+
code?: string | undefined;
|
|
388
|
+
nextSteps?: string[] | undefined;
|
|
389
|
+
customSections?: {
|
|
390
|
+
body: string | string[][];
|
|
391
|
+
title?: string | undefined;
|
|
392
|
+
}[] | undefined;
|
|
393
|
+
details?: unknown;
|
|
394
|
+
tryMessage?: string | undefined;
|
|
395
|
+
}>]>;
|
|
396
|
+
}, "strict", zod.ZodTypeAny, {
|
|
397
|
+
error: {
|
|
398
|
+
type: "abort";
|
|
399
|
+
message: string;
|
|
400
|
+
code?: string | undefined;
|
|
401
|
+
nextSteps?: string[] | undefined;
|
|
402
|
+
customSections?: {
|
|
403
|
+
body: string | string[][];
|
|
404
|
+
title?: string | undefined;
|
|
405
|
+
}[] | undefined;
|
|
406
|
+
details?: unknown;
|
|
407
|
+
tryMessage?: string | undefined;
|
|
408
|
+
} | {
|
|
409
|
+
type: "bug";
|
|
410
|
+
message: string;
|
|
411
|
+
code?: string | undefined;
|
|
412
|
+
stack?: string | undefined;
|
|
413
|
+
nextSteps?: string[] | undefined;
|
|
414
|
+
customSections?: {
|
|
415
|
+
body: string | string[][];
|
|
416
|
+
title?: string | undefined;
|
|
417
|
+
}[] | undefined;
|
|
418
|
+
details?: unknown;
|
|
419
|
+
tryMessage?: string | undefined;
|
|
420
|
+
} | {
|
|
421
|
+
type: "external";
|
|
422
|
+
message: string;
|
|
423
|
+
command: string;
|
|
424
|
+
args: string[];
|
|
425
|
+
code?: string | undefined;
|
|
426
|
+
nextSteps?: string[] | undefined;
|
|
427
|
+
customSections?: {
|
|
428
|
+
body: string | string[][];
|
|
429
|
+
title?: string | undefined;
|
|
430
|
+
}[] | undefined;
|
|
431
|
+
details?: unknown;
|
|
432
|
+
tryMessage?: string | undefined;
|
|
433
|
+
};
|
|
434
|
+
}, {
|
|
435
|
+
error: {
|
|
436
|
+
type: "abort";
|
|
437
|
+
message: string;
|
|
438
|
+
code?: string | undefined;
|
|
439
|
+
nextSteps?: string[] | undefined;
|
|
440
|
+
customSections?: {
|
|
441
|
+
body: string | string[][];
|
|
442
|
+
title?: string | undefined;
|
|
443
|
+
}[] | undefined;
|
|
444
|
+
details?: unknown;
|
|
445
|
+
tryMessage?: string | undefined;
|
|
446
|
+
} | {
|
|
447
|
+
type: "bug";
|
|
448
|
+
message: string;
|
|
449
|
+
code?: string | undefined;
|
|
450
|
+
stack?: string | undefined;
|
|
451
|
+
nextSteps?: string[] | undefined;
|
|
452
|
+
customSections?: {
|
|
453
|
+
body: string | string[][];
|
|
454
|
+
title?: string | undefined;
|
|
455
|
+
}[] | undefined;
|
|
456
|
+
details?: unknown;
|
|
457
|
+
tryMessage?: string | undefined;
|
|
458
|
+
} | {
|
|
459
|
+
type: "external";
|
|
460
|
+
message: string;
|
|
461
|
+
command: string;
|
|
462
|
+
args: string[];
|
|
463
|
+
code?: string | undefined;
|
|
464
|
+
nextSteps?: string[] | undefined;
|
|
465
|
+
customSections?: {
|
|
466
|
+
body: string | string[][];
|
|
467
|
+
title?: string | undefined;
|
|
468
|
+
}[] | undefined;
|
|
469
|
+
details?: unknown;
|
|
470
|
+
tryMessage?: string | undefined;
|
|
471
|
+
};
|
|
472
|
+
}>>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { defineJsonOutputSchema } from '../json-output-schema.js';
|
|
2
|
+
import { zod } from '../schema.js';
|
|
3
|
+
export const JsonErrorCustomSectionSchema = zod
|
|
4
|
+
.object({
|
|
5
|
+
title: zod.string().optional(),
|
|
6
|
+
body: zod.union([zod.string(), zod.array(zod.array(zod.string()))]),
|
|
7
|
+
})
|
|
8
|
+
.strict();
|
|
9
|
+
const commonJsonErrorShape = {
|
|
10
|
+
message: zod.string(),
|
|
11
|
+
code: zod.string().min(1).optional().describe('A stable error code, included only when known.'),
|
|
12
|
+
tryMessage: zod.string().optional(),
|
|
13
|
+
nextSteps: zod.array(zod.string()).optional(),
|
|
14
|
+
customSections: zod.array(JsonErrorCustomSectionSchema).optional(),
|
|
15
|
+
details: zod
|
|
16
|
+
.unknown()
|
|
17
|
+
.optional()
|
|
18
|
+
.describe('Selected domain details, preserving native API payloads such as GraphQL errors, extensions, and data.'),
|
|
19
|
+
};
|
|
20
|
+
export const JsonAbortErrorSchema = zod
|
|
21
|
+
.object({
|
|
22
|
+
type: zod.literal('abort'),
|
|
23
|
+
...commonJsonErrorShape,
|
|
24
|
+
})
|
|
25
|
+
.strict();
|
|
26
|
+
export const JsonBugErrorSchema = zod
|
|
27
|
+
.object({
|
|
28
|
+
type: zod.literal('bug'),
|
|
29
|
+
...commonJsonErrorShape,
|
|
30
|
+
stack: zod.string().optional(),
|
|
31
|
+
})
|
|
32
|
+
.strict();
|
|
33
|
+
export const JsonExternalErrorSchema = zod
|
|
34
|
+
.object({
|
|
35
|
+
type: zod.literal('external'),
|
|
36
|
+
...commonJsonErrorShape,
|
|
37
|
+
command: zod.string(),
|
|
38
|
+
args: zod.array(zod.string()),
|
|
39
|
+
})
|
|
40
|
+
.strict();
|
|
41
|
+
export const JsonErrorSchema = zod.union([JsonAbortErrorSchema, JsonBugErrorSchema, JsonExternalErrorSchema]);
|
|
42
|
+
const JsonErrorDocumentSchema = zod.object({ error: JsonErrorSchema }).strict();
|
|
43
|
+
export const jsonErrorOutputSchema = defineJsonOutputSchema({
|
|
44
|
+
name: 'JsonErrorDocument',
|
|
45
|
+
schema: JsonErrorDocumentSchema,
|
|
46
|
+
definitions: {
|
|
47
|
+
JsonError: JsonErrorSchema,
|
|
48
|
+
JsonErrorCustomSection: JsonErrorCustomSectionSchema,
|
|
49
|
+
JsonAbortError: JsonAbortErrorSchema,
|
|
50
|
+
JsonBugError: JsonBugErrorSchema,
|
|
51
|
+
JsonExternalError: JsonExternalErrorSchema,
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/public/node/error/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,sBAAsB,EAAC,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAC,GAAG,EAAC,MAAM,cAAc,CAAA;AAEhC,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG;KAC5C,MAAM,CAAC;IACN,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;CACpE,CAAC;KACD,MAAM,EAAE,CAAA;AAEX,MAAM,oBAAoB,GAAG;IAC3B,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE;IACrB,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gDAAgD,CAAC;IAC/F,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,SAAS,EAAE,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC7C,cAAc,EAAE,GAAG,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC,QAAQ,EAAE;IAClE,OAAO,EAAE,GAAG;SACT,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,QAAQ,CAAC,uGAAuG,CAAC;CACrH,CAAA;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG;KACpC,MAAM,CAAC;IACN,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC;IAC1B,GAAG,oBAAoB;CACxB,CAAC;KACD,MAAM,EAAE,CAAA;AAEX,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG;KAClC,MAAM,CAAC;IACN,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC;IACxB,GAAG,oBAAoB;IACvB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC;KACD,MAAM,EAAE,CAAA;AAEX,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG;KACvC,MAAM,CAAC;IACN,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC;IAC7B,GAAG,oBAAoB;IACvB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE;IACrB,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC;CAC9B,CAAC;KACD,MAAM,EAAE,CAAA;AAEX,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,oBAAoB,EAAE,kBAAkB,EAAE,uBAAuB,CAAC,CAAC,CAAA;AAE7G,MAAM,uBAAuB,GAAG,GAAG,CAAC,MAAM,CAAC,EAAC,KAAK,EAAE,eAAe,EAAC,CAAC,CAAC,MAAM,EAAE,CAAA;AAE7E,MAAM,CAAC,MAAM,qBAAqB,GAAG,sBAAsB,CAAC;IAC1D,IAAI,EAAE,mBAAmB;IACzB,MAAM,EAAE,uBAAuB;IAC/B,WAAW,EAAE;QACX,SAAS,EAAE,eAAe;QAC1B,sBAAsB,EAAE,4BAA4B;QACpD,cAAc,EAAE,oBAAoB;QACpC,YAAY,EAAE,kBAAkB;QAChC,iBAAiB,EAAE,uBAAuB;KAC3C;CACF,CAAC,CAAA","sourcesContent":["import {defineJsonOutputSchema} from '../json-output-schema.js'\nimport {zod} from '../schema.js'\n\nexport const JsonErrorCustomSectionSchema = zod\n .object({\n title: zod.string().optional(),\n body: zod.union([zod.string(), zod.array(zod.array(zod.string()))]),\n })\n .strict()\n\nconst commonJsonErrorShape = {\n message: zod.string(),\n code: zod.string().min(1).optional().describe('A stable error code, included only when known.'),\n tryMessage: zod.string().optional(),\n nextSteps: zod.array(zod.string()).optional(),\n customSections: zod.array(JsonErrorCustomSectionSchema).optional(),\n details: zod\n .unknown()\n .optional()\n .describe('Selected domain details, preserving native API payloads such as GraphQL errors, extensions, and data.'),\n}\n\nexport const JsonAbortErrorSchema = zod\n .object({\n type: zod.literal('abort'),\n ...commonJsonErrorShape,\n })\n .strict()\n\nexport const JsonBugErrorSchema = zod\n .object({\n type: zod.literal('bug'),\n ...commonJsonErrorShape,\n stack: zod.string().optional(),\n })\n .strict()\n\nexport const JsonExternalErrorSchema = zod\n .object({\n type: zod.literal('external'),\n ...commonJsonErrorShape,\n command: zod.string(),\n args: zod.array(zod.string()),\n })\n .strict()\n\nexport const JsonErrorSchema = zod.union([JsonAbortErrorSchema, JsonBugErrorSchema, JsonExternalErrorSchema])\n\nconst JsonErrorDocumentSchema = zod.object({error: JsonErrorSchema}).strict()\n\nexport const jsonErrorOutputSchema = defineJsonOutputSchema({\n name: 'JsonErrorDocument',\n schema: JsonErrorDocumentSchema,\n definitions: {\n JsonError: JsonErrorSchema,\n JsonErrorCustomSection: JsonErrorCustomSectionSchema,\n JsonAbortError: JsonAbortErrorSchema,\n JsonBugError: JsonBugErrorSchema,\n JsonExternalError: JsonExternalErrorSchema,\n },\n})\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { JsonAbortErrorSchema, JsonBugErrorSchema, JsonErrorCustomSectionSchema, JsonErrorSchema, JsonExternalErrorSchema, jsonErrorOutputSchema } from './schema.js';
|
|
2
|
+
import type { z } from 'zod';
|
|
3
|
+
export type JsonErrorCustomSection = z.infer<typeof JsonErrorCustomSectionSchema>;
|
|
4
|
+
export type JsonAbortError = z.infer<typeof JsonAbortErrorSchema>;
|
|
5
|
+
export type JsonBugError = z.infer<typeof JsonBugErrorSchema>;
|
|
6
|
+
export type JsonExternalError = z.infer<typeof JsonExternalErrorSchema>;
|
|
7
|
+
export type JsonError = z.infer<typeof JsonErrorSchema>;
|
|
8
|
+
export type JsonErrorType = JsonError['type'];
|
|
9
|
+
export type JsonErrorDocument = z.infer<typeof jsonErrorOutputSchema.schema>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/public/node/error/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n JsonAbortErrorSchema,\n JsonBugErrorSchema,\n JsonErrorCustomSectionSchema,\n JsonErrorSchema,\n JsonExternalErrorSchema,\n jsonErrorOutputSchema,\n} from './schema.js'\nimport type {z} from 'zod'\n\nexport type JsonErrorCustomSection = z.infer<typeof JsonErrorCustomSectionSchema>\nexport type JsonAbortError = z.infer<typeof JsonAbortErrorSchema>\nexport type JsonBugError = z.infer<typeof JsonBugErrorSchema>\nexport type JsonExternalError = z.infer<typeof JsonExternalErrorSchema>\nexport type JsonError = z.infer<typeof JsonErrorSchema>\nexport type JsonErrorType = JsonError['type']\nexport type JsonErrorDocument = z.infer<typeof jsonErrorOutputSchema.schema>\n"]}
|
|
@@ -1,87 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { type InlineToken, type TokenItem } from '../../private/node/ui/components/token-item.js';
|
|
3
|
-
import type { AlertCustomSection } from './ui.js';
|
|
4
|
-
export declare enum FatalErrorType {
|
|
5
|
-
Abort = 0,
|
|
6
|
-
AbortSilent = 1,
|
|
7
|
-
Bug = 2
|
|
8
|
-
}
|
|
9
|
-
export declare class CancelExecution extends Error {
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* A fatal error represents an error shouldn't be rescued and that causes the execution to terminate.
|
|
13
|
-
* There shouldn't be code that catches fatal errors.
|
|
14
|
-
*/
|
|
15
|
-
export declare abstract class FatalError extends Error {
|
|
16
|
-
tryMessage: TokenItem | null;
|
|
17
|
-
type: FatalErrorType;
|
|
18
|
-
nextSteps?: TokenItem<InlineToken>[];
|
|
19
|
-
formattedMessage?: TokenItem;
|
|
20
|
-
customSections?: AlertCustomSection[];
|
|
21
|
-
skipOclifErrorHandling: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Creates a new FatalError error.
|
|
24
|
-
*
|
|
25
|
-
* @param message - The error message.
|
|
26
|
-
* @param type - The type of fatal error.
|
|
27
|
-
* @param tryMessage - The message that recommends next steps to the user.
|
|
28
|
-
* You can pass a string a {@link TokenizedString} or a {@link TokenItem}
|
|
29
|
-
* if you need to style the message inside the error Banner component.
|
|
30
|
-
* @param nextSteps - Message to show as "next steps" with suggestions to solve the issue.
|
|
31
|
-
* @param customSections - Custom sections to show in the error banner. To be used if nextSteps is not enough.
|
|
32
|
-
*/
|
|
33
|
-
constructor(message: TokenItem | OutputMessage, type: FatalErrorType, tryMessage?: TokenItem | OutputMessage | null, nextSteps?: TokenItem<InlineToken>[], customSections?: AlertCustomSection[]);
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* An abort error is a fatal error that shouldn't be reported as a bug.
|
|
37
|
-
* Those usually represent unexpected scenarios that we can't handle and that usually require some action from the developer.
|
|
38
|
-
*/
|
|
39
|
-
export declare class AbortError extends FatalError {
|
|
40
|
-
constructor(message: TokenItem | OutputMessage, tryMessage?: TokenItem | OutputMessage | null, nextSteps?: TokenItem<InlineToken>[], customSections?: AlertCustomSection[]);
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* An external error is similar to Abort but has extra command and args attributes.
|
|
44
|
-
* This is useful to represent errors coming from external commands, usually executed by execa.
|
|
45
|
-
*/
|
|
46
|
-
export declare class ExternalError extends FatalError {
|
|
47
|
-
command: string;
|
|
48
|
-
args: string[];
|
|
49
|
-
constructor(message: OutputMessage, command: string, args: string[], tryMessage?: TokenItem | OutputMessage | null);
|
|
50
|
-
}
|
|
51
|
-
export declare class AbortSilentError extends FatalError {
|
|
52
|
-
constructor();
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* A bug error is an error that represents a bug and therefore should be reported.
|
|
56
|
-
*/
|
|
57
|
-
export declare class BugError extends FatalError {
|
|
58
|
-
constructor(message: TokenItem | OutputMessage, tryMessage?: TokenItem | OutputMessage | null);
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* A function that handles errors that blow up in the CLI.
|
|
62
|
-
*
|
|
63
|
-
* @param error - Error to be handled.
|
|
64
|
-
* @returns A promise that resolves with the error passed.
|
|
65
|
-
*/
|
|
66
|
-
export declare function handler(error: unknown): Promise<unknown>;
|
|
67
|
-
/**
|
|
68
|
-
* A function that maps an error to an Abort with the stack trace when coming from the CLI.
|
|
69
|
-
*
|
|
70
|
-
* @param error - Error to be mapped.
|
|
71
|
-
* @returns A promise that resolves with the new error object.
|
|
72
|
-
*/
|
|
73
|
-
export declare function errorMapper(error: unknown): Promise<unknown>;
|
|
74
|
-
/**
|
|
75
|
-
* A function that checks if an error should be reported as unexpected.
|
|
76
|
-
*
|
|
77
|
-
* @param error - Error to be checked.
|
|
78
|
-
* @returns A boolean indicating if the error should be reported as unexpected.
|
|
79
|
-
*/
|
|
80
|
-
export declare function shouldReportErrorAsUnexpected(error: unknown): boolean;
|
|
81
|
-
/**
|
|
82
|
-
* Stack traces usually have file:// - we strip that and also remove the Windows drive designation.
|
|
83
|
-
*
|
|
84
|
-
* @param filePath - Path to be cleaned.
|
|
85
|
-
* @returns The cleaned path.
|
|
86
|
-
*/
|
|
87
|
-
export declare function cleanSingleStackTracePath(filePath: string): string;
|
|
1
|
+
export * from './error/index.js';
|