@shopify/cli-kit 3.0.11 → 3.0.14

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,11 +1,11 @@
1
1
  import { Listr, ListrTaskWrapper, ListrDefaultRenderer, ListrTask } from 'listr2';
2
2
  import { AbortSignal, AbortController } from 'abort-controller';
3
3
  import { Writable } from 'node:stream';
4
- import * as execa from 'execa';
5
4
  import { camelCase, paramCase, snakeCase, constantCase } from 'change-case';
6
5
  import * as pathe from 'pathe';
7
6
  import { findUp } from 'find-up';
8
7
  import fastGlob from 'fast-glob';
8
+ import { pathToFileURL } from 'node:url';
9
9
  import * as simple_git from 'simple-git';
10
10
  import { platform } from 'node:process';
11
11
  import { z } from 'zod';
@@ -123,6 +123,8 @@ declare function getPackageName(packageJsonPath: string): Promise<string>;
123
123
  declare function getDependencies(packageJsonPath: string): Promise<{
124
124
  [key: string]: string;
125
125
  }>;
126
+ declare function checkForNewVersion(dependency: string, currentVersion: string): Promise<string | undefined>;
127
+ declare function getOutputUpdateCLIReminder(dependencyManager: DependencyManager, packages?: string[]): string;
126
128
  declare type DependencyType = 'dev' | 'prod' | 'peer';
127
129
  interface AddNPMDependenciesIfNeededOptions {
128
130
  /** How dependencies should be added */
@@ -153,6 +155,8 @@ declare const dependency_installNPMDependenciesRecursively: typeof installNPMDep
153
155
  declare const dependency_install: typeof install;
154
156
  declare const dependency_getPackageName: typeof getPackageName;
155
157
  declare const dependency_getDependencies: typeof getDependencies;
158
+ declare const dependency_checkForNewVersion: typeof checkForNewVersion;
159
+ declare const dependency_getOutputUpdateCLIReminder: typeof getOutputUpdateCLIReminder;
156
160
  declare const dependency_addNPMDependenciesIfNeeded: typeof addNPMDependenciesIfNeeded;
157
161
  declare namespace dependency {
158
162
  export {
@@ -164,46 +168,50 @@ declare namespace dependency {
164
168
  dependency_install as install,
165
169
  dependency_getPackageName as getPackageName,
166
170
  dependency_getDependencies as getDependencies,
171
+ dependency_checkForNewVersion as checkForNewVersion,
172
+ dependency_getOutputUpdateCLIReminder as getOutputUpdateCLIReminder,
167
173
  dependency_addNPMDependenciesIfNeeded as addNPMDependenciesIfNeeded,
168
174
  };
169
175
  }
170
176
 
171
177
  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
178
+ Raw = 0,
179
+ Command = 1,
180
+ Json = 2,
181
+ Path = 3,
182
+ Link = 4,
183
+ Heading = 5,
184
+ SubHeading = 6,
185
+ Italic = 7,
186
+ ErrorText = 8,
187
+ Yellow = 9,
188
+ Cyan = 10,
189
+ Magenta = 11,
190
+ Green = 12
184
191
  }
185
192
  interface ContentMetadata {
186
193
  link?: string;
187
194
  }
188
195
  declare class ContentToken {
189
196
  type: ContentTokenType;
190
- value: string;
197
+ value: Message;
191
198
  metadata: ContentMetadata;
192
- constructor(value: string, metadata: ContentMetadata | undefined, type: ContentTokenType);
199
+ constructor(value: Message, metadata: ContentMetadata | undefined, type: ContentTokenType);
193
200
  }
194
201
  declare const token: {
195
- genericShellCommand: (value: string) => ContentToken;
202
+ raw: (value: Message) => ContentToken;
203
+ genericShellCommand: (value: Message) => ContentToken;
196
204
  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;
205
+ path: (value: Message) => ContentToken;
206
+ link: (value: Message, link: string) => ContentToken;
207
+ heading: (value: Message) => ContentToken;
208
+ subheading: (value: Message) => ContentToken;
209
+ italic: (value: Message) => ContentToken;
210
+ errorText: (value: Message) => ContentToken;
211
+ cyan: (value: Message) => ContentToken;
212
+ yellow: (value: Message) => ContentToken;
213
+ magenta: (value: Message) => ContentToken;
214
+ green: (value: Message) => ContentToken;
207
215
  packagejsonScript: (dependencyManager: DependencyManager, scriptName: string, ...scriptArgs: string[]) => ContentToken;
208
216
  successIcon: () => ContentToken;
209
217
  failIcon: () => ContentToken;
@@ -288,7 +296,7 @@ interface OutputProcess {
288
296
  *
289
297
  * @param processes {OutputProcess[]} A list of processes to run concurrently.
290
298
  */
291
- declare function concurrent(processes: OutputProcess[]): Promise<void>;
299
+ declare function concurrent(processes: OutputProcess[], callback?: ((signal: AbortSignal) => void) | undefined): Promise<void>;
292
300
  declare function unstyled(message: string): string;
293
301
  declare function shouldDisplayColors(): boolean;
294
302
 
@@ -340,6 +348,8 @@ declare enum FatalErrorType {
340
348
  AbortSilent = 1,
341
349
  Bug = 2
342
350
  }
351
+ declare class CancelExecution extends Error {
352
+ }
343
353
  /**
344
354
  * A fatal error represents an error shouldn't be rescued and that causes the execution to terminate.
345
355
  * There shouldn't be code that catches fatal errors.
@@ -347,14 +357,14 @@ declare enum FatalErrorType {
347
357
  declare abstract class Fatal extends Error {
348
358
  tryMessage: string | null;
349
359
  type: FatalErrorType;
350
- constructor(message: Message, type: FatalErrorType, tryMessage?: string | null);
360
+ constructor(message: Message, type: FatalErrorType, tryMessage?: Message | null);
351
361
  }
352
362
  /**
353
363
  * An abort error is a fatal error that shouldn't be reported as a bug.
354
364
  * Those usually represent unexpected scenarios that we can't handle and that usually require some action from the developer
355
365
  */
356
366
  declare class Abort extends Fatal {
357
- constructor(message: Message, tryMessage?: string | null);
367
+ constructor(message: Message, tryMessage?: Message | null);
358
368
  }
359
369
  declare class AbortSilent extends Fatal {
360
370
  constructor();
@@ -375,6 +385,8 @@ declare function mapper(error: Error): Promise<Error>;
375
385
  declare function isFatal(error: Error): boolean;
376
386
  declare function shouldReport(error: Error): boolean;
377
387
 
388
+ type error_CancelExecution = CancelExecution;
389
+ declare const error_CancelExecution: typeof CancelExecution;
378
390
  type error_Fatal = Fatal;
379
391
  declare const error_Fatal: typeof Fatal;
380
392
  type error_Abort = Abort;
@@ -390,6 +402,7 @@ declare const error_shouldReport: typeof shouldReport;
390
402
  declare const error_AbortSignal: typeof AbortSignal;
391
403
  declare namespace error {
392
404
  export {
405
+ error_CancelExecution as CancelExecution,
393
406
  error_Fatal as Fatal,
394
407
  error_Abort as Abort,
395
408
  error_AbortSilent as AbortSilent,
@@ -419,8 +432,8 @@ declare const open: (url: string) => Promise<void>;
419
432
  * @param args {string[]} Arguments to pass to the command.
420
433
  * @returns A promise that resolves with the aggregatted stdout of the command.
421
434
  */
422
- declare const captureOutput: (command: string, args: string[]) => Promise<string>;
423
- declare const exec: (command: string, args: string[], options?: ExecOptions) => Promise<execa.ExecaReturnValue<string>>;
435
+ declare const captureOutput: (command: string, args: string[], options?: ExecOptions) => Promise<string>;
436
+ declare const exec: (command: string, args: string[], options?: ExecOptions) => Promise<void>;
424
437
  interface ConcurrentExecCommand {
425
438
  prefix: string;
426
439
  executable: string;
@@ -526,7 +539,8 @@ var path = /*#__PURE__*/_mergeNamespaces({
526
539
  __proto__: null,
527
540
  relativize: relativize,
528
541
  findUp: findUp,
529
- glob: fastGlob
542
+ glob: fastGlob,
543
+ pathToFileURL: pathToFileURL
530
544
  }, [pathe]);
531
545
 
532
546
  declare function stripUp(path: string, strip: number): string;
@@ -548,6 +562,7 @@ declare function read$1(path: string): Promise<string>;
548
562
  * @param to {string} Destination path.
549
563
  */
550
564
  declare function copy(from: string, to: string): Promise<void>;
565
+ declare function touch(path: string): Promise<void>;
551
566
  declare function write$1(path: string, data: string): Promise<void>;
552
567
  declare function append(path: string, data: string): Promise<void>;
553
568
  declare function mkdir(path: string): Promise<void>;
@@ -583,10 +598,17 @@ declare function hasExecutablePermissions(path: string): Promise<boolean>;
583
598
  * @returns {boolean} True if it exists.
584
599
  */
585
600
  declare function exists(path: string): Promise<boolean>;
601
+ /**
602
+ * Format a string using prettier. Return the formatted content.
603
+ */
604
+ declare function format(content: string, options: {
605
+ path: string;
606
+ }): Promise<string>;
586
607
 
587
608
  declare const file_stripUp: typeof stripUp;
588
609
  declare const file_inTemporaryDirectory: typeof inTemporaryDirectory;
589
610
  declare const file_copy: typeof copy;
611
+ declare const file_touch: typeof touch;
590
612
  declare const file_append: typeof append;
591
613
  declare const file_mkdir: typeof mkdir;
592
614
  declare const file_remove: typeof remove;
@@ -597,12 +619,14 @@ declare const file_move: typeof move;
597
619
  declare const file_chmod: typeof chmod;
598
620
  declare const file_hasExecutablePermissions: typeof hasExecutablePermissions;
599
621
  declare const file_exists: typeof exists;
622
+ declare const file_format: typeof format;
600
623
  declare namespace file {
601
624
  export {
602
625
  file_stripUp as stripUp,
603
626
  file_inTemporaryDirectory as inTemporaryDirectory,
604
627
  read$1 as read,
605
628
  file_copy as copy,
629
+ file_touch as touch,
606
630
  write$1 as write,
607
631
  file_append as append,
608
632
  file_mkdir as mkdir,
@@ -614,20 +638,24 @@ declare namespace file {
614
638
  file_chmod as chmod,
615
639
  file_hasExecutablePermissions as hasExecutablePermissions,
616
640
  file_exists as exists,
641
+ file_format as format,
617
642
  };
618
643
  }
619
644
 
620
645
  declare const factory: simple_git.SimpleGitFactory;
646
+ declare function initializeRepository(directory: string): Promise<void>;
621
647
  declare function downloadRepository({ repoUrl, destination }: {
622
648
  repoUrl: string;
623
649
  destination: string;
624
650
  }): Promise<void>;
625
651
 
626
652
  declare const git_factory: typeof factory;
653
+ declare const git_initializeRepository: typeof initializeRepository;
627
654
  declare const git_downloadRepository: typeof downloadRepository;
628
655
  declare namespace git {
629
656
  export {
630
657
  git_factory as factory,
658
+ git_initializeRepository as initializeRepository,
631
659
  git_downloadRepository as downloadRepository,
632
660
  };
633
661
  }
@@ -669,6 +697,15 @@ declare namespace github {
669
697
  };
670
698
  }
671
699
 
700
+ declare function generate(suffix: string): string;
701
+
702
+ declare const haiku_generate: typeof generate;
703
+ declare namespace haiku {
704
+ export {
705
+ haiku_generate as generate,
706
+ };
707
+ }
708
+
672
709
  /**
673
710
  * Returns the latest available version of an NPM package.
674
711
  * @param name {string} The name of the NPM package.
@@ -676,10 +713,10 @@ declare namespace github {
676
713
  */
677
714
  declare function latestNpmPackageVersion(name: string): Promise<string>;
678
715
 
679
- declare const version_latestNpmPackageVersion: typeof latestNpmPackageVersion;
680
- declare namespace version {
716
+ declare const version$1_latestNpmPackageVersion: typeof latestNpmPackageVersion;
717
+ declare namespace version$1 {
681
718
  export {
682
- version_latestNpmPackageVersion as latestNpmPackageVersion,
719
+ version$1_latestNpmPackageVersion as latestNpmPackageVersion,
683
720
  };
684
721
  }
685
722
 
@@ -702,6 +739,11 @@ declare namespace os {
702
739
  };
703
740
  }
704
741
 
742
+ /**
743
+ * It returns true if the terminal is interactive.
744
+ * @returns {boolean} True if the terminal is interactive.
745
+ */
746
+ declare function isTerminalInteractive(): boolean;
705
747
  /**
706
748
  * Returns the path to the user's home directory.
707
749
  * @returns {string} The path to the user's home directory.
@@ -713,6 +755,12 @@ declare function homeDirectory(): string;
713
755
  * @returns true if SHOPIFY_CONFIG is debug
714
756
  */
715
757
  declare function isDebug(env?: NodeJS.ProcessEnv): boolean;
758
+ /**
759
+ * Returns true if the CLI is running in verbose mode.
760
+ * @param env The environment variables from the environment of the current process.
761
+ * @returns true if SHOPIFY_FLAG_VERBOSE is truthy or the flag --verbose has been passed
762
+ */
763
+ declare function isVerbose(env?: NodeJS.ProcessEnv): boolean;
716
764
  /**
717
765
  * Returns true if the environment in which the CLI is running is either
718
766
  * a local environment (where dev is present) or a cloud environment (spin).
@@ -727,17 +775,29 @@ declare function isShopify(env?: NodeJS.ProcessEnv): Promise<boolean>;
727
775
  * @returns True if the SHOPIFY_UNIT_TEST environment variable is truthy.
728
776
  */
729
777
  declare function isUnitTest(env?: NodeJS.ProcessEnv): boolean;
778
+ /**
779
+ * Returns true if reporting analytics is enabled.
780
+ * @param env The environment variables from the environment of the current process.
781
+ * @returns true unless SHOPIFY_CLI_NO_ANALYTICS is truthy.
782
+ */
783
+ declare function analyticsDisabled(env?: NodeJS.ProcessEnv): boolean;
730
784
 
785
+ declare const local_isTerminalInteractive: typeof isTerminalInteractive;
731
786
  declare const local_homeDirectory: typeof homeDirectory;
732
787
  declare const local_isDebug: typeof isDebug;
788
+ declare const local_isVerbose: typeof isVerbose;
733
789
  declare const local_isShopify: typeof isShopify;
734
790
  declare const local_isUnitTest: typeof isUnitTest;
791
+ declare const local_analyticsDisabled: typeof analyticsDisabled;
735
792
  declare namespace local {
736
793
  export {
794
+ local_isTerminalInteractive as isTerminalInteractive,
737
795
  local_homeDirectory as homeDirectory,
738
796
  local_isDebug as isDebug,
797
+ local_isVerbose as isVerbose,
739
798
  local_isShopify as isShopify,
740
799
  local_isUnitTest as isUnitTest,
800
+ local_analyticsDisabled as analyticsDisabled,
741
801
  };
742
802
  }
743
803
 
@@ -1022,6 +1082,12 @@ declare namespace admin {
1022
1082
  }
1023
1083
 
1024
1084
  declare function request<T>(query: RequestDocument, token: string, variables?: Variables): Promise<T>;
1085
+ /**
1086
+ * Check if the given token is revoked and no longer valid to interact with the Partners API.
1087
+ * @param token {string} - The token to check
1088
+ * @returns {Promise<boolean>} - True if the token is revoked, false otherwise
1089
+ */
1090
+ declare function checkIfTokenIsRevoked(token: string): Promise<boolean>;
1025
1091
  /**
1026
1092
  * Function queries are proxied through the script service proxy.
1027
1093
  * To execute a query, we encapsulate it inside another query (including the variables)
@@ -1036,10 +1102,12 @@ declare function request<T>(query: RequestDocument, token: string, variables?: V
1036
1102
  declare function functionProxyRequest<T>(apiKey: string, query: unknown, token: string, variables?: unknown): Promise<T>;
1037
1103
 
1038
1104
  declare const partners_request: typeof request;
1105
+ declare const partners_checkIfTokenIsRevoked: typeof checkIfTokenIsRevoked;
1039
1106
  declare const partners_functionProxyRequest: typeof functionProxyRequest;
1040
1107
  declare namespace partners {
1041
1108
  export {
1042
1109
  partners_request as request,
1110
+ partners_checkIfTokenIsRevoked as checkIfTokenIsRevoked,
1043
1111
  partners_functionProxyRequest as functionProxyRequest,
1044
1112
  };
1045
1113
  }
@@ -1577,13 +1645,16 @@ interface ExecThemeCheckCLIOptions {
1577
1645
  stderr: Writable;
1578
1646
  }
1579
1647
  declare function execThemeCheckCLI({ directories, args, stdout, stderr, }: ExecThemeCheckCLIOptions): Promise<void[]>;
1648
+ declare function version(): Promise<string | undefined>;
1580
1649
 
1581
1650
  declare const ruby_execCLI: typeof execCLI;
1582
1651
  declare const ruby_execThemeCheckCLI: typeof execThemeCheckCLI;
1652
+ declare const ruby_version: typeof version;
1583
1653
  declare namespace ruby {
1584
1654
  export {
1585
1655
  ruby_execCLI as execCLI,
1586
1656
  ruby_execThemeCheckCLI as execThemeCheckCLI,
1657
+ ruby_version as version,
1587
1658
  };
1588
1659
  }
1589
1660
 
@@ -1755,6 +1826,8 @@ declare const constants: {
1755
1826
  spinNamespace: string;
1756
1827
  spinHost: string;
1757
1828
  partnersToken: string;
1829
+ verbose: string;
1830
+ noAnalytics: string;
1758
1831
  };
1759
1832
  paths: {
1760
1833
  executables: {
@@ -1799,5 +1872,23 @@ declare namespace plugins {
1799
1872
  };
1800
1873
  }
1801
1874
 
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 };
1875
+ /**
1876
+ * Check if user editor is VS Code
1877
+ */
1878
+ declare const isVSCode: (root?: string) => Promise<boolean>;
1879
+ /**
1880
+ * Add VSCode extension recommendations
1881
+ */
1882
+ declare function addRecommendedExtensions(directory: string, recommendations: string[]): Promise<void>;
1883
+
1884
+ declare const vscode_isVSCode: typeof isVSCode;
1885
+ declare const vscode_addRecommendedExtensions: typeof addRecommendedExtensions;
1886
+ declare namespace vscode {
1887
+ export {
1888
+ vscode_isVSCode as isVSCode,
1889
+ vscode_addRecommendedExtensions as addRecommendedExtensions,
1890
+ };
1891
+ }
1892
+
1893
+ export { abort, api, archiver, checksum, cli, constants, dependency, dotEnv as dotenv, environment, error, file, git, github, haiku, http, id, npm, os, output, path, plugins, port, ruby, schema, semver, session, store, string, system, template, temporary, toml, ui, version$1 as version, vscode, yaml };
1803
1894
  //# 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-ddf77494.js';
1
+ export { I as abort, q as api, w as archiver, x as checksum, D as cli, J as constants, d as dependency, H as dotenv, j as environment, e as error, f as file, g as git, c as github, h as haiku, r as http, E as id, B as npm, i as os, o as output, p as path, K as plugins, C as port, z as ruby, l as schema, A as semver, k as session, n as store, b as string, s as system, t as template, G as temporary, m as toml, u as ui, v as version, L as vscode, y as yaml } from './index-3f46deaa.js';
2
2
  import 'assert';
3
3
  import 'events';
4
4
  import 'readline';
@@ -20,6 +20,7 @@ import 'constants';
20
20
  import 'node:stream';
21
21
  import 'node:util';
22
22
  import 'crypto';
23
+ import 'prettier';
23
24
  import 'tty';
24
25
  import 'stacktracey';
25
26
  import '@oclif/core';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import 'node:fs';
2
2
  import 'node:path';
3
- import { F as FormData, a as File } from './index-ddf77494.js';
3
+ import { F as FormData, a as File } from './index-3f46deaa.js';
4
4
  import 'assert';
5
5
  import 'events';
6
6
  import 'readline';
@@ -20,6 +20,7 @@ import 'constants';
20
20
  import 'node:stream';
21
21
  import 'node:util';
22
22
  import 'crypto';
23
+ import 'prettier';
23
24
  import 'tty';
24
25
  import 'stacktracey';
25
26
  import '@oclif/core';
@@ -471,4 +472,4 @@ async function toFormData(Body, ct) {
471
472
  }
472
473
 
473
474
  export { toFormData };
474
- //# sourceMappingURL=multipart-parser-589b8668.js.map
475
+ //# sourceMappingURL=multipart-parser-31f44703.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multipart-parser-31f44703.js","sources":["../node_modules/node-fetch/src/utils/multipart-parser.js"],"sourcesContent":["import {File} from 'fetch-blob/from.js';\nimport {FormData} from 'formdata-polyfill/esm.min.js';\n\nlet s = 0;\nconst S = {\n\tSTART_BOUNDARY: s++,\n\tHEADER_FIELD_START: s++,\n\tHEADER_FIELD: s++,\n\tHEADER_VALUE_START: s++,\n\tHEADER_VALUE: s++,\n\tHEADER_VALUE_ALMOST_DONE: s++,\n\tHEADERS_ALMOST_DONE: s++,\n\tPART_DATA_START: s++,\n\tPART_DATA: s++,\n\tEND: s++\n};\n\nlet f = 1;\nconst F = {\n\tPART_BOUNDARY: f,\n\tLAST_BOUNDARY: f *= 2\n};\n\nconst LF = 10;\nconst CR = 13;\nconst SPACE = 32;\nconst HYPHEN = 45;\nconst COLON = 58;\nconst A = 97;\nconst Z = 122;\n\nconst lower = c => c | 0x20;\n\nconst noop = () => {};\n\nclass MultipartParser {\n\t/**\n\t * @param {string} boundary\n\t */\n\tconstructor(boundary) {\n\t\tthis.index = 0;\n\t\tthis.flags = 0;\n\n\t\tthis.onHeaderEnd = noop;\n\t\tthis.onHeaderField = noop;\n\t\tthis.onHeadersEnd = noop;\n\t\tthis.onHeaderValue = noop;\n\t\tthis.onPartBegin = noop;\n\t\tthis.onPartData = noop;\n\t\tthis.onPartEnd = noop;\n\n\t\tthis.boundaryChars = {};\n\n\t\tboundary = '\\r\\n--' + boundary;\n\t\tconst ui8a = new Uint8Array(boundary.length);\n\t\tfor (let i = 0; i < boundary.length; i++) {\n\t\t\tui8a[i] = boundary.charCodeAt(i);\n\t\t\tthis.boundaryChars[ui8a[i]] = true;\n\t\t}\n\n\t\tthis.boundary = ui8a;\n\t\tthis.lookbehind = new Uint8Array(this.boundary.length + 8);\n\t\tthis.state = S.START_BOUNDARY;\n\t}\n\n\t/**\n\t * @param {Uint8Array} data\n\t */\n\twrite(data) {\n\t\tlet i = 0;\n\t\tconst length_ = data.length;\n\t\tlet previousIndex = this.index;\n\t\tlet {lookbehind, boundary, boundaryChars, index, state, flags} = this;\n\t\tconst boundaryLength = this.boundary.length;\n\t\tconst boundaryEnd = boundaryLength - 1;\n\t\tconst bufferLength = data.length;\n\t\tlet c;\n\t\tlet cl;\n\n\t\tconst mark = name => {\n\t\t\tthis[name + 'Mark'] = i;\n\t\t};\n\n\t\tconst clear = name => {\n\t\t\tdelete this[name + 'Mark'];\n\t\t};\n\n\t\tconst callback = (callbackSymbol, start, end, ui8a) => {\n\t\t\tif (start === undefined || start !== end) {\n\t\t\t\tthis[callbackSymbol](ui8a && ui8a.subarray(start, end));\n\t\t\t}\n\t\t};\n\n\t\tconst dataCallback = (name, clear) => {\n\t\t\tconst markSymbol = name + 'Mark';\n\t\t\tif (!(markSymbol in this)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (clear) {\n\t\t\t\tcallback(name, this[markSymbol], i, data);\n\t\t\t\tdelete this[markSymbol];\n\t\t\t} else {\n\t\t\t\tcallback(name, this[markSymbol], data.length, data);\n\t\t\t\tthis[markSymbol] = 0;\n\t\t\t}\n\t\t};\n\n\t\tfor (i = 0; i < length_; i++) {\n\t\t\tc = data[i];\n\n\t\t\tswitch (state) {\n\t\t\t\tcase S.START_BOUNDARY:\n\t\t\t\t\tif (index === boundary.length - 2) {\n\t\t\t\t\t\tif (c === HYPHEN) {\n\t\t\t\t\t\t\tflags |= F.LAST_BOUNDARY;\n\t\t\t\t\t\t} else if (c !== CR) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (index - 1 === boundary.length - 2) {\n\t\t\t\t\t\tif (flags & F.LAST_BOUNDARY && c === HYPHEN) {\n\t\t\t\t\t\t\tstate = S.END;\n\t\t\t\t\t\t\tflags = 0;\n\t\t\t\t\t\t} else if (!(flags & F.LAST_BOUNDARY) && c === LF) {\n\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t\tcallback('onPartBegin');\n\t\t\t\t\t\t\tstate = S.HEADER_FIELD_START;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (c !== boundary[index + 2]) {\n\t\t\t\t\t\tindex = -2;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (c === boundary[index + 2]) {\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.HEADER_FIELD_START:\n\t\t\t\t\tstate = S.HEADER_FIELD;\n\t\t\t\t\tmark('onHeaderField');\n\t\t\t\t\tindex = 0;\n\t\t\t\t\t// falls through\n\t\t\t\tcase S.HEADER_FIELD:\n\t\t\t\t\tif (c === CR) {\n\t\t\t\t\t\tclear('onHeaderField');\n\t\t\t\t\t\tstate = S.HEADERS_ALMOST_DONE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tindex++;\n\t\t\t\t\tif (c === HYPHEN) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (c === COLON) {\n\t\t\t\t\t\tif (index === 1) {\n\t\t\t\t\t\t\t// empty header field\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdataCallback('onHeaderField', true);\n\t\t\t\t\t\tstate = S.HEADER_VALUE_START;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcl = lower(c);\n\t\t\t\t\tif (cl < A || cl > Z) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.HEADER_VALUE_START:\n\t\t\t\t\tif (c === SPACE) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tmark('onHeaderValue');\n\t\t\t\t\tstate = S.HEADER_VALUE;\n\t\t\t\t\t// falls through\n\t\t\t\tcase S.HEADER_VALUE:\n\t\t\t\t\tif (c === CR) {\n\t\t\t\t\t\tdataCallback('onHeaderValue', true);\n\t\t\t\t\t\tcallback('onHeaderEnd');\n\t\t\t\t\t\tstate = S.HEADER_VALUE_ALMOST_DONE;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.HEADER_VALUE_ALMOST_DONE:\n\t\t\t\t\tif (c !== LF) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tstate = S.HEADER_FIELD_START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.HEADERS_ALMOST_DONE:\n\t\t\t\t\tif (c !== LF) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tcallback('onHeadersEnd');\n\t\t\t\t\tstate = S.PART_DATA_START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.PART_DATA_START:\n\t\t\t\t\tstate = S.PART_DATA;\n\t\t\t\t\tmark('onPartData');\n\t\t\t\t\t// falls through\n\t\t\t\tcase S.PART_DATA:\n\t\t\t\t\tpreviousIndex = index;\n\n\t\t\t\t\tif (index === 0) {\n\t\t\t\t\t\t// boyer-moore derrived algorithm to safely skip non-boundary data\n\t\t\t\t\t\ti += boundaryEnd;\n\t\t\t\t\t\twhile (i < bufferLength && !(data[i] in boundaryChars)) {\n\t\t\t\t\t\t\ti += boundaryLength;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ti -= boundaryEnd;\n\t\t\t\t\t\tc = data[i];\n\t\t\t\t\t}\n\n\t\t\t\t\tif (index < boundary.length) {\n\t\t\t\t\t\tif (boundary[index] === c) {\n\t\t\t\t\t\t\tif (index === 0) {\n\t\t\t\t\t\t\t\tdataCallback('onPartData', true);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (index === boundary.length) {\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t\tif (c === CR) {\n\t\t\t\t\t\t\t// CR = part boundary\n\t\t\t\t\t\t\tflags |= F.PART_BOUNDARY;\n\t\t\t\t\t\t} else if (c === HYPHEN) {\n\t\t\t\t\t\t\t// HYPHEN = end boundary\n\t\t\t\t\t\t\tflags |= F.LAST_BOUNDARY;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (index - 1 === boundary.length) {\n\t\t\t\t\t\tif (flags & F.PART_BOUNDARY) {\n\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t\tif (c === LF) {\n\t\t\t\t\t\t\t\t// unset the PART_BOUNDARY flag\n\t\t\t\t\t\t\t\tflags &= ~F.PART_BOUNDARY;\n\t\t\t\t\t\t\t\tcallback('onPartEnd');\n\t\t\t\t\t\t\t\tcallback('onPartBegin');\n\t\t\t\t\t\t\t\tstate = S.HEADER_FIELD_START;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (flags & F.LAST_BOUNDARY) {\n\t\t\t\t\t\t\tif (c === HYPHEN) {\n\t\t\t\t\t\t\t\tcallback('onPartEnd');\n\t\t\t\t\t\t\t\tstate = S.END;\n\t\t\t\t\t\t\t\tflags = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (index > 0) {\n\t\t\t\t\t\t// when matching a possible boundary, keep a lookbehind reference\n\t\t\t\t\t\t// in case it turns out to be a false lead\n\t\t\t\t\t\tlookbehind[index - 1] = c;\n\t\t\t\t\t} else if (previousIndex > 0) {\n\t\t\t\t\t\t// if our boundary turned out to be rubbish, the captured lookbehind\n\t\t\t\t\t\t// belongs to partData\n\t\t\t\t\t\tconst _lookbehind = new Uint8Array(lookbehind.buffer, lookbehind.byteOffset, lookbehind.byteLength);\n\t\t\t\t\t\tcallback('onPartData', 0, previousIndex, _lookbehind);\n\t\t\t\t\t\tpreviousIndex = 0;\n\t\t\t\t\t\tmark('onPartData');\n\n\t\t\t\t\t\t// reconsider the current character even so it interrupted the sequence\n\t\t\t\t\t\t// it could be the beginning of a new sequence\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.END:\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error(`Unexpected state entered: ${state}`);\n\t\t\t}\n\t\t}\n\n\t\tdataCallback('onHeaderField');\n\t\tdataCallback('onHeaderValue');\n\t\tdataCallback('onPartData');\n\n\t\t// Update properties for the next call\n\t\tthis.index = index;\n\t\tthis.state = state;\n\t\tthis.flags = flags;\n\t}\n\n\tend() {\n\t\tif ((this.state === S.HEADER_FIELD_START && this.index === 0) ||\n\t\t\t(this.state === S.PART_DATA && this.index === this.boundary.length)) {\n\t\t\tthis.onPartEnd();\n\t\t} else if (this.state !== S.END) {\n\t\t\tthrow new Error('MultipartParser.end(): stream ended unexpectedly');\n\t\t}\n\t}\n}\n\nfunction _fileName(headerValue) {\n\t// matches either a quoted-string or a token (RFC 2616 section 19.5.1)\n\tconst m = headerValue.match(/\\bfilename=(\"(.*?)\"|([^()<>@,;:\\\\\"/[\\]?={}\\s\\t]+))($|;\\s)/i);\n\tif (!m) {\n\t\treturn;\n\t}\n\n\tconst match = m[2] || m[3] || '';\n\tlet filename = match.slice(match.lastIndexOf('\\\\') + 1);\n\tfilename = filename.replace(/%22/g, '\"');\n\tfilename = filename.replace(/&#(\\d{4});/g, (m, code) => {\n\t\treturn String.fromCharCode(code);\n\t});\n\treturn filename;\n}\n\nexport async function toFormData(Body, ct) {\n\tif (!/multipart/i.test(ct)) {\n\t\tthrow new TypeError('Failed to fetch');\n\t}\n\n\tconst m = ct.match(/boundary=(?:\"([^\"]+)\"|([^;]+))/i);\n\n\tif (!m) {\n\t\tthrow new TypeError('no or bad content-type header, no multipart boundary');\n\t}\n\n\tconst parser = new MultipartParser(m[1] || m[2]);\n\n\tlet headerField;\n\tlet headerValue;\n\tlet entryValue;\n\tlet entryName;\n\tlet contentType;\n\tlet filename;\n\tconst entryChunks = [];\n\tconst formData = new FormData();\n\n\tconst onPartData = ui8a => {\n\t\tentryValue += decoder.decode(ui8a, {stream: true});\n\t};\n\n\tconst appendToFile = ui8a => {\n\t\tentryChunks.push(ui8a);\n\t};\n\n\tconst appendFileToFormData = () => {\n\t\tconst file = new File(entryChunks, filename, {type: contentType});\n\t\tformData.append(entryName, file);\n\t};\n\n\tconst appendEntryToFormData = () => {\n\t\tformData.append(entryName, entryValue);\n\t};\n\n\tconst decoder = new TextDecoder('utf-8');\n\tdecoder.decode();\n\n\tparser.onPartBegin = function () {\n\t\tparser.onPartData = onPartData;\n\t\tparser.onPartEnd = appendEntryToFormData;\n\n\t\theaderField = '';\n\t\theaderValue = '';\n\t\tentryValue = '';\n\t\tentryName = '';\n\t\tcontentType = '';\n\t\tfilename = null;\n\t\tentryChunks.length = 0;\n\t};\n\n\tparser.onHeaderField = function (ui8a) {\n\t\theaderField += decoder.decode(ui8a, {stream: true});\n\t};\n\n\tparser.onHeaderValue = function (ui8a) {\n\t\theaderValue += decoder.decode(ui8a, {stream: true});\n\t};\n\n\tparser.onHeaderEnd = function () {\n\t\theaderValue += decoder.decode();\n\t\theaderField = headerField.toLowerCase();\n\n\t\tif (headerField === 'content-disposition') {\n\t\t\t// matches either a quoted-string or a token (RFC 2616 section 19.5.1)\n\t\t\tconst m = headerValue.match(/\\bname=(\"([^\"]*)\"|([^()<>@,;:\\\\\"/[\\]?={}\\s\\t]+))/i);\n\n\t\t\tif (m) {\n\t\t\t\tentryName = m[2] || m[3] || '';\n\t\t\t}\n\n\t\t\tfilename = _fileName(headerValue);\n\n\t\t\tif (filename) {\n\t\t\t\tparser.onPartData = appendToFile;\n\t\t\t\tparser.onPartEnd = appendFileToFormData;\n\t\t\t}\n\t\t} else if (headerField === 'content-type') {\n\t\t\tcontentType = headerValue;\n\t\t}\n\n\t\theaderValue = '';\n\t\theaderField = '';\n\t};\n\n\tfor await (const chunk of Body) {\n\t\tparser.write(chunk);\n\t}\n\n\tparser.end();\n\n\treturn formData;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAI,CAAC,GAAG,CAAC,CAAC;AACV,MAAM,CAAC,GAAG;AACV,CAAC,cAAc,EAAE,CAAC,EAAE;AACpB,CAAC,kBAAkB,EAAE,CAAC,EAAE;AACxB,CAAC,YAAY,EAAE,CAAC,EAAE;AAClB,CAAC,kBAAkB,EAAE,CAAC,EAAE;AACxB,CAAC,YAAY,EAAE,CAAC,EAAE;AAClB,CAAC,wBAAwB,EAAE,CAAC,EAAE;AAC9B,CAAC,mBAAmB,EAAE,CAAC,EAAE;AACzB,CAAC,eAAe,EAAE,CAAC,EAAE;AACrB,CAAC,SAAS,EAAE,CAAC,EAAE;AACf,CAAC,GAAG,EAAE,CAAC,EAAE;AACT,CAAC,CAAC;AACF;AACA,IAAI,CAAC,GAAG,CAAC,CAAC;AACV,MAAM,CAAC,GAAG;AACV,CAAC,aAAa,EAAE,CAAC;AACjB,CAAC,aAAa,EAA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,EAAE;AACjB,IAAI,MAAM,CAAC,UAAU,GAAG,YAAY,CAAC;AACrC,IAAI,MAAM,CAAC,SAAS,GAAG,oBAAoB,CAAC;AAC5C,IAAI;AACJ,GAAG,MAAM,IAAI,WAAW,KAAK,cAAc,EAAE;AAC7C,GAAG,WAAW,GAAG,WAAW,CAAC;AAC7B,GAAG;AACH;AACA,EAAE,WAAW,GAAG,EAAE,CAAC;AACnB,EAAE,WAAW,GAAG,EAAE,CAAC;AACnB,EAAE,CAAC;AACH;AACA,CAAC,WAAW,MAAM,KAAK,IAAI,IAAI,EAAE;AACjC,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AACtB,EAAE;AACF;AACA,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;AACd;AACA,CAAC,OAAO,QAAQ,CAAC;AACjB;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopify/cli-kit",
3
- "version": "3.0.11",
3
+ "version": "3.0.14",
4
4
  "private": false,
5
5
  "description": "A set of utilities, interfaces, and models that are common across all the platform features",
6
6
  "keywords": [
@@ -54,6 +54,7 @@
54
54
  "envfile": "^6.17.0",
55
55
  "keytar": "^7.9.0",
56
56
  "open": "^8.4.0",
57
+ "prettier": "^2.6.2",
57
58
  "source-map-support": "^0.5.21",
58
59
  "stacktracey": "^2.1.8"
59
60
  },
@@ -65,12 +66,12 @@
65
66
  "abort-controller": "^3.0.0",
66
67
  "ansi-colors": "^4.1.1",
67
68
  "change-case": "^4.1.2",
69
+ "color-json": "^2.0.1",
68
70
  "commondir": "^1.0.1",
69
71
  "conf": "^10.1.2",
70
72
  "cross-zip": "^4.0.0",
71
73
  "del": "^6.0.0",
72
74
  "enquirer": "^2.3.6",
73
- "color-json": "^2.0.1",
74
75
  "env-paths": "^3.0.0",
75
76
  "execa": "^6.0.0",
76
77
  "fast-glob": "^3.2.11",
@@ -81,6 +82,8 @@
81
82
  "get-port-please": "^2.5.0",
82
83
  "graphql": "^16.4.0",
83
84
  "graphql-request": "^4.3.0",
85
+ "haikunator": "^2.1.2",
86
+ "is-interactive": "^2.0.0",
84
87
  "js-yaml": "^4.1.0",
85
88
  "latest-version": "^6.0.0",
86
89
  "liquidjs": "^9.36.0",