@shopify/cli 3.46.0-pre.2 → 3.46.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/assets/demo-catalog.json +637 -0
- package/dist/cli/commands/debug/command-flags.d.ts +9 -0
- package/dist/cli/commands/debug/command-flags.js +77 -0
- package/dist/cli/commands/debug/command-flags.js.map +1 -0
- package/dist/cli/commands/demo/catalog.d.ts +6 -0
- package/dist/cli/commands/demo/catalog.js +31 -0
- package/dist/cli/commands/demo/catalog.js.map +1 -0
- package/dist/cli/commands/demo/generate-file.d.ts +11 -0
- package/dist/cli/commands/demo/generate-file.js +86 -0
- package/dist/cli/commands/demo/generate-file.js.map +1 -0
- package/dist/cli/commands/demo/index.d.ts +9 -0
- package/dist/cli/commands/demo/index.js +27 -0
- package/dist/cli/commands/demo/index.js.map +1 -0
- package/dist/cli/commands/demo/print-ai-prompt.d.ts +6 -0
- package/dist/cli/commands/demo/print-ai-prompt.js +38 -0
- package/dist/cli/commands/demo/print-ai-prompt.js.map +1 -0
- package/dist/cli/services/demo.d.ts +25552 -0
- package/dist/cli/services/demo.js +326 -0
- package/dist/cli/services/demo.js.map +1 -0
- package/dist/cli/services/kitchen-sink/prompts.js +1 -1
- package/dist/cli/services/kitchen-sink/prompts.js.map +1 -1
- package/dist/cli/services/kitchen-sink/static.js +6 -2
- package/dist/cli/services/kitchen-sink/static.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/oclif.manifest.json +95 -1
- package/package.json +11 -9
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
import { AbortError, BugError } from '@shopify/cli-kit/node/error';
|
|
2
|
+
import { outputInfo } from '@shopify/cli-kit/node/output';
|
|
3
|
+
import { sleep } from '@shopify/cli-kit/node/system';
|
|
4
|
+
import { renderFatalError, renderInfo, renderSuccess, renderTable, renderConcurrent, renderTasks, renderWarning, renderAutocompletePrompt, renderConfirmationPrompt, renderSelectPrompt, renderTextPrompt, } from '@shopify/cli-kit/node/ui';
|
|
5
|
+
import { zod } from '@shopify/cli-kit/node/schema';
|
|
6
|
+
function oneOrMore(singular) {
|
|
7
|
+
return zod.union([singular, zod.array(singular)]);
|
|
8
|
+
}
|
|
9
|
+
const scalar = zod.union([zod.string(), zod.number(), zod.boolean(), zod.null(), zod.undefined()]);
|
|
10
|
+
const linkSchema = zod.object({ label: zod.string(), url: zod.string() });
|
|
11
|
+
const inlineTokenSchema = zod.union([
|
|
12
|
+
zod.string(),
|
|
13
|
+
zod.object({ command: zod.string() }),
|
|
14
|
+
zod.object({ link: linkSchema }),
|
|
15
|
+
zod.object({ char: zod.string().length(1) }),
|
|
16
|
+
zod.object({ userInput: zod.string() }),
|
|
17
|
+
zod.object({ subdued: zod.string() }),
|
|
18
|
+
zod.object({ filePath: zod.string() }),
|
|
19
|
+
zod.object({ bold: zod.string() }),
|
|
20
|
+
]);
|
|
21
|
+
const headlineTokenSchema = oneOrMore(zod.union([
|
|
22
|
+
zod.string(),
|
|
23
|
+
zod.object({ command: zod.string() }),
|
|
24
|
+
zod.object({ char: zod.string().length(1) }),
|
|
25
|
+
zod.object({ userInput: zod.string() }),
|
|
26
|
+
zod.object({ subdued: zod.string() }),
|
|
27
|
+
zod.object({ filePath: zod.string() }),
|
|
28
|
+
]));
|
|
29
|
+
// type InlineToken = zod.infer<typeof inlineTokenSchema>
|
|
30
|
+
const inlineTokenItemSchema = oneOrMore(inlineTokenSchema);
|
|
31
|
+
// type InlineTokenItem = zod.infer<typeof inlineTokenItemSchema>
|
|
32
|
+
const listSchema = zod.object({
|
|
33
|
+
list: zod.object({
|
|
34
|
+
title: zod.string().optional(),
|
|
35
|
+
items: zod.array(inlineTokenItemSchema),
|
|
36
|
+
ordered: zod.boolean().optional(),
|
|
37
|
+
}),
|
|
38
|
+
});
|
|
39
|
+
const tokenItemSchema = oneOrMore(zod.union([inlineTokenSchema, listSchema]));
|
|
40
|
+
const tableSchema = zod.object({
|
|
41
|
+
rows: zod.array(zod.object({}).catchall(scalar)),
|
|
42
|
+
columns: zod.object({}).catchall(zod.object({
|
|
43
|
+
header: zod.string().optional(),
|
|
44
|
+
color: zod.string().optional(),
|
|
45
|
+
})),
|
|
46
|
+
});
|
|
47
|
+
const infoTableSchema = zod.union([
|
|
48
|
+
zod.object({}).catchall(zod.array(inlineTokenItemSchema)),
|
|
49
|
+
zod.array(zod.object({
|
|
50
|
+
color: zod.string().optional(),
|
|
51
|
+
header: zod.string(),
|
|
52
|
+
helperText: zod.string().optional(),
|
|
53
|
+
items: zod.array(inlineTokenItemSchema),
|
|
54
|
+
})),
|
|
55
|
+
]);
|
|
56
|
+
const abstractDemoStepSchema = zod.object({
|
|
57
|
+
type: zod.string(),
|
|
58
|
+
properties: zod.object({}),
|
|
59
|
+
// optional properties for documentation purposes
|
|
60
|
+
title: zod.string().optional(),
|
|
61
|
+
description: zod.string().optional(),
|
|
62
|
+
});
|
|
63
|
+
const outputStepSchema = abstractDemoStepSchema.extend({
|
|
64
|
+
type: zod.literal('output'),
|
|
65
|
+
properties: zod.object({
|
|
66
|
+
content: zod.string(),
|
|
67
|
+
}),
|
|
68
|
+
});
|
|
69
|
+
const renderStepPropertiesSchema = zod.object({
|
|
70
|
+
headline: headlineTokenSchema.optional(),
|
|
71
|
+
body: tokenItemSchema.optional(),
|
|
72
|
+
nextSteps: zod.array(inlineTokenItemSchema).optional(),
|
|
73
|
+
reference: zod.array(inlineTokenItemSchema).optional(),
|
|
74
|
+
link: linkSchema.optional(),
|
|
75
|
+
customSections: zod
|
|
76
|
+
.array(zod.object({
|
|
77
|
+
title: zod.string().optional(),
|
|
78
|
+
body: tokenItemSchema,
|
|
79
|
+
}))
|
|
80
|
+
.optional(),
|
|
81
|
+
orderedNextSteps: zod.boolean().optional(),
|
|
82
|
+
});
|
|
83
|
+
const renderInfoStepSchema = abstractDemoStepSchema.extend({
|
|
84
|
+
type: zod.literal('info'),
|
|
85
|
+
properties: renderStepPropertiesSchema,
|
|
86
|
+
});
|
|
87
|
+
const renderSuccessStepSchema = abstractDemoStepSchema.extend({
|
|
88
|
+
type: zod.literal('success'),
|
|
89
|
+
properties: renderStepPropertiesSchema,
|
|
90
|
+
});
|
|
91
|
+
const renderWarningStepSchema = abstractDemoStepSchema.extend({
|
|
92
|
+
type: zod.literal('warning'),
|
|
93
|
+
properties: renderStepPropertiesSchema,
|
|
94
|
+
});
|
|
95
|
+
const renderFatalErrorStepSchema = abstractDemoStepSchema.extend({
|
|
96
|
+
type: zod.literal('fatalError'),
|
|
97
|
+
properties: zod.object({
|
|
98
|
+
errorType: zod.union([zod.literal('abort'), zod.literal('bug')]),
|
|
99
|
+
message: zod.string(),
|
|
100
|
+
tryMessage: zod.string().optional(),
|
|
101
|
+
nextSteps: zod.array(inlineTokenItemSchema).optional(),
|
|
102
|
+
}),
|
|
103
|
+
});
|
|
104
|
+
const renderTableStepSchema = abstractDemoStepSchema.extend({
|
|
105
|
+
type: zod.literal('table'),
|
|
106
|
+
properties: tableSchema,
|
|
107
|
+
});
|
|
108
|
+
const renderAutoCompletePromptStepSchema = abstractDemoStepSchema.extend({
|
|
109
|
+
type: zod.literal('autocompletePrompt'),
|
|
110
|
+
properties: zod.object({
|
|
111
|
+
message: zod.string(),
|
|
112
|
+
choices: zod.array(zod.object({
|
|
113
|
+
label: zod.string(),
|
|
114
|
+
value: zod.string(),
|
|
115
|
+
})),
|
|
116
|
+
}),
|
|
117
|
+
});
|
|
118
|
+
const renderConfirmationPromptStepSchema = abstractDemoStepSchema.extend({
|
|
119
|
+
type: zod.literal('confirmationPrompt'),
|
|
120
|
+
properties: zod.object({
|
|
121
|
+
message: zod.string(),
|
|
122
|
+
infoTable: infoTableSchema.optional(),
|
|
123
|
+
defaultValue: zod.boolean().optional(),
|
|
124
|
+
confirmationMessage: zod.string(),
|
|
125
|
+
cancellationMessage: zod.string(),
|
|
126
|
+
}),
|
|
127
|
+
});
|
|
128
|
+
const renderSelectPromptStepSchema = abstractDemoStepSchema.extend({
|
|
129
|
+
type: zod.literal('selectPrompt'),
|
|
130
|
+
properties: zod.object({
|
|
131
|
+
message: zod.string(),
|
|
132
|
+
choices: zod.array(zod.object({
|
|
133
|
+
label: zod.string(),
|
|
134
|
+
value: zod.string(),
|
|
135
|
+
key: zod.string().length(1).optional(),
|
|
136
|
+
group: zod.string().optional(),
|
|
137
|
+
})),
|
|
138
|
+
defaultValue: zod.string().optional(),
|
|
139
|
+
infoTable: infoTableSchema.optional(),
|
|
140
|
+
}),
|
|
141
|
+
});
|
|
142
|
+
const renderTextPromptStepSchema = abstractDemoStepSchema.extend({
|
|
143
|
+
type: zod.literal('textPrompt'),
|
|
144
|
+
properties: zod.object({
|
|
145
|
+
message: zod.string(),
|
|
146
|
+
defaultValue: zod.string().optional(),
|
|
147
|
+
password: zod.boolean().optional(),
|
|
148
|
+
allowEmpty: zod.boolean().optional(),
|
|
149
|
+
}),
|
|
150
|
+
});
|
|
151
|
+
const sleepStepSchema = abstractDemoStepSchema.extend({
|
|
152
|
+
type: zod.literal('sleep'),
|
|
153
|
+
properties: zod.object({
|
|
154
|
+
duration: zod.number(),
|
|
155
|
+
}),
|
|
156
|
+
});
|
|
157
|
+
const taskbarStepSchema = abstractDemoStepSchema.extend({
|
|
158
|
+
type: zod.literal('taskbar'),
|
|
159
|
+
properties: zod.object({
|
|
160
|
+
steps: zod.array(zod.object({
|
|
161
|
+
title: zod.string(),
|
|
162
|
+
duration: zod.number(),
|
|
163
|
+
})),
|
|
164
|
+
}),
|
|
165
|
+
});
|
|
166
|
+
const renderConcurrentPropertiesSchema = zod.object({
|
|
167
|
+
processes: zod.array(zod.object({
|
|
168
|
+
prefix: zod.string(),
|
|
169
|
+
steps: zod.array(zod.object({
|
|
170
|
+
startMessage: zod.string().optional(),
|
|
171
|
+
duration: zod.number(),
|
|
172
|
+
endMessage: zod.string().optional(),
|
|
173
|
+
})),
|
|
174
|
+
})),
|
|
175
|
+
footer: zod
|
|
176
|
+
.object({
|
|
177
|
+
shortcuts: zod.array(zod.object({
|
|
178
|
+
key: zod.string(),
|
|
179
|
+
action: zod.string(),
|
|
180
|
+
})),
|
|
181
|
+
subTitle: zod.string().optional(),
|
|
182
|
+
})
|
|
183
|
+
.optional(),
|
|
184
|
+
});
|
|
185
|
+
const renderConcurrentStepSchema = abstractDemoStepSchema.extend({
|
|
186
|
+
type: zod.literal('concurrent'),
|
|
187
|
+
properties: renderConcurrentPropertiesSchema,
|
|
188
|
+
});
|
|
189
|
+
const demoStepSchema = zod.discriminatedUnion('type', [
|
|
190
|
+
outputStepSchema,
|
|
191
|
+
renderInfoStepSchema,
|
|
192
|
+
renderSuccessStepSchema,
|
|
193
|
+
renderWarningStepSchema,
|
|
194
|
+
renderTableStepSchema,
|
|
195
|
+
renderFatalErrorStepSchema,
|
|
196
|
+
renderAutoCompletePromptStepSchema,
|
|
197
|
+
renderConfirmationPromptStepSchema,
|
|
198
|
+
renderSelectPromptStepSchema,
|
|
199
|
+
renderTextPromptStepSchema,
|
|
200
|
+
sleepStepSchema,
|
|
201
|
+
taskbarStepSchema,
|
|
202
|
+
renderConcurrentStepSchema,
|
|
203
|
+
]);
|
|
204
|
+
export const demoStepsSchema = zod.object({
|
|
205
|
+
$schema: zod.string().optional(),
|
|
206
|
+
command: zod.string().optional(),
|
|
207
|
+
steps: zod.array(demoStepSchema),
|
|
208
|
+
});
|
|
209
|
+
export async function demo(stepsJsonData) {
|
|
210
|
+
const { steps, command } = demoStepsSchema.parse(stepsJsonData);
|
|
211
|
+
const executors = steps.map(executorForStep);
|
|
212
|
+
await simulateTyping(command);
|
|
213
|
+
for (const executor of executors) {
|
|
214
|
+
// eslint-disable-next-line no-await-in-loop
|
|
215
|
+
await executor();
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
async function simulateTyping(text) {
|
|
219
|
+
if (!text)
|
|
220
|
+
return;
|
|
221
|
+
// eslint-disable-next-line no-console
|
|
222
|
+
console.clear();
|
|
223
|
+
process.stdout.write('$ ');
|
|
224
|
+
const chars = text.split('');
|
|
225
|
+
while (chars.length > 0) {
|
|
226
|
+
const char = chars.shift();
|
|
227
|
+
process.stdout.write(char);
|
|
228
|
+
// eslint-disable-next-line no-await-in-loop
|
|
229
|
+
await sleep(0.1 + Math.random() / 10);
|
|
230
|
+
}
|
|
231
|
+
process.stdout.write('\n');
|
|
232
|
+
await sleep(1 + Math.random() / 10);
|
|
233
|
+
}
|
|
234
|
+
function executorForStep(step) {
|
|
235
|
+
switch (step.type) {
|
|
236
|
+
case 'output':
|
|
237
|
+
return async () => {
|
|
238
|
+
outputInfo(step.properties.content);
|
|
239
|
+
};
|
|
240
|
+
case 'sleep':
|
|
241
|
+
return async () => {
|
|
242
|
+
await sleep(step.properties.duration);
|
|
243
|
+
};
|
|
244
|
+
case 'taskbar':
|
|
245
|
+
return taskbarExecutor(step.properties.steps);
|
|
246
|
+
case 'concurrent':
|
|
247
|
+
return concurrentExecutor(step.properties);
|
|
248
|
+
case 'info':
|
|
249
|
+
return async () => {
|
|
250
|
+
renderInfo(step.properties);
|
|
251
|
+
};
|
|
252
|
+
case 'success':
|
|
253
|
+
return async () => {
|
|
254
|
+
renderSuccess(step.properties);
|
|
255
|
+
};
|
|
256
|
+
case 'warning':
|
|
257
|
+
return async () => {
|
|
258
|
+
renderWarning(step.properties);
|
|
259
|
+
};
|
|
260
|
+
case 'fatalError':
|
|
261
|
+
return async () => {
|
|
262
|
+
const { errorType, message, nextSteps, tryMessage } = step.properties;
|
|
263
|
+
if (errorType === 'abort') {
|
|
264
|
+
renderFatalError(new AbortError(message, tryMessage, nextSteps));
|
|
265
|
+
}
|
|
266
|
+
else {
|
|
267
|
+
renderFatalError(new BugError(message, tryMessage));
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
case 'table':
|
|
271
|
+
return async () => {
|
|
272
|
+
renderTable(step.properties);
|
|
273
|
+
};
|
|
274
|
+
case 'autocompletePrompt':
|
|
275
|
+
return async () => {
|
|
276
|
+
await renderAutocompletePrompt(step.properties);
|
|
277
|
+
};
|
|
278
|
+
case 'confirmationPrompt':
|
|
279
|
+
return async () => {
|
|
280
|
+
await renderConfirmationPrompt(step.properties);
|
|
281
|
+
};
|
|
282
|
+
case 'selectPrompt':
|
|
283
|
+
return async () => {
|
|
284
|
+
await renderSelectPrompt(step.properties);
|
|
285
|
+
};
|
|
286
|
+
case 'textPrompt':
|
|
287
|
+
return async () => {
|
|
288
|
+
await renderTextPrompt(step.properties);
|
|
289
|
+
};
|
|
290
|
+
default:
|
|
291
|
+
throw new Error(`Unknown step type: ${step.type}`);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
function taskbarExecutor(steps) {
|
|
295
|
+
return async () => {
|
|
296
|
+
const tasks = steps.map(({ title, duration }) => {
|
|
297
|
+
return {
|
|
298
|
+
title,
|
|
299
|
+
task: async () => sleep(duration),
|
|
300
|
+
};
|
|
301
|
+
});
|
|
302
|
+
await renderTasks(tasks);
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
function concurrentExecutor({ processes, footer }) {
|
|
306
|
+
return async () => {
|
|
307
|
+
const concurrentProcesses = processes.map(({ prefix, steps }) => {
|
|
308
|
+
return {
|
|
309
|
+
prefix,
|
|
310
|
+
action: async (stdout) => {
|
|
311
|
+
for (const step of steps) {
|
|
312
|
+
const { startMessage, duration, endMessage } = step;
|
|
313
|
+
if (startMessage)
|
|
314
|
+
stdout.write(startMessage);
|
|
315
|
+
// eslint-disable-next-line no-await-in-loop
|
|
316
|
+
await sleep(duration);
|
|
317
|
+
if (endMessage)
|
|
318
|
+
stdout.write(endMessage);
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
};
|
|
322
|
+
});
|
|
323
|
+
await renderConcurrent({ processes: concurrentProcesses, footer });
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
//# sourceMappingURL=demo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"demo.js","sourceRoot":"","sources":["../../../src/cli/services/demo.ts"],"names":[],"mappings":"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CAAA;QACH,CAAC,CAAC,CAAA;QACF,MAAM,gBAAgB,CAAC,EAAC,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAC,CAAC,CAAA;IAClE,CAAC,CAAA;AACH,CAAC","sourcesContent":["import {AbortError, BugError} from '@shopify/cli-kit/node/error'\nimport {outputInfo} from '@shopify/cli-kit/node/output'\nimport {sleep} from '@shopify/cli-kit/node/system'\nimport {\n renderFatalError,\n renderInfo,\n renderSuccess,\n renderTable,\n renderConcurrent,\n renderTasks,\n renderWarning,\n renderAutocompletePrompt,\n renderConfirmationPrompt,\n renderSelectPrompt,\n renderTextPrompt,\n} from '@shopify/cli-kit/node/ui'\nimport {zod} from '@shopify/cli-kit/node/schema'\nimport {Writable} from 'stream'\n\nfunction oneOrMore<T>(singular: zod.ZodType<T>) {\n return zod.union([singular, zod.array(singular)])\n}\nconst scalar = zod.union([zod.string(), zod.number(), zod.boolean(), zod.null(), zod.undefined()])\nconst linkSchema = zod.object({label: zod.string(), url: zod.string()})\nconst inlineTokenSchema = zod.union([\n zod.string(),\n zod.object({command: zod.string()}),\n zod.object({link: linkSchema}),\n zod.object({char: zod.string().length(1)}),\n zod.object({userInput: zod.string()}),\n zod.object({subdued: zod.string()}),\n zod.object({filePath: zod.string()}),\n zod.object({bold: zod.string()}),\n])\nconst headlineTokenSchema = oneOrMore(\n zod.union([\n zod.string(),\n zod.object({command: zod.string()}),\n zod.object({char: zod.string().length(1)}),\n zod.object({userInput: zod.string()}),\n zod.object({subdued: zod.string()}),\n zod.object({filePath: zod.string()}),\n ]),\n)\n// type InlineToken = zod.infer<typeof inlineTokenSchema>\nconst inlineTokenItemSchema = oneOrMore(inlineTokenSchema)\n// type InlineTokenItem = zod.infer<typeof inlineTokenItemSchema>\nconst listSchema = zod.object({\n list: zod.object({\n title: zod.string().optional(),\n items: zod.array(inlineTokenItemSchema),\n ordered: zod.boolean().optional(),\n }),\n})\nconst tokenItemSchema = oneOrMore(zod.union([inlineTokenSchema, listSchema]))\n\nconst tableSchema = zod.object({\n rows: zod.array(zod.object({}).catchall(scalar)),\n columns: zod.object({}).catchall(\n zod.object({\n header: zod.string().optional(),\n color: zod.string().optional(),\n }),\n ),\n})\nconst infoTableSchema = zod.union([\n zod.object({}).catchall(zod.array(inlineTokenItemSchema)),\n zod.array(\n zod.object({\n color: zod.string().optional(),\n header: zod.string(),\n helperText: zod.string().optional(),\n items: zod.array(inlineTokenItemSchema),\n }),\n ),\n])\n\nconst abstractDemoStepSchema = zod.object({\n type: zod.string(),\n properties: zod.object({}),\n // optional properties for documentation purposes\n title: zod.string().optional(),\n description: zod.string().optional(),\n})\n\nconst outputStepSchema = abstractDemoStepSchema.extend({\n type: zod.literal('output'),\n properties: zod.object({\n content: zod.string(),\n }),\n})\ntype OutputStep = zod.infer<typeof outputStepSchema>\n\nconst renderStepPropertiesSchema = zod.object({\n headline: headlineTokenSchema.optional(),\n body: tokenItemSchema.optional(),\n nextSteps: zod.array(inlineTokenItemSchema).optional(),\n reference: zod.array(inlineTokenItemSchema).optional(),\n link: linkSchema.optional(),\n customSections: zod\n .array(\n zod.object({\n title: zod.string().optional(),\n body: tokenItemSchema,\n }),\n )\n .optional(),\n orderedNextSteps: zod.boolean().optional(),\n})\nconst renderInfoStepSchema = abstractDemoStepSchema.extend({\n type: zod.literal('info'),\n properties: renderStepPropertiesSchema,\n})\ntype RenderInfoStep = zod.infer<typeof renderInfoStepSchema>\nconst renderSuccessStepSchema = abstractDemoStepSchema.extend({\n type: zod.literal('success'),\n properties: renderStepPropertiesSchema,\n})\ntype RenderSuccessStep = zod.infer<typeof renderSuccessStepSchema>\nconst renderWarningStepSchema = abstractDemoStepSchema.extend({\n type: zod.literal('warning'),\n properties: renderStepPropertiesSchema,\n})\ntype RenderWarningStep = zod.infer<typeof renderWarningStepSchema>\n\nconst renderFatalErrorStepSchema = abstractDemoStepSchema.extend({\n type: zod.literal('fatalError'),\n properties: zod.object({\n errorType: zod.union([zod.literal('abort'), zod.literal('bug')]),\n message: zod.string(),\n tryMessage: zod.string().optional(),\n nextSteps: zod.array(inlineTokenItemSchema).optional(),\n }),\n})\ntype RenderFatalErrorStep = zod.infer<typeof renderFatalErrorStepSchema>\n\nconst renderTableStepSchema = abstractDemoStepSchema.extend({\n type: zod.literal('table'),\n properties: tableSchema,\n})\ntype RenderTableStep = zod.infer<typeof renderTableStepSchema>\n\nconst renderAutoCompletePromptStepSchema = abstractDemoStepSchema.extend({\n type: zod.literal('autocompletePrompt'),\n properties: zod.object({\n message: zod.string(),\n choices: zod.array(\n zod.object({\n label: zod.string(),\n value: zod.string(),\n }),\n ),\n }),\n})\ntype RenderAutocompletePromptStep = zod.infer<typeof renderAutoCompletePromptStepSchema>\n\nconst renderConfirmationPromptStepSchema = abstractDemoStepSchema.extend({\n type: zod.literal('confirmationPrompt'),\n properties: zod.object({\n message: zod.string(),\n infoTable: infoTableSchema.optional(),\n defaultValue: zod.boolean().optional(),\n confirmationMessage: zod.string(),\n cancellationMessage: zod.string(),\n }),\n})\ntype RenderConfirmationPromptStep = zod.infer<typeof renderConfirmationPromptStepSchema>\n\nconst renderSelectPromptStepSchema = abstractDemoStepSchema.extend({\n type: zod.literal('selectPrompt'),\n properties: zod.object({\n message: zod.string(),\n choices: zod.array(\n zod.object({\n label: zod.string(),\n value: zod.string(),\n key: zod.string().length(1).optional(),\n group: zod.string().optional(),\n }),\n ),\n defaultValue: zod.string().optional(),\n infoTable: infoTableSchema.optional(),\n }),\n})\ntype RenderSelectPromptStep = zod.infer<typeof renderSelectPromptStepSchema>\n\nconst renderTextPromptStepSchema = abstractDemoStepSchema.extend({\n type: zod.literal('textPrompt'),\n properties: zod.object({\n message: zod.string(),\n defaultValue: zod.string().optional(),\n password: zod.boolean().optional(),\n allowEmpty: zod.boolean().optional(),\n }),\n})\ntype RenderTextPromptStep = zod.infer<typeof renderTextPromptStepSchema>\n\nconst sleepStepSchema = abstractDemoStepSchema.extend({\n type: zod.literal('sleep'),\n properties: zod.object({\n duration: zod.number(),\n }),\n})\ntype SleepStep = zod.infer<typeof sleepStepSchema>\n\nconst taskbarStepSchema = abstractDemoStepSchema.extend({\n type: zod.literal('taskbar'),\n properties: zod.object({\n steps: zod.array(\n zod.object({\n title: zod.string(),\n duration: zod.number(),\n }),\n ),\n }),\n})\ntype TaskbarStep = zod.infer<typeof taskbarStepSchema>\n\nconst renderConcurrentPropertiesSchema = zod.object({\n processes: zod.array(\n zod.object({\n prefix: zod.string(),\n steps: zod.array(\n zod.object({\n startMessage: zod.string().optional(),\n duration: zod.number(),\n endMessage: zod.string().optional(),\n }),\n ),\n }),\n ),\n footer: zod\n .object({\n shortcuts: zod.array(\n zod.object({\n key: zod.string(),\n action: zod.string(),\n }),\n ),\n subTitle: zod.string().optional(),\n })\n .optional(),\n})\ntype RenderConcurrentProperties = zod.infer<typeof renderConcurrentPropertiesSchema>\nconst renderConcurrentStepSchema = abstractDemoStepSchema.extend({\n type: zod.literal('concurrent'),\n properties: renderConcurrentPropertiesSchema,\n})\ntype RenderConcurrentStep = zod.infer<typeof renderConcurrentStepSchema>\n\nexport type DemoStep =\n | OutputStep\n | RenderInfoStep\n | RenderSuccessStep\n | RenderWarningStep\n | RenderTableStep\n | RenderFatalErrorStep\n | RenderAutocompletePromptStep\n | RenderConfirmationPromptStep\n | RenderSelectPromptStep\n | RenderTextPromptStep\n | SleepStep\n | TaskbarStep\n | RenderConcurrentStep\n\nconst demoStepSchema = zod.discriminatedUnion('type', [\n outputStepSchema,\n renderInfoStepSchema,\n renderSuccessStepSchema,\n renderWarningStepSchema,\n renderTableStepSchema,\n renderFatalErrorStepSchema,\n renderAutoCompletePromptStepSchema,\n renderConfirmationPromptStepSchema,\n renderSelectPromptStepSchema,\n renderTextPromptStepSchema,\n sleepStepSchema,\n taskbarStepSchema,\n renderConcurrentStepSchema,\n])\nexport const demoStepsSchema = zod.object({\n $schema: zod.string().optional(),\n command: zod.string().optional(),\n steps: zod.array(demoStepSchema),\n})\ntype DemoSteps = zod.infer<typeof demoStepsSchema>\n\nexport async function demo(stepsJsonData: DemoSteps) {\n const {steps, command} = demoStepsSchema.parse(stepsJsonData)\n const executors = steps.map(executorForStep)\n\n await simulateTyping(command)\n for (const executor of executors) {\n // eslint-disable-next-line no-await-in-loop\n await executor()\n }\n}\n\nasync function simulateTyping(text?: string) {\n if (!text) return\n\n // eslint-disable-next-line no-console\n console.clear()\n process.stdout.write('$ ')\n const chars = text.split('')\n while (chars.length > 0) {\n const char = chars.shift()!\n process.stdout.write(char)\n // eslint-disable-next-line no-await-in-loop\n await sleep(0.1 + Math.random() / 10)\n }\n process.stdout.write('\\n')\n await sleep(1 + Math.random() / 10)\n}\n\nfunction executorForStep(step: DemoStep): () => Promise<void> {\n switch (step.type) {\n case 'output':\n return async () => {\n outputInfo(step.properties.content)\n }\n case 'sleep':\n return async () => {\n await sleep(step.properties.duration)\n }\n case 'taskbar':\n return taskbarExecutor(step.properties.steps)\n case 'concurrent':\n return concurrentExecutor(step.properties)\n case 'info':\n return async () => {\n renderInfo(step.properties)\n }\n case 'success':\n return async () => {\n renderSuccess(step.properties)\n }\n case 'warning':\n return async () => {\n renderWarning(step.properties)\n }\n case 'fatalError':\n return async () => {\n const {errorType, message, nextSteps, tryMessage} = step.properties\n if (errorType === 'abort') {\n renderFatalError(new AbortError(message, tryMessage, nextSteps))\n } else {\n renderFatalError(new BugError(message, tryMessage))\n }\n }\n case 'table':\n return async () => {\n renderTable(step.properties as Parameters<typeof renderTable>[0])\n }\n case 'autocompletePrompt':\n return async () => {\n await renderAutocompletePrompt(step.properties)\n }\n case 'confirmationPrompt':\n return async () => {\n await renderConfirmationPrompt(step.properties as Parameters<typeof renderConfirmationPrompt>[0])\n }\n case 'selectPrompt':\n return async () => {\n await renderSelectPrompt(step.properties as Parameters<typeof renderSelectPrompt>[0])\n }\n case 'textPrompt':\n return async () => {\n await renderTextPrompt(step.properties)\n }\n default:\n throw new Error(`Unknown step type: ${(step as DemoStep).type}`)\n }\n}\n\nfunction taskbarExecutor(steps: {title: string; duration: number}[]) {\n return async () => {\n const tasks = steps.map(({title, duration}) => {\n return {\n title,\n task: async () => sleep(duration),\n }\n })\n await renderTasks(tasks)\n }\n}\n\nfunction concurrentExecutor({processes, footer}: RenderConcurrentProperties) {\n return async () => {\n const concurrentProcesses = processes.map(({prefix, steps}) => {\n return {\n prefix,\n action: async (stdout: Writable) => {\n for (const step of steps) {\n const {startMessage, duration, endMessage} = step\n if (startMessage) stdout.write(startMessage)\n // eslint-disable-next-line no-await-in-loop\n await sleep(duration)\n if (endMessage) stdout.write(endMessage)\n }\n },\n }\n })\n await renderConcurrent({processes: concurrentProcesses, footer})\n }\n}\n"]}
|
|
@@ -80,7 +80,7 @@ export async function prompts() {
|
|
|
80
80
|
{ label: 'fiftieth', value: 'fiftieth' },
|
|
81
81
|
];
|
|
82
82
|
await renderAutocompletePrompt({
|
|
83
|
-
message: '
|
|
83
|
+
message: 'Template',
|
|
84
84
|
choices: database,
|
|
85
85
|
search(term) {
|
|
86
86
|
return Promise.resolve({ data: database.filter((item) => item.label.includes(term)) });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../../src/cli/services/kitchen-sink/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACxB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,0BAA0B,CAAA;AAEjC,MAAM,CAAC,KAAK,UAAU,OAAO;IAC3B,qBAAqB;IACrB,MAAM,kBAAkB,CAAC;QACvB,OAAO,EAAE,uDAAuD;QAChE,OAAO,EAAE;YACP,EAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAC;YAC1C,EAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAC;YAC5C,EAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAC;YAChC,EAAC,KAAK,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U,EAAC;KACvC,CAAA;IAED,MAAM,wBAAwB,CAAC;QAC7B,OAAO,EAAE,UAAU;QACnB,OAAO,EAAE,QAAQ;QACjB,MAAM,CAAC,IAAY;YACjB,OAAO,OAAO,CAAC,OAAO,CAAC,EAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAC,CAAC,CAAA;QACtF,CAAC;KACF,CAAC,CAAA;IAEF,MAAM,MAAM,GAAG;QACb;YACE,aAAa;YACb;gBACE,OAAO,EAAE,KAAK,CAAC,GAAG;aACnB;SACF;QACD;YACE,cAAc;YACd;gBACE,OAAO,EAAE,KAAK,CAAC,GAAG;aACnB;SACF;KACF,CAAA;IAED,2BAA2B;IAC3B,MAAM,OAAO,GAAG;QACd,OAAO,EAAE,wCAAwC;QACjD,SAAS,EAAE,EAAC,EAAE,EAAE,MAAM,EAAC;QACvB,mBAAmB,EAAE,eAAe;QACpC,mBAAmB,EAAE,QAAQ;KAC9B,CAAA;IAED,MAAM,wBAAwB,CAAC,OAAO,CAAC,CAAA;IAEvC,MAAM,sBAAsB,GAAG;QAC7B,OAAO,EAAE,6CAA6C;QACtD,SAAS,EAAE,EAAC,EAAE,EAAE,MAAM,EAAC;QACvB,mBAAmB,EAAE,kBAAkB;QACvC,mBAAmB,EAAE,QAAQ;QAC7B,YAAY,EAAE,KAAK;KACpB,CAAA;IAED,MAAM,wBAAwB,CAAC,sBAAsB,CAAC,CAAA;AACxD,CAAC","sourcesContent":["import {\n renderAutocompletePrompt,\n renderConfirmationPrompt,\n renderSelectPrompt,\n renderTextPrompt,\n} from '@shopify/cli-kit/node/ui'\n\nexport async function prompts() {\n // renderSelectPrompt\n await renderSelectPrompt({\n message: 'Associate your project with the org Castile Ventures?',\n choices: [\n {label: 'first', value: 'first', key: 'f'},\n {label: 'second', value: 'second', key: 's'},\n {label: 'third', value: 'third'},\n {label: 'fourth', value: 'fourth'},\n {label: 'fifth', value: 'fifth', group: 'Automations', key: 'a'},\n {label: 'sixth', value: 'sixth', group: 'Automations'},\n {label: 'seventh', value: 'seventh'},\n {label: 'eighth', value: 'eighth', group: 'Merchant Admin'},\n {label: 'ninth', value: 'ninth', group: 'Merchant Admin'},\n {label: 'tenth', value: 'tenth'},\n ],\n infoTable: {add: ['new-ext'], remove: ['integrated-demand-ext', 'order-discount']},\n })\n\n // renderTextPrompt\n await renderTextPrompt({\n message: 'App project name (can be changed later)',\n defaultValue: 'expansive commerce app',\n validate: (value) => {\n if (value.includes('shopify')) return 'Can\\'t include \"shopify\" in the name'\n },\n })\n\n // renderAutocompletePrompt\n const database = [\n {label: 'first', value: 'first'},\n {label: 'second', value: 'second'},\n {label: 'third', value: 'third'},\n {label: 'fourth', value: 'fourth'},\n {label: 'fifth', value: 'fifth'},\n {label: 'sixth', value: 'sixth'},\n {label: 'seventh', value: 'seventh'},\n {label: 'eighth', value: 'eighth'},\n {label: 'ninth', value: 'ninth'},\n {label: 'tenth', value: 'tenth'},\n {label: 'eleventh', value: 'eleventh'},\n {label: 'twelfth', value: 'twelfth'},\n {label: 'thirteenth', value: 'thirteenth'},\n {label: 'fourteenth', value: 'fourteenth'},\n {label: 'fifteenth', value: 'fifteenth'},\n {label: 'sixteenth', value: 'sixteenth'},\n {label: 'seventeenth', value: 'seventeenth'},\n {label: 'eighteenth', value: 'eighteenth'},\n {label: 'nineteenth', value: 'nineteenth'},\n {label: 'twentieth', value: 'twentieth'},\n {label: 'twenty-first', value: 'twenty-first'},\n {label: 'twenty-second', value: 'twenty-second'},\n {label: 'twenty-third', value: 'twenty-third'},\n {label: 'twenty-fourth', value: 'twenty-fourth'},\n {label: 'twenty-fifth', value: 'twenty-fifth'},\n {label: 'twenty-sixth', value: 'twenty-sixth'},\n {label: 'twenty-seventh', value: 'twenty-seventh'},\n {label: 'twenty-eighth', value: 'twenty-eighth'},\n {label: 'twenty-ninth', value: 'twenty-ninth'},\n {label: 'thirtieth', value: 'thirtieth'},\n {label: 'thirty-first', value: 'thirty-first'},\n {label: 'thirty-second', value: 'thirty-second'},\n {label: 'thirty-third', value: 'thirty-third'},\n {label: 'thirty-fourth', value: 'thirty-fourth'},\n {label: 'thirty-fifth', value: 'thirty-fifth'},\n {label: 'thirty-sixth', value: 'thirty-sixth'},\n {label: 'thirty-seventh', value: 'thirty-seventh'},\n {label: 'thirty-eighth', value: 'thirty-eighth'},\n {label: 'thirty-ninth', value: 'thirty-ninth'},\n {label: 'fortieth', value: 'fortieth'},\n {label: 'forty-first', value: 'forty-first'},\n {label: 'forty-second', value: 'forty-second'},\n {label: 'forty-third', value: 'forty-third'},\n {label: 'forty-fourth', value: 'forty-fourth'},\n {label: 'forty-fifth', value: 'forty-fifth'},\n {label: 'forty-sixth', value: 'forty-sixth'},\n {label: 'forty-seventh', value: 'forty-seventh'},\n {label: 'forty-eighth', value: 'forty-eighth'},\n {label: 'forty-ninth', value: 'forty-ninth'},\n {label: 'fiftieth', value: 'fiftieth'},\n ]\n\n await renderAutocompletePrompt({\n message: 'Template',\n choices: database,\n search(term: string) {\n return Promise.resolve({data: database.filter((item) => item.label.includes(term))})\n },\n })\n\n const themes = [\n [\n 'first theme',\n {\n subdued: `(#${1})`,\n },\n ],\n [\n 'second theme',\n {\n subdued: `(#${2})`,\n },\n ],\n ]\n\n // renderConfirmationPrompt\n const options = {\n message: `Add the following themes to the store?`,\n infoTable: {'': themes},\n confirmationMessage: 'Yes, add them',\n cancellationMessage: 'Cancel',\n }\n\n await renderConfirmationPrompt(options)\n\n const dangerousPromptOptions = {\n message: `Delete the following themes from the store?`,\n infoTable: {'': themes},\n confirmationMessage: 'Yes, delete them',\n cancellationMessage: 'Cancel',\n defaultValue: false,\n }\n\n await renderConfirmationPrompt(dangerousPromptOptions)\n}\n"]}
|
|
@@ -3,11 +3,15 @@ import { renderFatalError, renderInfo, renderSuccess, renderTable, renderWarning
|
|
|
3
3
|
export async function staticService() {
|
|
4
4
|
// Banners
|
|
5
5
|
renderInfo({
|
|
6
|
-
headline: 'CLI update available',
|
|
6
|
+
headline: 'CLI update available.',
|
|
7
7
|
body: ['Run', { command: 'npm run shopify upgrade' }, { char: '.' }],
|
|
8
8
|
});
|
|
9
9
|
renderInfo({
|
|
10
|
-
headline: [
|
|
10
|
+
headline: [
|
|
11
|
+
'To connect this project to your shopify store cd into:',
|
|
12
|
+
{ filePath: '/my-store/hydrogen.config.js' },
|
|
13
|
+
{ char: '.' },
|
|
14
|
+
],
|
|
11
15
|
body: [
|
|
12
16
|
'You can also try the following steps:',
|
|
13
17
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static.js","sourceRoot":"","sources":["../../../../src/cli/services/kitchen-sink/static.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAC,MAAM,6BAA6B,CAAA;AAChE,OAAO,EAAC,gBAAgB,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAA;AAEhH,MAAM,CAAC,KAAK,UAAU,aAAa;IACjC,UAAU;IACV,UAAU,CAAC;QACT,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"static.js","sourceRoot":"","sources":["../../../../src/cli/services/kitchen-sink/static.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAC,MAAM,6BAA6B,CAAA;AAChE,OAAO,EAAC,gBAAgB,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAA;AAEhH,MAAM,CAAC,KAAK,UAAU,aAAa;IACjC,UAAU;IACV,UAAU,CAAC;QACT,QAAQ,EAAE,uBAAuB;QACjC,IAAI,EAAE,CAAC,KAAK,EAAE,EAAC,OAAO,EAAE,yBAAyB,EAAC,EAAE,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC;KACjE,CAAC,CAAA;IAEF,UAAU,CAAC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aAAa;aACrB;YACD;gBACE,EAAE,EAAE,GAAG;gBACP,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,cAAc;aACtB;YACD;gBACE,EAAE,EAAE,GAAG;gBACP,IAAI,EAAE,YAAY;gBAClB,KAAK,EAAE,eAAe;aACvB;SACF;QACD,OAAO,EAAE;YACP,EAAE,EAAE;gBACF,MAAM,EAAE,IAAI;gBACZ,KAAK,EAAE,KAAK;aACb;YACD,IAAI,EAAE;gBACJ,MAAM,EAAE,MAAM;gBACd,KAAK,EAAE,KAAK;aACb;YACD,KAAK,EAAE,EAAE;SACV;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import {AbortError, BugError} from '@shopify/cli-kit/node/error'\nimport {renderFatalError, renderInfo, renderSuccess, renderTable, renderWarning} from '@shopify/cli-kit/node/ui'\n\nexport async function staticService() {\n // Banners\n renderInfo({\n headline: 'CLI update available.',\n body: ['Run', {command: 'npm run shopify upgrade'}, {char: '.'}],\n })\n\n renderInfo({\n headline: [\n 'To connect this project to your shopify store cd into:',\n {filePath: '/my-store/hydrogen.config.js'},\n {char: '.'},\n ],\n body: [\n 'You can also try the following steps:',\n {\n list: {\n items: [\n ['Run', {command: 'shopify project connect'}],\n ['Run', {command: 'hydrogen start'}],\n ],\n },\n },\n ],\n })\n\n renderInfo({\n headline: [{userInput: 'my-app'}, 'initialized and ready to build.'],\n nextSteps: [\n [\n 'Run',\n {\n command: 'cd verification-app',\n },\n ],\n [\n 'To preview your project, run',\n {\n command: 'npm app dev',\n },\n ],\n [\n 'To add extensions, run',\n {\n command: 'npm generate extension',\n },\n ],\n ],\n reference: [\n [\n 'Run',\n {\n command: 'npm shopify help',\n },\n ],\n {\n link: {\n label: 'Dev docs',\n url: 'https://shopify.dev',\n },\n },\n ],\n customSections: [\n {\n title: 'Custom section',\n body: {\n list: {\n items: [{link: {label: 'Item 1', url: 'https://shopify.com'}}, 'Item 2'],\n },\n },\n },\n {\n title: 'Custom section 2',\n body: {\n list: {\n items: ['Item 1', 'Item 2', 'Item 3'],\n },\n },\n },\n ],\n })\n\n renderSuccess({\n headline: 'CLI updated.',\n body: 'You are now running version 3.47.',\n })\n\n renderSuccess({\n headline: 'Deployment successful.',\n body: 'Your extensions have been uploaded to your Shopify Partners Dashboard.',\n nextSteps: [\n {\n link: {\n label: 'See your deployment and set it live',\n url: 'https://partners.shopify.com/1797046/apps/4523695/deployments',\n },\n },\n ],\n })\n\n renderWarning({\n headline: 'You have reached your limit of checkout extensions for this app.',\n body: 'You can free up space for a new one by deleting an existing one.',\n })\n\n renderWarning({\n headline: 'Required access scope update.',\n body: 'The deadline for re-selecting your app scopes is May 1, 2022.',\n reference: [\n {\n link: {\n label: 'Dev docs',\n url: 'https://shopify.dev/app/scopes',\n },\n },\n ],\n })\n\n // Stack trace\n const somethingWentWrong = new BugError('Something went wrong.')\n\n somethingWentWrong.stack = `\n Error: Unexpected error\n at Module._compile (internal/modules/cjs/loader.js:1137:30)\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)\n at Module.load (internal/modules/cjs/loader.js:985:32)\n at Function.Module._load (internal/modules/cjs/loader.js:878:14)\n`\n\n renderFatalError(somethingWentWrong)\n\n // Next Steps\n const nextSteps = [\n [\n 'Have you',\n {\n link: {\n label: 'created a Shopify Partners organization',\n url: 'https://partners.shopify.com/signup',\n },\n },\n {\n char: '?',\n },\n ],\n 'Have you confirmed your accounts from the emails you received?',\n [\n 'Need to connect to a different App or organization? Run the command again with',\n {\n command: '--reset',\n },\n ],\n ]\n\n renderFatalError(new AbortError('No Organization found', undefined, nextSteps))\n\n renderTable({\n rows: [\n {\n id: '1',\n name: 'John Doe',\n email: 'jon@doe.com',\n },\n {\n id: '2',\n name: 'Jane Doe',\n email: 'jane@doe.com',\n },\n {\n id: '3',\n name: 'John Smith',\n email: 'jon@smith.com',\n },\n ],\n columns: {\n id: {\n header: 'ID',\n color: 'red',\n },\n name: {\n header: 'Name',\n color: 'dim',\n },\n email: {},\n },\n })\n}\n"]}
|