@shopify/cli-kit 3.0.14 → 3.0.17

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
@@ -34,23 +34,43 @@ function _mergeNamespaces(n, m) {
34
34
  return Object.freeze(n);
35
35
  }
36
36
 
37
- interface Question {
38
- type: 'input' | 'select' | 'autocomplete' | 'password';
39
- name: string;
37
+ interface BaseQuestion<TName extends string> {
38
+ name: TName;
40
39
  message: string;
41
- validate?: (value: string) => string | boolean;
42
- default?: string;
43
40
  preface?: string;
44
- choices?: string[] | {
41
+ validate?: (value: string) => string | true;
42
+ default?: string;
43
+ result?: (value: string) => string | boolean;
44
+ }
45
+ declare type InputQuestion<TName extends string> = BaseQuestion<TName> & {
46
+ type: 'input';
47
+ };
48
+ declare type SelectQuestion<TName extends string> = BaseQuestion<TName> & {
49
+ type: 'select';
50
+ choices: string[] | {
45
51
  name: string;
46
52
  value: string;
47
53
  }[];
48
- result?: (value: string) => string | boolean;
49
- }
50
- declare const prompt: <T>(questions: Question[]) => Promise<T>;
54
+ };
55
+ declare type AutocompleteQuestion<TName extends string> = BaseQuestion<TName> & {
56
+ type: 'autocomplete';
57
+ choices: string[] | {
58
+ name: string;
59
+ value: string;
60
+ }[];
61
+ };
62
+ declare type PasswordQuestion<TName extends string> = BaseQuestion<TName> & {
63
+ type: 'password';
64
+ };
65
+ declare type Question<TName extends string = string> = InputQuestion<TName> | SelectQuestion<TName> | AutocompleteQuestion<TName> | PasswordQuestion<TName>;
66
+ declare const prompt: <TName extends string & keyof TAnswers, TAnswers extends { [key in TName]: string; } = { [key_1 in TName]: string; }>(questions: readonly Question<TName>[], debugForceInquirer?: boolean) => Promise<TAnswers>;
51
67
  declare function nonEmptyDirectoryPrompt(directory: string): Promise<void>;
52
68
 
53
- type ui_Question = Question;
69
+ type ui_InputQuestion<TName extends string> = InputQuestion<TName>;
70
+ type ui_SelectQuestion<TName extends string> = SelectQuestion<TName>;
71
+ type ui_AutocompleteQuestion<TName extends string> = AutocompleteQuestion<TName>;
72
+ type ui_PasswordQuestion<TName extends string> = PasswordQuestion<TName>;
73
+ type ui_Question<TName extends string = string> = Question<TName>;
54
74
  declare const ui_prompt: typeof prompt;
55
75
  declare const ui_nonEmptyDirectoryPrompt: typeof nonEmptyDirectoryPrompt;
56
76
  declare const ui_Listr: typeof Listr;
@@ -59,6 +79,10 @@ declare const ui_ListrDefaultRenderer: typeof ListrDefaultRenderer;
59
79
  declare const ui_ListrTask: typeof ListrTask;
60
80
  declare namespace ui {
61
81
  export {
82
+ ui_InputQuestion as InputQuestion,
83
+ ui_SelectQuestion as SelectQuestion,
84
+ ui_AutocompleteQuestion as AutocompleteQuestion,
85
+ ui_PasswordQuestion as PasswordQuestion,
62
86
  ui_Question as Question,
63
87
  ui_prompt as prompt,
64
88
  ui_nonEmptyDirectoryPrompt as nonEmptyDirectoryPrompt,
@@ -69,6 +93,14 @@ declare namespace ui {
69
93
  };
70
94
  }
71
95
 
96
+ declare const genericConfigurationFileNames: {
97
+ readonly yarn: {
98
+ readonly lockfile: "yarn.lock";
99
+ };
100
+ readonly pnpm: {
101
+ readonly lockfile: "pnpm-lock.yaml";
102
+ };
103
+ };
72
104
  declare const dependencyManager: readonly ["yarn", "npm", "pnpm"];
73
105
  declare type DependencyManager = typeof dependencyManager[number];
74
106
  declare const PackageJsonNotFoundError: (directory: string) => Abort;
@@ -78,6 +110,12 @@ declare const PackageJsonNotFoundError: (directory: string) => Abort;
78
110
  * @returns The dependency manager
79
111
  */
80
112
  declare function dependencyManagerUsedForCreating(env?: NodeJS.ProcessEnv): DependencyManager;
113
+ /**
114
+ * Returns the dependency manager used by an existing project.
115
+ * @param directory {string} The root directory of the project.
116
+ * @returns The dependency manager
117
+ */
118
+ declare function getDependencyManager(directory: string): Promise<DependencyManager>;
81
119
  interface InstallNPMDependenciesRecursivelyOptions {
82
120
  /**
83
121
  * The dependency manager to use to install the dependencies.
@@ -124,7 +162,18 @@ declare function getDependencies(packageJsonPath: string): Promise<{
124
162
  [key: string]: string;
125
163
  }>;
126
164
  declare function checkForNewVersion(dependency: string, currentVersion: string): Promise<string | undefined>;
127
- declare function getOutputUpdateCLIReminder(dependencyManager: DependencyManager, packages?: string[]): string;
165
+ declare function getOutputUpdateCLIReminder(dependencyManager: DependencyManager, version: string): string;
166
+ interface PackageJSONContents {
167
+ name: string;
168
+ version?: string;
169
+ dependencies?: {
170
+ [key: string]: string;
171
+ };
172
+ devDependencies?: {
173
+ [key: string]: string;
174
+ };
175
+ }
176
+ declare function packageJSONContents(packageJsonPath: string): Promise<PackageJSONContents>;
128
177
  declare type DependencyType = 'dev' | 'prod' | 'peer';
129
178
  interface AddNPMDependenciesIfNeededOptions {
130
179
  /** How dependencies should be added */
@@ -146,31 +195,42 @@ interface AddNPMDependenciesIfNeededOptions {
146
195
  * @param options {AddNPMDependenciesIfNeededOptions} Options for adding dependencies.
147
196
  */
148
197
  declare function addNPMDependenciesIfNeeded(dependencies: string[], options: AddNPMDependenciesIfNeededOptions): Promise<void>;
198
+ declare function addLatestNPMDependencies(dependencies: string[], options: AddNPMDependenciesIfNeededOptions): Promise<void>;
149
199
 
200
+ declare const dependency_genericConfigurationFileNames: typeof genericConfigurationFileNames;
150
201
  declare const dependency_dependencyManager: typeof dependencyManager;
151
202
  type dependency_DependencyManager = DependencyManager;
152
203
  declare const dependency_PackageJsonNotFoundError: typeof PackageJsonNotFoundError;
153
204
  declare const dependency_dependencyManagerUsedForCreating: typeof dependencyManagerUsedForCreating;
205
+ declare const dependency_getDependencyManager: typeof getDependencyManager;
154
206
  declare const dependency_installNPMDependenciesRecursively: typeof installNPMDependenciesRecursively;
155
207
  declare const dependency_install: typeof install;
156
208
  declare const dependency_getPackageName: typeof getPackageName;
157
209
  declare const dependency_getDependencies: typeof getDependencies;
158
210
  declare const dependency_checkForNewVersion: typeof checkForNewVersion;
159
211
  declare const dependency_getOutputUpdateCLIReminder: typeof getOutputUpdateCLIReminder;
212
+ declare const dependency_packageJSONContents: typeof packageJSONContents;
213
+ type dependency_DependencyType = DependencyType;
160
214
  declare const dependency_addNPMDependenciesIfNeeded: typeof addNPMDependenciesIfNeeded;
215
+ declare const dependency_addLatestNPMDependencies: typeof addLatestNPMDependencies;
161
216
  declare namespace dependency {
162
217
  export {
218
+ dependency_genericConfigurationFileNames as genericConfigurationFileNames,
163
219
  dependency_dependencyManager as dependencyManager,
164
220
  dependency_DependencyManager as DependencyManager,
165
221
  dependency_PackageJsonNotFoundError as PackageJsonNotFoundError,
166
222
  dependency_dependencyManagerUsedForCreating as dependencyManagerUsedForCreating,
223
+ dependency_getDependencyManager as getDependencyManager,
167
224
  dependency_installNPMDependenciesRecursively as installNPMDependenciesRecursively,
168
225
  dependency_install as install,
169
226
  dependency_getPackageName as getPackageName,
170
227
  dependency_getDependencies as getDependencies,
171
228
  dependency_checkForNewVersion as checkForNewVersion,
172
229
  dependency_getOutputUpdateCLIReminder as getOutputUpdateCLIReminder,
230
+ dependency_packageJSONContents as packageJSONContents,
231
+ dependency_DependencyType as DependencyType,
173
232
  dependency_addNPMDependenciesIfNeeded as addNPMDependenciesIfNeeded,
233
+ dependency_addLatestNPMDependencies as addLatestNPMDependencies,
174
234
  };
175
235
  }
176
236
 
@@ -555,7 +615,7 @@ declare function inTemporaryDirectory<T>(callback: (tmpDir: string) => T | Promi
555
615
  * @param path {string} Path to the file to read.
556
616
  * @returns {Promise<string>} A promise that resolves with the content of the file.
557
617
  */
558
- declare function read$1(path: string): Promise<string>;
618
+ declare function read$1(path: string, options?: object): Promise<string>;
559
619
  /**
560
620
  * Copies a file
561
621
  * @param from {string} Path to the directory or file to be copied.
@@ -572,6 +632,7 @@ declare function rmdir(path: string, { force }?: {
572
632
  }): Promise<void>;
573
633
  declare function mkTmpDir(): Promise<string>;
574
634
  declare function isDirectory(path: string): Promise<boolean>;
635
+ declare function size(path: string): Promise<number>;
575
636
  /**
576
637
  * Moves a file.
577
638
  * @param src {string} File to be moved.
@@ -615,6 +676,7 @@ declare const file_remove: typeof remove;
615
676
  declare const file_rmdir: typeof rmdir;
616
677
  declare const file_mkTmpDir: typeof mkTmpDir;
617
678
  declare const file_isDirectory: typeof isDirectory;
679
+ declare const file_size: typeof size;
618
680
  declare const file_move: typeof move;
619
681
  declare const file_chmod: typeof chmod;
620
682
  declare const file_hasExecutablePermissions: typeof hasExecutablePermissions;
@@ -634,6 +696,7 @@ declare namespace file {
634
696
  file_rmdir as rmdir,
635
697
  file_mkTmpDir as mkTmpDir,
636
698
  file_isDirectory as isDirectory,
699
+ file_size as size,
637
700
  file_move as move,
638
701
  file_chmod as chmod,
639
702
  file_hasExecutablePermissions as hasExecutablePermissions,
@@ -643,20 +706,30 @@ declare namespace file {
643
706
  }
644
707
 
645
708
  declare const factory: simple_git.SimpleGitFactory;
709
+ declare const GitNotPresentError: () => Abort;
646
710
  declare function initializeRepository(directory: string): Promise<void>;
647
711
  declare function downloadRepository({ repoUrl, destination }: {
648
712
  repoUrl: string;
649
713
  destination: string;
650
714
  }): Promise<void>;
715
+ /**
716
+ * If "git" is not present in the environment it throws
717
+ * an abort error.
718
+ */
719
+ declare function ensurePresentOrAbort(): Promise<void>;
651
720
 
652
721
  declare const git_factory: typeof factory;
722
+ declare const git_GitNotPresentError: typeof GitNotPresentError;
653
723
  declare const git_initializeRepository: typeof initializeRepository;
654
724
  declare const git_downloadRepository: typeof downloadRepository;
725
+ declare const git_ensurePresentOrAbort: typeof ensurePresentOrAbort;
655
726
  declare namespace git {
656
727
  export {
657
728
  git_factory as factory,
729
+ git_GitNotPresentError as GitNotPresentError,
658
730
  git_initializeRepository as initializeRepository,
659
731
  git_downloadRepository as downloadRepository,
732
+ git_ensurePresentOrAbort as ensurePresentOrAbort,
660
733
  };
661
734
  }
662
735
 
@@ -685,15 +758,25 @@ declare function parseRepoUrl(src: string): {
685
758
  ssh: string;
686
759
  http: string;
687
760
  };
761
+ interface GithubRepoReference {
762
+ repoBaseUrl: string;
763
+ branch?: string;
764
+ filePath?: string;
765
+ }
766
+ declare function parseGithubRepoReference(src: string): GithubRepoReference;
688
767
 
689
768
  type github_GithubRelease = GithubRelease;
690
769
  declare const github_getLatestRelease: typeof getLatestRelease;
691
770
  declare const github_parseRepoUrl: typeof parseRepoUrl;
771
+ type github_GithubRepoReference = GithubRepoReference;
772
+ declare const github_parseGithubRepoReference: typeof parseGithubRepoReference;
692
773
  declare namespace github {
693
774
  export {
694
775
  github_GithubRelease as GithubRelease,
695
776
  github_getLatestRelease as getLatestRelease,
696
777
  github_parseRepoUrl as parseRepoUrl,
778
+ github_GithubRepoReference as GithubRepoReference,
779
+ github_parseGithubRepoReference as parseGithubRepoReference,
697
780
  };
698
781
  }
699
782
 
@@ -781,6 +864,11 @@ declare function isUnitTest(env?: NodeJS.ProcessEnv): boolean;
781
864
  * @returns true unless SHOPIFY_CLI_NO_ANALYTICS is truthy.
782
865
  */
783
866
  declare function analyticsDisabled(env?: NodeJS.ProcessEnv): boolean;
867
+ /**
868
+ * Returns whether the environment has Git available.
869
+ * @returns {Promise<boolean>} A promise that resolves with the value.
870
+ */
871
+ declare function hasGit(): Promise<boolean>;
784
872
 
785
873
  declare const local_isTerminalInteractive: typeof isTerminalInteractive;
786
874
  declare const local_homeDirectory: typeof homeDirectory;
@@ -789,6 +877,7 @@ declare const local_isVerbose: typeof isVerbose;
789
877
  declare const local_isShopify: typeof isShopify;
790
878
  declare const local_isUnitTest: typeof isUnitTest;
791
879
  declare const local_analyticsDisabled: typeof analyticsDisabled;
880
+ declare const local_hasGit: typeof hasGit;
792
881
  declare namespace local {
793
882
  export {
794
883
  local_isTerminalInteractive as isTerminalInteractive,
@@ -798,6 +887,7 @@ declare namespace local {
798
887
  local_isShopify as isShopify,
799
888
  local_isUnitTest as isUnitTest,
800
889
  local_analyticsDisabled as analyticsDisabled,
890
+ local_hasGit as hasGit,
801
891
  };
802
892
  }
803
893
 
@@ -1135,16 +1225,28 @@ interface FindOrganizationQuerySchema {
1135
1225
  };
1136
1226
  }
1137
1227
 
1138
- interface AllOrganizationsQuerySchema {
1139
- organizations: {
1228
+ interface AllOrganizationsQuerySchemaOrganization {
1229
+ id: string;
1230
+ businessName: string;
1231
+ website: string;
1232
+ appsNext: boolean;
1233
+ apps: {
1140
1234
  nodes: {
1141
1235
  id: string;
1142
- businessName: string;
1143
- website: string;
1144
- appsNext: boolean;
1236
+ title: string;
1237
+ apiKey: string;
1238
+ apiSecretKeys: {
1239
+ secret: string;
1240
+ }[];
1241
+ appType: string;
1145
1242
  }[];
1146
1243
  };
1147
1244
  }
1245
+ interface AllOrganizationsQuerySchema {
1246
+ organizations: {
1247
+ nodes: AllOrganizationsQuerySchemaOrganization[];
1248
+ };
1249
+ }
1148
1250
  declare const AllOrganizationsQuery: string;
1149
1251
 
1150
1252
  declare const CreateAppQuery: string;
@@ -1203,10 +1305,9 @@ interface FindAppQuerySchema {
1203
1305
  };
1204
1306
  }
1205
1307
 
1206
- declare const UpdateDraftMutation: string;
1308
+ declare const ExtensionUpdateDraftMutation: string;
1207
1309
  interface ExtensionUpdateDraftInput {
1208
1310
  apiKey: string;
1209
- clientMutationId: string;
1210
1311
  config: string;
1211
1312
  context: string | undefined;
1212
1313
  registrationId: string;
@@ -1234,6 +1335,9 @@ interface ExtensionVersion {
1234
1335
  }[];
1235
1336
  versionTag: string;
1236
1337
  }
1338
+ interface ExtensionUpdateSchema {
1339
+ extensionUpdateDraft: ExtensionUpdateDraftPayload;
1340
+ }
1237
1341
 
1238
1342
  declare const GenerateSignedUploadUrl: string;
1239
1343
  interface GenerateSignedUploadUrlVariables {
@@ -1447,9 +1551,9 @@ interface AppFunctionSetVariables {
1447
1551
  force?: boolean;
1448
1552
  schemaMajorVersion?: string;
1449
1553
  schemaMinorVersion?: string;
1450
- scriptConfigVersion: string;
1554
+ scriptConfigVersion?: string;
1451
1555
  configurationUi: boolean;
1452
- configurationDefinition: string;
1556
+ configurationDefinition?: string;
1453
1557
  moduleUploadUrl: string;
1454
1558
  library?: {
1455
1559
  language: string;
@@ -1464,6 +1568,7 @@ interface AppFunctionSetVariables {
1464
1568
 
1465
1569
  declare const index_FindOrganizationQuery: typeof FindOrganizationQuery;
1466
1570
  type index_FindOrganizationQuerySchema = FindOrganizationQuerySchema;
1571
+ type index_AllOrganizationsQuerySchemaOrganization = AllOrganizationsQuerySchemaOrganization;
1467
1572
  type index_AllOrganizationsQuerySchema = AllOrganizationsQuerySchema;
1468
1573
  declare const index_AllOrganizationsQuery: typeof AllOrganizationsQuery;
1469
1574
  declare const index_CreateAppQuery: typeof CreateAppQuery;
@@ -1474,10 +1579,11 @@ type index_UpdateURLsQueryVariables = UpdateURLsQueryVariables;
1474
1579
  type index_UpdateURLsQuerySchema = UpdateURLsQuerySchema;
1475
1580
  declare const index_FindAppQuery: typeof FindAppQuery;
1476
1581
  type index_FindAppQuerySchema = FindAppQuerySchema;
1477
- declare const index_UpdateDraftMutation: typeof UpdateDraftMutation;
1582
+ declare const index_ExtensionUpdateDraftMutation: typeof ExtensionUpdateDraftMutation;
1478
1583
  type index_ExtensionUpdateDraftInput = ExtensionUpdateDraftInput;
1479
1584
  type index_ExtensionUpdateDraftPayload = ExtensionUpdateDraftPayload;
1480
1585
  type index_ExtensionVersion = ExtensionVersion;
1586
+ type index_ExtensionUpdateSchema = ExtensionUpdateSchema;
1481
1587
  declare const index_GenerateSignedUploadUrl: typeof GenerateSignedUploadUrl;
1482
1588
  type index_GenerateSignedUploadUrlVariables = GenerateSignedUploadUrlVariables;
1483
1589
  type index_GenerateSignedUploadUrlSchema = GenerateSignedUploadUrlSchema;
@@ -1513,6 +1619,7 @@ declare namespace index {
1513
1619
  export {
1514
1620
  index_FindOrganizationQuery as FindOrganizationQuery,
1515
1621
  index_FindOrganizationQuerySchema as FindOrganizationQuerySchema,
1622
+ index_AllOrganizationsQuerySchemaOrganization as AllOrganizationsQuerySchemaOrganization,
1516
1623
  index_AllOrganizationsQuerySchema as AllOrganizationsQuerySchema,
1517
1624
  index_AllOrganizationsQuery as AllOrganizationsQuery,
1518
1625
  index_CreateAppQuery as CreateAppQuery,
@@ -1523,10 +1630,11 @@ declare namespace index {
1523
1630
  index_UpdateURLsQuerySchema as UpdateURLsQuerySchema,
1524
1631
  index_FindAppQuery as FindAppQuery,
1525
1632
  index_FindAppQuerySchema as FindAppQuerySchema,
1526
- index_UpdateDraftMutation as UpdateDraftMutation,
1633
+ index_ExtensionUpdateDraftMutation as ExtensionUpdateDraftMutation,
1527
1634
  index_ExtensionUpdateDraftInput as ExtensionUpdateDraftInput,
1528
1635
  index_ExtensionUpdateDraftPayload as ExtensionUpdateDraftPayload,
1529
1636
  index_ExtensionVersion as ExtensionVersion,
1637
+ index_ExtensionUpdateSchema as ExtensionUpdateSchema,
1530
1638
  index_GenerateSignedUploadUrl as GenerateSignedUploadUrl,
1531
1639
  index_GenerateSignedUploadUrlVariables as GenerateSignedUploadUrlVariables,
1532
1640
  index_GenerateSignedUploadUrlSchema as GenerateSignedUploadUrlSchema,
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
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';
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-3f7f30b9.js';
2
2
  import 'assert';
3
3
  import 'events';
4
4
  import 'readline';
@@ -25,6 +25,7 @@ import 'tty';
25
25
  import 'stacktracey';
26
26
  import '@oclif/core';
27
27
  import 'source-map-support';
28
+ import 'inquirer';
28
29
  import 'module';
29
30
  import 'node:http';
30
31
  import 'node:https';
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-3f46deaa.js';
3
+ import { F as FormData, a as File } from './index-3f7f30b9.js';
4
4
  import 'assert';
5
5
  import 'events';
6
6
  import 'readline';
@@ -25,6 +25,7 @@ import 'tty';
25
25
  import 'stacktracey';
26
26
  import '@oclif/core';
27
27
  import 'source-map-support';
28
+ import 'inquirer';
28
29
  import 'module';
29
30
  import 'node:http';
30
31
  import 'node:https';
@@ -472,4 +473,4 @@ async function toFormData(Body, ct) {
472
473
  }
473
474
 
474
475
  export { toFormData };
475
- //# sourceMappingURL=multipart-parser-31f44703.js.map
476
+ //# sourceMappingURL=multipart-parser-cc9089c4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multipart-parser-cc9089c4.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,CA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C;AAClC,EAAE,WAAW,GAAG,WAAW,CAAC,WAAW,EAAE,CAAC;AAC1C;AACA,EAAE,IAAI,WAAW,KAAK,qBAAqB,EAAE;AAC7C;AACA,GAAG,MAAM,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,mDAAmD,CAAC,CAAC;AACpF;AACA,GAAG,IAAI,CAAC,EAAE;AACV,IAAI,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AACnC,IAAI;AACJ;AACA,GAAG,QAAQ,GAAG,SAAS,CAAC,WAAW,CAAC,CAAC;AACrC;AACA,GAAG,IAAI,QAAQ,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.14",
3
+ "version": "3.0.17",
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": [
@@ -50,8 +50,9 @@
50
50
  "win32"
51
51
  ],
52
52
  "dependencies": {
53
- "@oclif/core": "1.9.0",
53
+ "@oclif/core": "^1.0",
54
54
  "envfile": "^6.17.0",
55
+ "inquirer": "^8.2.4",
55
56
  "keytar": "^7.9.0",
56
57
  "open": "^8.4.0",
57
58
  "prettier": "^2.6.2",
@@ -61,6 +62,7 @@
61
62
  "devDependencies": {
62
63
  "@iarna/toml": "^2.2.5",
63
64
  "@types/cross-zip": "^4.0.0",
65
+ "@types/inquirer": "^8.2.1",
64
66
  "@types/js-yaml": "^4.0.5",
65
67
  "@types/semver": "^7.3.9",
66
68
  "abort-controller": "^3.0.0",