@shopify/cli-kit 3.0.10 → 3.0.11

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/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Listr, ListrTaskWrapper, ListrDefaultRenderer, ListrTask } from 'listr2';
2
2
  import { AbortSignal, AbortController } from 'abort-controller';
3
- import * as execa from 'execa';
4
3
  import { Writable } from 'node:stream';
4
+ import * as execa from 'execa';
5
5
  import { camelCase, paramCase, snakeCase, constantCase } from 'change-case';
6
6
  import * as pathe from 'pathe';
7
7
  import { findUp } from 'find-up';
@@ -69,6 +69,272 @@ declare namespace ui {
69
69
  };
70
70
  }
71
71
 
72
+ declare const dependencyManager: readonly ["yarn", "npm", "pnpm"];
73
+ declare type DependencyManager = typeof dependencyManager[number];
74
+ declare const PackageJsonNotFoundError: (directory: string) => Abort;
75
+ /**
76
+ * Returns the dependency manager used to run the create workflow.
77
+ * @param env {Object} The environment variables of the process in which the CLI runs.
78
+ * @returns The dependency manager
79
+ */
80
+ declare function dependencyManagerUsedForCreating(env?: NodeJS.ProcessEnv): DependencyManager;
81
+ interface InstallNPMDependenciesRecursivelyOptions {
82
+ /**
83
+ * The dependency manager to use to install the dependencies.
84
+ */
85
+ dependencyManager: DependencyManager;
86
+ /**
87
+ * The directory from where we'll find package.json's recursively
88
+ */
89
+ directory: string;
90
+ /**
91
+ * Specifies the maximum depth of the glob search.
92
+ */
93
+ deep?: number;
94
+ }
95
+ /**
96
+ * This function traverses down a directory tree to find directories containing a package.json
97
+ * and installs the dependencies if needed. To know if it's needed, it uses the "check" command
98
+ * provided by dependency managers.
99
+ * @param options {InstallNPMDependenciesRecursivelyOptions} Options to install dependencies recursively.
100
+ */
101
+ declare function installNPMDependenciesRecursively(options: InstallNPMDependenciesRecursivelyOptions): Promise<void>;
102
+ /**
103
+ * Installs the dependencies in the given directory.
104
+ * @param directory {string} The directory that contains the package.json
105
+ * @param dependencyManager {DependencyManager} The dependency manager to use to install the dependencies.
106
+ * @param stdout {Writable} Standard output stream.
107
+ * @param stderr {Writable} Standard error stream.
108
+ * @param signal {AbortSignal} Abort signal.
109
+ * @returns stderr {Writable} Standard error stream.
110
+ */
111
+ declare function install(directory: string, dependencyManager: DependencyManager, stdout?: Writable, stderr?: Writable, signal?: AbortSignal): Promise<void>;
112
+ /**
113
+ * Returns the name of the package configured in its package.json
114
+ * @param packageJsonPath {string} Path to the package.json file
115
+ * @returns A promise that resolves with the name.
116
+ */
117
+ declare function getPackageName(packageJsonPath: string): Promise<string>;
118
+ /**
119
+ * Returns the list of production and dev dependencies of a package.json
120
+ * @param packageJsonPath {string} Path to the package.json file
121
+ * @returns A promise that resolves with the list of dependencies.
122
+ */
123
+ declare function getDependencies(packageJsonPath: string): Promise<{
124
+ [key: string]: string;
125
+ }>;
126
+ declare type DependencyType = 'dev' | 'prod' | 'peer';
127
+ interface AddNPMDependenciesIfNeededOptions {
128
+ /** How dependencies should be added */
129
+ type: DependencyType;
130
+ /** The dependency manager to use to add dependencies */
131
+ dependencyManager: DependencyManager;
132
+ /** The directory that contains the package.json where dependencies will be added */
133
+ directory: string;
134
+ /** Standard output coming from the underlying installation process */
135
+ stdout?: Writable;
136
+ /** Standard error coming from the underlying installation process */
137
+ stderr?: Writable;
138
+ /** Abort signal to stop the process */
139
+ signal?: AbortSignal;
140
+ }
141
+ /**
142
+ * Adds dependencies to a Node project (i.e. a project that has a package.json)
143
+ * @param dependencies {string[]} List of dependencies to be added.
144
+ * @param options {AddNPMDependenciesIfNeededOptions} Options for adding dependencies.
145
+ */
146
+ declare function addNPMDependenciesIfNeeded(dependencies: string[], options: AddNPMDependenciesIfNeededOptions): Promise<void>;
147
+
148
+ declare const dependency_dependencyManager: typeof dependencyManager;
149
+ type dependency_DependencyManager = DependencyManager;
150
+ declare const dependency_PackageJsonNotFoundError: typeof PackageJsonNotFoundError;
151
+ declare const dependency_dependencyManagerUsedForCreating: typeof dependencyManagerUsedForCreating;
152
+ declare const dependency_installNPMDependenciesRecursively: typeof installNPMDependenciesRecursively;
153
+ declare const dependency_install: typeof install;
154
+ declare const dependency_getPackageName: typeof getPackageName;
155
+ declare const dependency_getDependencies: typeof getDependencies;
156
+ declare const dependency_addNPMDependenciesIfNeeded: typeof addNPMDependenciesIfNeeded;
157
+ declare namespace dependency {
158
+ export {
159
+ dependency_dependencyManager as dependencyManager,
160
+ dependency_DependencyManager as DependencyManager,
161
+ dependency_PackageJsonNotFoundError as PackageJsonNotFoundError,
162
+ dependency_dependencyManagerUsedForCreating as dependencyManagerUsedForCreating,
163
+ dependency_installNPMDependenciesRecursively as installNPMDependenciesRecursively,
164
+ dependency_install as install,
165
+ dependency_getPackageName as getPackageName,
166
+ dependency_getDependencies as getDependencies,
167
+ dependency_addNPMDependenciesIfNeeded as addNPMDependenciesIfNeeded,
168
+ };
169
+ }
170
+
171
+ declare enum ContentTokenType {
172
+ Command = 0,
173
+ Json = 1,
174
+ Path = 2,
175
+ Link = 3,
176
+ Heading = 4,
177
+ SubHeading = 5,
178
+ Italic = 6,
179
+ ErrorText = 7,
180
+ Yellow = 8,
181
+ Cyan = 9,
182
+ Magenta = 10,
183
+ Green = 11
184
+ }
185
+ interface ContentMetadata {
186
+ link?: string;
187
+ }
188
+ declare class ContentToken {
189
+ type: ContentTokenType;
190
+ value: string;
191
+ metadata: ContentMetadata;
192
+ constructor(value: string, metadata: ContentMetadata | undefined, type: ContentTokenType);
193
+ }
194
+ declare const token: {
195
+ genericShellCommand: (value: string) => ContentToken;
196
+ json: (value: any) => ContentToken;
197
+ path: (value: string) => ContentToken;
198
+ link: (value: string, link: string) => ContentToken;
199
+ heading: (value: string) => ContentToken;
200
+ subheading: (value: string) => ContentToken;
201
+ italic: (value: string) => ContentToken;
202
+ errorText: (value: string) => ContentToken;
203
+ cyan: (value: string) => ContentToken;
204
+ yellow: (value: string) => ContentToken;
205
+ magenta: (value: string) => ContentToken;
206
+ green: (value: string) => ContentToken;
207
+ packagejsonScript: (dependencyManager: DependencyManager, scriptName: string, ...scriptArgs: string[]) => ContentToken;
208
+ successIcon: () => ContentToken;
209
+ failIcon: () => ContentToken;
210
+ };
211
+ declare class TokenizedString {
212
+ value: string;
213
+ constructor(value: string);
214
+ }
215
+ declare type Message = string | TokenizedString;
216
+ declare function content(strings: TemplateStringsArray, ...keys: (ContentToken | string)[]): TokenizedString;
217
+ /** Log levels */
218
+ declare type LogLevel = 'fatal' | 'error' | 'warn' | 'info' | 'debug' | 'trace' | 'silent';
219
+ /**
220
+ *
221
+ * @returns {LogLevel} It returns the log level set by the user.
222
+ */
223
+ declare const currentLogLevel: () => LogLevel;
224
+ declare const shouldOutput: (logLevel: LogLevel) => boolean;
225
+ /**
226
+ * Ouputs information to the user. This is akin to "console.log"
227
+ * Info messages don't get additional formatting.
228
+ * Note: Info messages are sent through the standard output.
229
+ * @param content {string} The content to be output to the user.
230
+ */
231
+ declare const info: (content: Message) => void;
232
+ /**
233
+ * Outputs a success message to the user.
234
+ * Success message receive a special formatting to make them stand out in the console.
235
+ * Note: Success messages are sent through the standard output.
236
+ * @param content {string} The content to be output to the user.
237
+ */
238
+ declare const success: (content: Message) => void;
239
+ /**
240
+ * Outputs a completed message to the user.
241
+ * Completed message receive a special formatting to make them stand out in the console.
242
+ * Note: Completed messages are sent through the standard output.
243
+ * @param content {string} The content to be output to the user.
244
+ */
245
+ declare const completed: (content: Message) => void;
246
+ /**
247
+ * Ouputs debug information to the user. By default these output is hidden unless the user calls the CLI with --verbose.
248
+ * Debug messages don't get additional formatting.
249
+ * Note: Debug messages are sent through the standard output.
250
+ * @param content {string} The content to be output to the user.
251
+ */
252
+ declare const debug: (content: Message) => void;
253
+ /**
254
+ * Outputs a warning message to the user.
255
+ * Warning messages receive a special formatting to make them stand out in the console.
256
+ * Note: Warning messages are sent through the standard output.
257
+ * @param content {string} The content to be output to the user.
258
+ */
259
+ declare const warn: (content: Message) => void;
260
+ /**
261
+ * Prints a new line in the terminal.
262
+ */
263
+ declare const newline: () => void;
264
+ /**
265
+ * Formats and outputs a fatal error.
266
+ * Note: This API is not intended to be used internally. If you want to
267
+ * abort the execution due to an error, raise a fatal error and let the
268
+ * error handler handle and format it.
269
+ * @param content {Fatal} The fatal error to be output.
270
+ */
271
+ declare const error$1: (content: Fatal) => Promise<void>;
272
+ declare function stringifyMessage(message: Message): string;
273
+ interface OutputProcess {
274
+ /** The prefix to include in the logs
275
+ * [vite] Output coming from Vite
276
+ */
277
+ prefix: string;
278
+ /**
279
+ * A callback to invoke the process. stdout and stderr should be used
280
+ * to send standard output and error data that gets formatted with the
281
+ * right prefix.
282
+ */
283
+ action: (stdout: Writable, stderr: Writable, signal: AbortSignal) => Promise<void>;
284
+ }
285
+ /**
286
+ * Use this function when you have multiple concurrent processes that send data events
287
+ * and we need to output them ensuring that they can visually differenciated by the user.
288
+ *
289
+ * @param processes {OutputProcess[]} A list of processes to run concurrently.
290
+ */
291
+ declare function concurrent(processes: OutputProcess[]): Promise<void>;
292
+ declare function unstyled(message: string): string;
293
+ declare function shouldDisplayColors(): boolean;
294
+
295
+ declare const output_token: typeof token;
296
+ type output_TokenizedString = TokenizedString;
297
+ declare const output_TokenizedString: typeof TokenizedString;
298
+ type output_Message = Message;
299
+ declare const output_content: typeof content;
300
+ type output_LogLevel = LogLevel;
301
+ declare const output_currentLogLevel: typeof currentLogLevel;
302
+ declare const output_shouldOutput: typeof shouldOutput;
303
+ declare const output_info: typeof info;
304
+ declare const output_success: typeof success;
305
+ declare const output_completed: typeof completed;
306
+ declare const output_debug: typeof debug;
307
+ declare const output_warn: typeof warn;
308
+ declare const output_newline: typeof newline;
309
+ declare const output_stringifyMessage: typeof stringifyMessage;
310
+ type output_OutputProcess = OutputProcess;
311
+ declare const output_concurrent: typeof concurrent;
312
+ declare const output_unstyled: typeof unstyled;
313
+ declare const output_shouldDisplayColors: typeof shouldDisplayColors;
314
+ declare namespace output {
315
+ export {
316
+ output_token as token,
317
+ output_TokenizedString as TokenizedString,
318
+ output_Message as Message,
319
+ output_content as content,
320
+ output_LogLevel as LogLevel,
321
+ output_currentLogLevel as currentLogLevel,
322
+ output_shouldOutput as shouldOutput,
323
+ output_info as info,
324
+ output_success as success,
325
+ output_completed as completed,
326
+ output_debug as debug,
327
+ output_warn as warn,
328
+ output_newline as newline,
329
+ error$1 as error,
330
+ output_stringifyMessage as stringifyMessage,
331
+ output_OutputProcess as OutputProcess,
332
+ output_concurrent as concurrent,
333
+ output_unstyled as unstyled,
334
+ output_shouldDisplayColors as shouldDisplayColors,
335
+ };
336
+ }
337
+
72
338
  declare enum FatalErrorType {
73
339
  Abort = 0,
74
340
  AbortSilent = 1,
@@ -81,14 +347,14 @@ declare enum FatalErrorType {
81
347
  declare abstract class Fatal extends Error {
82
348
  tryMessage: string | null;
83
349
  type: FatalErrorType;
84
- constructor(message: string, type: FatalErrorType, tryMessage?: string | null);
350
+ constructor(message: Message, type: FatalErrorType, tryMessage?: string | null);
85
351
  }
86
352
  /**
87
353
  * An abort error is a fatal error that shouldn't be reported as a bug.
88
354
  * Those usually represent unexpected scenarios that we can't handle and that usually require some action from the developer
89
355
  */
90
356
  declare class Abort extends Fatal {
91
- constructor(message: string, tryMessage?: string | null);
357
+ constructor(message: Message, tryMessage?: string | null);
92
358
  }
93
359
  declare class AbortSilent extends Fatal {
94
360
  constructor();
@@ -97,7 +363,7 @@ declare class AbortSilent extends Fatal {
97
363
  * A bug error is an error that represents a bug and therefore should be reported.
98
364
  */
99
365
  declare class Bug extends Fatal {
100
- constructor(message: string, tryMessage?: string | null);
366
+ constructor(message: Message, tryMessage?: string | null);
101
367
  }
102
368
  /**
103
369
  * A function that handles errors that blow up in the CLI.
@@ -109,30 +375,30 @@ declare function mapper(error: Error): Promise<Error>;
109
375
  declare function isFatal(error: Error): boolean;
110
376
  declare function shouldReport(error: Error): boolean;
111
377
 
112
- type error$1_Fatal = Fatal;
113
- declare const error$1_Fatal: typeof Fatal;
114
- type error$1_Abort = Abort;
115
- declare const error$1_Abort: typeof Abort;
116
- type error$1_AbortSilent = AbortSilent;
117
- declare const error$1_AbortSilent: typeof AbortSilent;
118
- type error$1_Bug = Bug;
119
- declare const error$1_Bug: typeof Bug;
120
- declare const error$1_handler: typeof handler;
121
- declare const error$1_mapper: typeof mapper;
122
- declare const error$1_isFatal: typeof isFatal;
123
- declare const error$1_shouldReport: typeof shouldReport;
124
- declare const error$1_AbortSignal: typeof AbortSignal;
125
- declare namespace error$1 {
378
+ type error_Fatal = Fatal;
379
+ declare const error_Fatal: typeof Fatal;
380
+ type error_Abort = Abort;
381
+ declare const error_Abort: typeof Abort;
382
+ type error_AbortSilent = AbortSilent;
383
+ declare const error_AbortSilent: typeof AbortSilent;
384
+ type error_Bug = Bug;
385
+ declare const error_Bug: typeof Bug;
386
+ declare const error_handler: typeof handler;
387
+ declare const error_mapper: typeof mapper;
388
+ declare const error_isFatal: typeof isFatal;
389
+ declare const error_shouldReport: typeof shouldReport;
390
+ declare const error_AbortSignal: typeof AbortSignal;
391
+ declare namespace error {
126
392
  export {
127
- error$1_Fatal as Fatal,
128
- error$1_Abort as Abort,
129
- error$1_AbortSilent as AbortSilent,
130
- error$1_Bug as Bug,
131
- error$1_handler as handler,
132
- error$1_mapper as mapper,
133
- error$1_isFatal as isFatal,
134
- error$1_shouldReport as shouldReport,
135
- error$1_AbortSignal as AbortSignal,
393
+ error_Fatal as Fatal,
394
+ error_Abort as Abort,
395
+ error_AbortSilent as AbortSilent,
396
+ error_Bug as Bug,
397
+ error_handler as handler,
398
+ error_mapper as mapper,
399
+ error_isFatal as isFatal,
400
+ error_shouldReport as shouldReport,
401
+ error_AbortSignal as AbortSignal,
136
402
  };
137
403
  }
138
404
 
@@ -403,277 +669,6 @@ declare namespace github {
403
669
  };
404
670
  }
405
671
 
406
- declare const dependencyManager: readonly ["yarn", "npm", "pnpm"];
407
- declare type DependencyManager = typeof dependencyManager[number];
408
- declare const PackageJsonNotFoundError: (directory: string) => Abort;
409
- /**
410
- * Returns the dependency manager used to run the create workflow.
411
- * @param env {Object} The environment variables of the process in which the CLI runs.
412
- * @returns The dependency manager
413
- */
414
- declare function dependencyManagerUsedForCreating(env?: NodeJS.ProcessEnv): DependencyManager;
415
- interface InstallNPMDependenciesRecursivelyOptions {
416
- /**
417
- * The dependency manager to use to install the dependencies.
418
- */
419
- dependencyManager: DependencyManager;
420
- /**
421
- * The directory from where we'll find package.json's recursively
422
- */
423
- directory: string;
424
- /**
425
- * Specifies the maximum depth of the glob search.
426
- */
427
- deep?: number;
428
- }
429
- /**
430
- * This function traverses down a directory tree to find directories containing a package.json
431
- * and installs the dependencies if needed. To know if it's needed, it uses the "check" command
432
- * provided by dependency managers.
433
- * @param options {InstallNPMDependenciesRecursivelyOptions} Options to install dependencies recursively.
434
- */
435
- declare function installNPMDependenciesRecursively(options: InstallNPMDependenciesRecursivelyOptions): Promise<void>;
436
- /**
437
- * Installs the dependencies in the given directory.
438
- * @param directory {string} The directory that contains the package.json
439
- * @param dependencyManager {DependencyManager} The dependency manager to use to install the dependencies.
440
- * @param stdout {Writable} Standard output stream.
441
- * @param stderr {Writable} Standard error stream.
442
- * @param signal {AbortSignal} Abort signal.
443
- * @returns stderr {Writable} Standard error stream.
444
- */
445
- declare function install(directory: string, dependencyManager: DependencyManager, stdout?: Writable, stderr?: Writable, signal?: AbortSignal): Promise<void>;
446
- /**
447
- * Returns the name of the package configured in its package.json
448
- * @param packageJsonPath {string} Path to the package.json file
449
- * @returns A promise that resolves with the name.
450
- */
451
- declare function getPackageName(packageJsonPath: string): Promise<string>;
452
- /**
453
- * Returns the list of production and dev dependencies of a package.json
454
- * @param packageJsonPath {string} Path to the package.json file
455
- * @returns A promise that resolves with the list of dependencies.
456
- */
457
- declare function getDependencies(packageJsonPath: string): Promise<{
458
- [key: string]: string;
459
- }>;
460
- declare type DependencyType = 'dev' | 'prod' | 'peer';
461
- interface AddNPMDependenciesIfNeededOptions {
462
- /** How dependencies should be added */
463
- type: DependencyType;
464
- /** The dependency manager to use to add dependencies */
465
- dependencyManager: DependencyManager;
466
- /** The directory that contains the package.json where dependencies will be added */
467
- directory: string;
468
- /** Standard output coming from the underlying installation process */
469
- stdout?: Writable;
470
- /** Standard error coming from the underlying installation process */
471
- stderr?: Writable;
472
- /** Abort signal to stop the process */
473
- signal?: AbortSignal;
474
- }
475
- /**
476
- * Adds dependencies to a Node project (i.e. a project that has a package.json)
477
- * @param dependencies {string[]} List of dependencies to be added.
478
- * @param options {AddNPMDependenciesIfNeededOptions} Options for adding dependencies.
479
- */
480
- declare function addNPMDependenciesIfNeeded(dependencies: string[], options: AddNPMDependenciesIfNeededOptions): Promise<void>;
481
-
482
- declare const dependency_dependencyManager: typeof dependencyManager;
483
- type dependency_DependencyManager = DependencyManager;
484
- declare const dependency_PackageJsonNotFoundError: typeof PackageJsonNotFoundError;
485
- declare const dependency_dependencyManagerUsedForCreating: typeof dependencyManagerUsedForCreating;
486
- declare const dependency_installNPMDependenciesRecursively: typeof installNPMDependenciesRecursively;
487
- declare const dependency_install: typeof install;
488
- declare const dependency_getPackageName: typeof getPackageName;
489
- declare const dependency_getDependencies: typeof getDependencies;
490
- declare const dependency_addNPMDependenciesIfNeeded: typeof addNPMDependenciesIfNeeded;
491
- declare namespace dependency {
492
- export {
493
- dependency_dependencyManager as dependencyManager,
494
- dependency_DependencyManager as DependencyManager,
495
- dependency_PackageJsonNotFoundError as PackageJsonNotFoundError,
496
- dependency_dependencyManagerUsedForCreating as dependencyManagerUsedForCreating,
497
- dependency_installNPMDependenciesRecursively as installNPMDependenciesRecursively,
498
- dependency_install as install,
499
- dependency_getPackageName as getPackageName,
500
- dependency_getDependencies as getDependencies,
501
- dependency_addNPMDependenciesIfNeeded as addNPMDependenciesIfNeeded,
502
- };
503
- }
504
-
505
- declare enum ContentTokenType {
506
- Command = 0,
507
- Path = 1,
508
- Link = 2,
509
- Heading = 3,
510
- SubHeading = 4,
511
- Italic = 5,
512
- ErrorText = 6,
513
- Yellow = 7,
514
- Cyan = 8,
515
- Magenta = 9,
516
- Green = 10
517
- }
518
- interface ContentMetadata {
519
- link?: string;
520
- }
521
- declare class ContentToken {
522
- type: ContentTokenType;
523
- value: string;
524
- metadata: ContentMetadata;
525
- constructor(value: string, metadata: ContentMetadata | undefined, type: ContentTokenType);
526
- }
527
- declare const token: {
528
- genericShellCommand: (value: string) => ContentToken;
529
- path: (value: string) => ContentToken;
530
- link: (value: string, link: string) => ContentToken;
531
- heading: (value: string) => ContentToken;
532
- subheading: (value: string) => ContentToken;
533
- italic: (value: string) => ContentToken;
534
- errorText: (value: string) => ContentToken;
535
- cyan: (value: string) => ContentToken;
536
- yellow: (value: string) => ContentToken;
537
- magenta: (value: string) => ContentToken;
538
- green: (value: string) => ContentToken;
539
- command: (dependencyManager: DependencyManager, scriptName: string, ...scriptArgs: string[]) => ContentToken;
540
- };
541
- declare class TokenizedString {
542
- value: string;
543
- constructor(value: string);
544
- }
545
- declare type Message = string | TokenizedString;
546
- declare function content(strings: TemplateStringsArray, ...keys: (ContentToken | string)[]): TokenizedString;
547
- /** Log levels */
548
- declare type LogLevel = 'fatal' | 'error' | 'warn' | 'info' | 'debug' | 'trace' | 'silent';
549
- /**
550
- *
551
- * @returns {LogLevel} It returns the log level set by the user.
552
- */
553
- declare const currentLogLevel: () => LogLevel;
554
- declare const shouldOutput: (logLevel: LogLevel) => boolean;
555
- /**
556
- * Ouputs information to the user. This is akin to "console.log"
557
- * Info messages don't get additional formatting.
558
- * Note: Info messages are sent through the standard output.
559
- * @param content {string} The content to be output to the user.
560
- */
561
- declare const info: (content: Message) => void;
562
- /**
563
- * Outputs a success message to the user.
564
- * Success message receive a special formatting to make them stand out in the console.
565
- * Note: Success messages are sent through the standard output.
566
- * @param content {string} The content to be output to the user.
567
- */
568
- declare const success: (content: Message) => void;
569
- /**
570
- * Outputs a completed message to the user.
571
- * Completed message receive a special formatting to make them stand out in the console.
572
- * Note: Completed messages are sent through the standard output.
573
- * @param content {string} The content to be output to the user.
574
- */
575
- declare const completed: (content: Message) => void;
576
- /**
577
- * Ouputs debug information to the user. By default these output is hidden unless the user calls the CLI with --verbose.
578
- * Debug messages don't get additional formatting.
579
- * Note: Debug messages are sent through the standard output.
580
- * @param content {string} The content to be output to the user.
581
- */
582
- declare const debug: (content: Message) => void;
583
- /**
584
- * Outputs a warning message to the user.
585
- * Warning messages receive a special formatting to make them stand out in the console.
586
- * Note: Warning messages are sent through the standard output.
587
- * @param content {string} The content to be output to the user.
588
- */
589
- declare const warn: (content: Message) => void;
590
- /**
591
- * Prints a new line in the terminal.
592
- */
593
- declare const newline: () => void;
594
- /**
595
- * Turns the given object into a colorized JSON.
596
- * @param json {any} Object to turn into a JSON and colorize
597
- * @returns {string} Colorized JSON representation of the given object.
598
- */
599
- declare const colorJson: (json: any) => string;
600
- /**
601
- * Formats and outputs a fatal error.
602
- * Note: This API is not intended to be used internally. If you want to
603
- * abort the execution due to an error, raise a fatal error and let the
604
- * error handler handle and format it.
605
- * @param content {Fatal} The fatal error to be output.
606
- */
607
- declare const error: (content: Fatal) => Promise<void>;
608
- declare function stringifyMessage(message: Message): string;
609
- interface OutputProcess {
610
- /** The prefix to include in the logs
611
- * [vite] Output coming from Vite
612
- */
613
- prefix: string;
614
- /**
615
- * A callback to invoke the process. stdout and stderr should be used
616
- * to send standard output and error data that gets formatted with the
617
- * right prefix.
618
- */
619
- action: (stdout: Writable, stderr: Writable, signal: AbortSignal) => Promise<void>;
620
- }
621
- /**
622
- * Use this function when you have multiple concurrent processes that send data events
623
- * and we need to output them ensuring that they can visually differenciated by the user.
624
- *
625
- * @param processes {OutputProcess[]} A list of processes to run concurrently.
626
- */
627
- declare function concurrent(processes: OutputProcess[]): Promise<void>;
628
- declare function unstyled(message: string): string;
629
- declare function shouldDisplayColors(): boolean;
630
-
631
- declare const output_token: typeof token;
632
- type output_TokenizedString = TokenizedString;
633
- declare const output_TokenizedString: typeof TokenizedString;
634
- type output_Message = Message;
635
- declare const output_content: typeof content;
636
- type output_LogLevel = LogLevel;
637
- declare const output_currentLogLevel: typeof currentLogLevel;
638
- declare const output_shouldOutput: typeof shouldOutput;
639
- declare const output_info: typeof info;
640
- declare const output_success: typeof success;
641
- declare const output_completed: typeof completed;
642
- declare const output_debug: typeof debug;
643
- declare const output_warn: typeof warn;
644
- declare const output_newline: typeof newline;
645
- declare const output_colorJson: typeof colorJson;
646
- declare const output_error: typeof error;
647
- declare const output_stringifyMessage: typeof stringifyMessage;
648
- type output_OutputProcess = OutputProcess;
649
- declare const output_concurrent: typeof concurrent;
650
- declare const output_unstyled: typeof unstyled;
651
- declare const output_shouldDisplayColors: typeof shouldDisplayColors;
652
- declare namespace output {
653
- export {
654
- output_token as token,
655
- output_TokenizedString as TokenizedString,
656
- output_Message as Message,
657
- output_content as content,
658
- output_LogLevel as LogLevel,
659
- output_currentLogLevel as currentLogLevel,
660
- output_shouldOutput as shouldOutput,
661
- output_info as info,
662
- output_success as success,
663
- output_completed as completed,
664
- output_debug as debug,
665
- output_warn as warn,
666
- output_newline as newline,
667
- output_colorJson as colorJson,
668
- output_error as error,
669
- output_stringifyMessage as stringifyMessage,
670
- output_OutputProcess as OutputProcess,
671
- output_concurrent as concurrent,
672
- output_unstyled as unstyled,
673
- output_shouldDisplayColors as shouldDisplayColors,
674
- };
675
- }
676
-
677
672
  /**
678
673
  * Returns the latest available version of an NPM package.
679
674
  * @param name {string} The name of the NPM package.
@@ -1189,15 +1184,16 @@ interface GenerateSignedUploadUrlSchema {
1189
1184
  }
1190
1185
 
1191
1186
  declare const CreateDeployment: string;
1187
+ interface ExtensionSettings {
1188
+ uuid: string;
1189
+ config: string;
1190
+ context: string;
1191
+ }
1192
1192
  interface CreateDeploymentVariables {
1193
1193
  apiKey: string;
1194
1194
  uuid: string;
1195
1195
  bundleUrl: string;
1196
- extensions: {
1197
- uuid: string;
1198
- config: string;
1199
- context: string;
1200
- }[];
1196
+ extensions: ExtensionSettings[];
1201
1197
  }
1202
1198
  interface CreateDeploymentSchema {
1203
1199
  deploymentCreate: {
@@ -1418,6 +1414,7 @@ declare const index_GenerateSignedUploadUrl: typeof GenerateSignedUploadUrl;
1418
1414
  type index_GenerateSignedUploadUrlVariables = GenerateSignedUploadUrlVariables;
1419
1415
  type index_GenerateSignedUploadUrlSchema = GenerateSignedUploadUrlSchema;
1420
1416
  declare const index_CreateDeployment: typeof CreateDeployment;
1417
+ type index_ExtensionSettings = ExtensionSettings;
1421
1418
  type index_CreateDeploymentVariables = CreateDeploymentVariables;
1422
1419
  type index_CreateDeploymentSchema = CreateDeploymentSchema;
1423
1420
  declare const index_AllStoresByOrganizationQuery: typeof AllStoresByOrganizationQuery;
@@ -1466,6 +1463,7 @@ declare namespace index {
1466
1463
  index_GenerateSignedUploadUrlVariables as GenerateSignedUploadUrlVariables,
1467
1464
  index_GenerateSignedUploadUrlSchema as GenerateSignedUploadUrlSchema,
1468
1465
  index_CreateDeployment as CreateDeployment,
1466
+ index_ExtensionSettings as ExtensionSettings,
1469
1467
  index_CreateDeploymentVariables as CreateDeploymentVariables,
1470
1468
  index_CreateDeploymentSchema as CreateDeploymentSchema,
1471
1469
  index_AllStoresByOrganizationQuery as AllStoresByOrganizationQuery,
@@ -1801,5 +1799,5 @@ declare namespace plugins {
1801
1799
  };
1802
1800
  }
1803
1801
 
1804
- export { abort, api, archiver, checksum, cli, constants, dependency, dotEnv as dotenv, environment, error$1 as error, file, git, github, http, id, npm, os, output, path, plugins, port, ruby, schema, semver, session, store, string, system, template, temporary, toml, ui, version, yaml };
1802
+ export { abort, api, archiver, checksum, cli, constants, dependency, dotEnv as dotenv, environment, error, file, git, github, http, id, npm, os, output, path, plugins, port, ruby, schema, semver, session, store, string, system, template, temporary, toml, ui, version, yaml };
1805
1803
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { H as abort, n as api, r as archiver, w as checksum, C as cli, I as constants, d as dependency, G as dotenv, i as environment, e as error, f as file, g as git, c as github, q as http, D as id, A as npm, h as os, o as output, p as path, J as plugins, B as port, x as ruby, k as schema, z as semver, j as session, m as store, b as string, s as system, t as template, E as temporary, l as toml, u as ui, v as version, y as yaml } from './index-84d3a745.js';
1
+ export { H as abort, n as api, r as archiver, w as checksum, C as cli, I as constants, d as dependency, G as dotenv, i as environment, e as error, f as file, g as git, c as github, q as http, D as id, A as npm, h as os, o as output, p as path, J as plugins, B as port, x as ruby, k as schema, z as semver, j as session, m as store, b as string, s as system, t as template, E as temporary, l as toml, u as ui, v as version, y as yaml } from './index-ddf77494.js';
2
2
  import 'assert';
3
3
  import 'events';
4
4
  import 'readline';