@shopify/cli-kit 3.0.12 → 3.0.15
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/CHANGELOG.md +22 -0
- package/dist/{index-26330ff1.js → index-f32e5d27.js} +26305 -26157
- package/dist/index-f32e5d27.js.map +1 -0
- package/dist/index.d.ts +92 -11
- package/dist/index.js +1 -1
- package/dist/{multipart-parser-ab287634.js → multipart-parser-ac67c8ac.js} +2 -2
- package/dist/{multipart-parser-ab287634.js.map → multipart-parser-ac67c8ac.js.map} +1 -1
- package/package.json +5 -4
- package/dist/index-26330ff1.js.map +0 -1
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';
|
|
@@ -69,6 +69,14 @@ declare namespace ui {
|
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
+
declare const genericConfigurationFileNames: {
|
|
73
|
+
readonly yarn: {
|
|
74
|
+
readonly lockfile: "yarn.lock";
|
|
75
|
+
};
|
|
76
|
+
readonly pnpm: {
|
|
77
|
+
readonly lockfile: "pnpm-lock.yaml";
|
|
78
|
+
};
|
|
79
|
+
};
|
|
72
80
|
declare const dependencyManager: readonly ["yarn", "npm", "pnpm"];
|
|
73
81
|
declare type DependencyManager = typeof dependencyManager[number];
|
|
74
82
|
declare const PackageJsonNotFoundError: (directory: string) => Abort;
|
|
@@ -78,6 +86,12 @@ declare const PackageJsonNotFoundError: (directory: string) => Abort;
|
|
|
78
86
|
* @returns The dependency manager
|
|
79
87
|
*/
|
|
80
88
|
declare function dependencyManagerUsedForCreating(env?: NodeJS.ProcessEnv): DependencyManager;
|
|
89
|
+
/**
|
|
90
|
+
* Returns the dependency manager used by an existing project.
|
|
91
|
+
* @param directory {string} The root directory of the project.
|
|
92
|
+
* @returns The dependency manager
|
|
93
|
+
*/
|
|
94
|
+
declare function getDependencyManager(directory: string): Promise<DependencyManager>;
|
|
81
95
|
interface InstallNPMDependenciesRecursivelyOptions {
|
|
82
96
|
/**
|
|
83
97
|
* The dependency manager to use to install the dependencies.
|
|
@@ -125,6 +139,17 @@ declare function getDependencies(packageJsonPath: string): Promise<{
|
|
|
125
139
|
}>;
|
|
126
140
|
declare function checkForNewVersion(dependency: string, currentVersion: string): Promise<string | undefined>;
|
|
127
141
|
declare function getOutputUpdateCLIReminder(dependencyManager: DependencyManager, packages?: string[]): string;
|
|
142
|
+
interface PackageJSONContents {
|
|
143
|
+
name: string;
|
|
144
|
+
version?: string;
|
|
145
|
+
dependencies?: {
|
|
146
|
+
[key: string]: string;
|
|
147
|
+
};
|
|
148
|
+
devDependencies?: {
|
|
149
|
+
[key: string]: string;
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
declare function packageJSONContents(packageJsonPath: string): Promise<PackageJSONContents>;
|
|
128
153
|
declare type DependencyType = 'dev' | 'prod' | 'peer';
|
|
129
154
|
interface AddNPMDependenciesIfNeededOptions {
|
|
130
155
|
/** How dependencies should be added */
|
|
@@ -146,31 +171,42 @@ interface AddNPMDependenciesIfNeededOptions {
|
|
|
146
171
|
* @param options {AddNPMDependenciesIfNeededOptions} Options for adding dependencies.
|
|
147
172
|
*/
|
|
148
173
|
declare function addNPMDependenciesIfNeeded(dependencies: string[], options: AddNPMDependenciesIfNeededOptions): Promise<void>;
|
|
174
|
+
declare function addLatestNPMDependencies(dependencies: string[], options: AddNPMDependenciesIfNeededOptions): Promise<void>;
|
|
149
175
|
|
|
176
|
+
declare const dependency_genericConfigurationFileNames: typeof genericConfigurationFileNames;
|
|
150
177
|
declare const dependency_dependencyManager: typeof dependencyManager;
|
|
151
178
|
type dependency_DependencyManager = DependencyManager;
|
|
152
179
|
declare const dependency_PackageJsonNotFoundError: typeof PackageJsonNotFoundError;
|
|
153
180
|
declare const dependency_dependencyManagerUsedForCreating: typeof dependencyManagerUsedForCreating;
|
|
181
|
+
declare const dependency_getDependencyManager: typeof getDependencyManager;
|
|
154
182
|
declare const dependency_installNPMDependenciesRecursively: typeof installNPMDependenciesRecursively;
|
|
155
183
|
declare const dependency_install: typeof install;
|
|
156
184
|
declare const dependency_getPackageName: typeof getPackageName;
|
|
157
185
|
declare const dependency_getDependencies: typeof getDependencies;
|
|
158
186
|
declare const dependency_checkForNewVersion: typeof checkForNewVersion;
|
|
159
187
|
declare const dependency_getOutputUpdateCLIReminder: typeof getOutputUpdateCLIReminder;
|
|
188
|
+
declare const dependency_packageJSONContents: typeof packageJSONContents;
|
|
189
|
+
type dependency_DependencyType = DependencyType;
|
|
160
190
|
declare const dependency_addNPMDependenciesIfNeeded: typeof addNPMDependenciesIfNeeded;
|
|
191
|
+
declare const dependency_addLatestNPMDependencies: typeof addLatestNPMDependencies;
|
|
161
192
|
declare namespace dependency {
|
|
162
193
|
export {
|
|
194
|
+
dependency_genericConfigurationFileNames as genericConfigurationFileNames,
|
|
163
195
|
dependency_dependencyManager as dependencyManager,
|
|
164
196
|
dependency_DependencyManager as DependencyManager,
|
|
165
197
|
dependency_PackageJsonNotFoundError as PackageJsonNotFoundError,
|
|
166
198
|
dependency_dependencyManagerUsedForCreating as dependencyManagerUsedForCreating,
|
|
199
|
+
dependency_getDependencyManager as getDependencyManager,
|
|
167
200
|
dependency_installNPMDependenciesRecursively as installNPMDependenciesRecursively,
|
|
168
201
|
dependency_install as install,
|
|
169
202
|
dependency_getPackageName as getPackageName,
|
|
170
203
|
dependency_getDependencies as getDependencies,
|
|
171
204
|
dependency_checkForNewVersion as checkForNewVersion,
|
|
172
205
|
dependency_getOutputUpdateCLIReminder as getOutputUpdateCLIReminder,
|
|
206
|
+
dependency_packageJSONContents as packageJSONContents,
|
|
207
|
+
dependency_DependencyType as DependencyType,
|
|
173
208
|
dependency_addNPMDependenciesIfNeeded as addNPMDependenciesIfNeeded,
|
|
209
|
+
dependency_addLatestNPMDependencies as addLatestNPMDependencies,
|
|
174
210
|
};
|
|
175
211
|
}
|
|
176
212
|
|
|
@@ -296,7 +332,7 @@ interface OutputProcess {
|
|
|
296
332
|
*
|
|
297
333
|
* @param processes {OutputProcess[]} A list of processes to run concurrently.
|
|
298
334
|
*/
|
|
299
|
-
declare function concurrent(processes: OutputProcess[]): Promise<void>;
|
|
335
|
+
declare function concurrent(processes: OutputProcess[], callback?: ((signal: AbortSignal) => void) | undefined): Promise<void>;
|
|
300
336
|
declare function unstyled(message: string): string;
|
|
301
337
|
declare function shouldDisplayColors(): boolean;
|
|
302
338
|
|
|
@@ -348,6 +384,8 @@ declare enum FatalErrorType {
|
|
|
348
384
|
AbortSilent = 1,
|
|
349
385
|
Bug = 2
|
|
350
386
|
}
|
|
387
|
+
declare class CancelExecution extends Error {
|
|
388
|
+
}
|
|
351
389
|
/**
|
|
352
390
|
* A fatal error represents an error shouldn't be rescued and that causes the execution to terminate.
|
|
353
391
|
* There shouldn't be code that catches fatal errors.
|
|
@@ -355,14 +393,14 @@ declare enum FatalErrorType {
|
|
|
355
393
|
declare abstract class Fatal extends Error {
|
|
356
394
|
tryMessage: string | null;
|
|
357
395
|
type: FatalErrorType;
|
|
358
|
-
constructor(message: Message, type: FatalErrorType, tryMessage?:
|
|
396
|
+
constructor(message: Message, type: FatalErrorType, tryMessage?: Message | null);
|
|
359
397
|
}
|
|
360
398
|
/**
|
|
361
399
|
* An abort error is a fatal error that shouldn't be reported as a bug.
|
|
362
400
|
* Those usually represent unexpected scenarios that we can't handle and that usually require some action from the developer
|
|
363
401
|
*/
|
|
364
402
|
declare class Abort extends Fatal {
|
|
365
|
-
constructor(message: Message, tryMessage?:
|
|
403
|
+
constructor(message: Message, tryMessage?: Message | null);
|
|
366
404
|
}
|
|
367
405
|
declare class AbortSilent extends Fatal {
|
|
368
406
|
constructor();
|
|
@@ -383,6 +421,8 @@ declare function mapper(error: Error): Promise<Error>;
|
|
|
383
421
|
declare function isFatal(error: Error): boolean;
|
|
384
422
|
declare function shouldReport(error: Error): boolean;
|
|
385
423
|
|
|
424
|
+
type error_CancelExecution = CancelExecution;
|
|
425
|
+
declare const error_CancelExecution: typeof CancelExecution;
|
|
386
426
|
type error_Fatal = Fatal;
|
|
387
427
|
declare const error_Fatal: typeof Fatal;
|
|
388
428
|
type error_Abort = Abort;
|
|
@@ -398,6 +438,7 @@ declare const error_shouldReport: typeof shouldReport;
|
|
|
398
438
|
declare const error_AbortSignal: typeof AbortSignal;
|
|
399
439
|
declare namespace error {
|
|
400
440
|
export {
|
|
441
|
+
error_CancelExecution as CancelExecution,
|
|
401
442
|
error_Fatal as Fatal,
|
|
402
443
|
error_Abort as Abort,
|
|
403
444
|
error_AbortSilent as AbortSilent,
|
|
@@ -428,7 +469,7 @@ declare const open: (url: string) => Promise<void>;
|
|
|
428
469
|
* @returns A promise that resolves with the aggregatted stdout of the command.
|
|
429
470
|
*/
|
|
430
471
|
declare const captureOutput: (command: string, args: string[], options?: ExecOptions) => Promise<string>;
|
|
431
|
-
declare const exec: (command: string, args: string[], options?: ExecOptions) => Promise<
|
|
472
|
+
declare const exec: (command: string, args: string[], options?: ExecOptions) => Promise<void>;
|
|
432
473
|
interface ConcurrentExecCommand {
|
|
433
474
|
prefix: string;
|
|
434
475
|
executable: string;
|
|
@@ -534,7 +575,8 @@ var path = /*#__PURE__*/_mergeNamespaces({
|
|
|
534
575
|
__proto__: null,
|
|
535
576
|
relativize: relativize,
|
|
536
577
|
findUp: findUp,
|
|
537
|
-
glob: fastGlob
|
|
578
|
+
glob: fastGlob,
|
|
579
|
+
pathToFileURL: pathToFileURL
|
|
538
580
|
}, [pathe]);
|
|
539
581
|
|
|
540
582
|
declare function stripUp(path: string, strip: number): string;
|
|
@@ -679,15 +721,25 @@ declare function parseRepoUrl(src: string): {
|
|
|
679
721
|
ssh: string;
|
|
680
722
|
http: string;
|
|
681
723
|
};
|
|
724
|
+
interface GithubRepoReference {
|
|
725
|
+
repoBaseUrl: string;
|
|
726
|
+
branch?: string;
|
|
727
|
+
filePath?: string;
|
|
728
|
+
}
|
|
729
|
+
declare function parseGithubRepoReference(src: string): GithubRepoReference;
|
|
682
730
|
|
|
683
731
|
type github_GithubRelease = GithubRelease;
|
|
684
732
|
declare const github_getLatestRelease: typeof getLatestRelease;
|
|
685
733
|
declare const github_parseRepoUrl: typeof parseRepoUrl;
|
|
734
|
+
type github_GithubRepoReference = GithubRepoReference;
|
|
735
|
+
declare const github_parseGithubRepoReference: typeof parseGithubRepoReference;
|
|
686
736
|
declare namespace github {
|
|
687
737
|
export {
|
|
688
738
|
github_GithubRelease as GithubRelease,
|
|
689
739
|
github_getLatestRelease as getLatestRelease,
|
|
690
740
|
github_parseRepoUrl as parseRepoUrl,
|
|
741
|
+
github_GithubRepoReference as GithubRepoReference,
|
|
742
|
+
github_parseGithubRepoReference as parseGithubRepoReference,
|
|
691
743
|
};
|
|
692
744
|
}
|
|
693
745
|
|
|
@@ -733,6 +785,11 @@ declare namespace os {
|
|
|
733
785
|
};
|
|
734
786
|
}
|
|
735
787
|
|
|
788
|
+
/**
|
|
789
|
+
* It returns true if the terminal is interactive.
|
|
790
|
+
* @returns {boolean} True if the terminal is interactive.
|
|
791
|
+
*/
|
|
792
|
+
declare function isTerminalInteractive(): boolean;
|
|
736
793
|
/**
|
|
737
794
|
* Returns the path to the user's home directory.
|
|
738
795
|
* @returns {string} The path to the user's home directory.
|
|
@@ -771,6 +828,7 @@ declare function isUnitTest(env?: NodeJS.ProcessEnv): boolean;
|
|
|
771
828
|
*/
|
|
772
829
|
declare function analyticsDisabled(env?: NodeJS.ProcessEnv): boolean;
|
|
773
830
|
|
|
831
|
+
declare const local_isTerminalInteractive: typeof isTerminalInteractive;
|
|
774
832
|
declare const local_homeDirectory: typeof homeDirectory;
|
|
775
833
|
declare const local_isDebug: typeof isDebug;
|
|
776
834
|
declare const local_isVerbose: typeof isVerbose;
|
|
@@ -779,6 +837,7 @@ declare const local_isUnitTest: typeof isUnitTest;
|
|
|
779
837
|
declare const local_analyticsDisabled: typeof analyticsDisabled;
|
|
780
838
|
declare namespace local {
|
|
781
839
|
export {
|
|
840
|
+
local_isTerminalInteractive as isTerminalInteractive,
|
|
782
841
|
local_homeDirectory as homeDirectory,
|
|
783
842
|
local_isDebug as isDebug,
|
|
784
843
|
local_isVerbose as isVerbose,
|
|
@@ -1069,6 +1128,12 @@ declare namespace admin {
|
|
|
1069
1128
|
}
|
|
1070
1129
|
|
|
1071
1130
|
declare function request<T>(query: RequestDocument, token: string, variables?: Variables): Promise<T>;
|
|
1131
|
+
/**
|
|
1132
|
+
* Check if the given token is revoked and no longer valid to interact with the Partners API.
|
|
1133
|
+
* @param token {string} - The token to check
|
|
1134
|
+
* @returns {Promise<boolean>} - True if the token is revoked, false otherwise
|
|
1135
|
+
*/
|
|
1136
|
+
declare function checkIfTokenIsRevoked(token: string): Promise<boolean>;
|
|
1072
1137
|
/**
|
|
1073
1138
|
* Function queries are proxied through the script service proxy.
|
|
1074
1139
|
* To execute a query, we encapsulate it inside another query (including the variables)
|
|
@@ -1083,10 +1148,12 @@ declare function request<T>(query: RequestDocument, token: string, variables?: V
|
|
|
1083
1148
|
declare function functionProxyRequest<T>(apiKey: string, query: unknown, token: string, variables?: unknown): Promise<T>;
|
|
1084
1149
|
|
|
1085
1150
|
declare const partners_request: typeof request;
|
|
1151
|
+
declare const partners_checkIfTokenIsRevoked: typeof checkIfTokenIsRevoked;
|
|
1086
1152
|
declare const partners_functionProxyRequest: typeof functionProxyRequest;
|
|
1087
1153
|
declare namespace partners {
|
|
1088
1154
|
export {
|
|
1089
1155
|
partners_request as request,
|
|
1156
|
+
partners_checkIfTokenIsRevoked as checkIfTokenIsRevoked,
|
|
1090
1157
|
partners_functionProxyRequest as functionProxyRequest,
|
|
1091
1158
|
};
|
|
1092
1159
|
}
|
|
@@ -1114,16 +1181,28 @@ interface FindOrganizationQuerySchema {
|
|
|
1114
1181
|
};
|
|
1115
1182
|
}
|
|
1116
1183
|
|
|
1117
|
-
interface
|
|
1118
|
-
|
|
1184
|
+
interface AllOrganizationsQuerySchemaOrganization {
|
|
1185
|
+
id: string;
|
|
1186
|
+
businessName: string;
|
|
1187
|
+
website: string;
|
|
1188
|
+
appsNext: boolean;
|
|
1189
|
+
apps: {
|
|
1119
1190
|
nodes: {
|
|
1120
1191
|
id: string;
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1192
|
+
title: string;
|
|
1193
|
+
apiKey: string;
|
|
1194
|
+
apiSecretKeys: {
|
|
1195
|
+
secret: string;
|
|
1196
|
+
}[];
|
|
1197
|
+
appType: string;
|
|
1124
1198
|
}[];
|
|
1125
1199
|
};
|
|
1126
1200
|
}
|
|
1201
|
+
interface AllOrganizationsQuerySchema {
|
|
1202
|
+
organizations: {
|
|
1203
|
+
nodes: AllOrganizationsQuerySchemaOrganization[];
|
|
1204
|
+
};
|
|
1205
|
+
}
|
|
1127
1206
|
declare const AllOrganizationsQuery: string;
|
|
1128
1207
|
|
|
1129
1208
|
declare const CreateAppQuery: string;
|
|
@@ -1443,6 +1522,7 @@ interface AppFunctionSetVariables {
|
|
|
1443
1522
|
|
|
1444
1523
|
declare const index_FindOrganizationQuery: typeof FindOrganizationQuery;
|
|
1445
1524
|
type index_FindOrganizationQuerySchema = FindOrganizationQuerySchema;
|
|
1525
|
+
type index_AllOrganizationsQuerySchemaOrganization = AllOrganizationsQuerySchemaOrganization;
|
|
1446
1526
|
type index_AllOrganizationsQuerySchema = AllOrganizationsQuerySchema;
|
|
1447
1527
|
declare const index_AllOrganizationsQuery: typeof AllOrganizationsQuery;
|
|
1448
1528
|
declare const index_CreateAppQuery: typeof CreateAppQuery;
|
|
@@ -1492,6 +1572,7 @@ declare namespace index {
|
|
|
1492
1572
|
export {
|
|
1493
1573
|
index_FindOrganizationQuery as FindOrganizationQuery,
|
|
1494
1574
|
index_FindOrganizationQuerySchema as FindOrganizationQuerySchema,
|
|
1575
|
+
index_AllOrganizationsQuerySchemaOrganization as AllOrganizationsQuerySchemaOrganization,
|
|
1495
1576
|
index_AllOrganizationsQuerySchema as AllOrganizationsQuerySchema,
|
|
1496
1577
|
index_AllOrganizationsQuery as AllOrganizationsQuery,
|
|
1497
1578
|
index_CreateAppQuery as CreateAppQuery,
|
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-
|
|
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-f32e5d27.js';
|
|
2
2
|
import 'assert';
|
|
3
3
|
import 'events';
|
|
4
4
|
import 'readline';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'node:fs';
|
|
2
2
|
import 'node:path';
|
|
3
|
-
import { F as FormData, a as File } from './index-
|
|
3
|
+
import { F as FormData, a as File } from './index-f32e5d27.js';
|
|
4
4
|
import 'assert';
|
|
5
5
|
import 'events';
|
|
6
6
|
import 'readline';
|
|
@@ -472,4 +472,4 @@ async function toFormData(Body, ct) {
|
|
|
472
472
|
}
|
|
473
473
|
|
|
474
474
|
export { toFormData };
|
|
475
|
-
//# sourceMappingURL=multipart-parser-
|
|
475
|
+
//# sourceMappingURL=multipart-parser-ac67c8ac.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multipart-parser-ab287634.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,EAAE,CAAC,IAAI,CAAC;AACtB,CAAC,CAAC;AACF;AACA,MAAM,EAAE,GAAG,EAAE,CAAC;AACd,MAAM,EAAE,GAAG,EAAE,CAAC;AACd,MAAM,KAAK,GAAG,EAAE,CAAC;AACj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AAK,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;;;;"}
|
|
1
|
+
{"version":3,"file":"multipart-parser-ac67c8ac.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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;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.
|
|
3
|
+
"version": "3.0.15",
|
|
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,9 +54,9 @@
|
|
|
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
|
-
"stacktracey": "^2.1.8"
|
|
59
|
-
"prettier": "^2.6.2"
|
|
59
|
+
"stacktracey": "^2.1.8"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@iarna/toml": "^2.2.5",
|
|
@@ -66,12 +66,12 @@
|
|
|
66
66
|
"abort-controller": "^3.0.0",
|
|
67
67
|
"ansi-colors": "^4.1.1",
|
|
68
68
|
"change-case": "^4.1.2",
|
|
69
|
+
"color-json": "^2.0.1",
|
|
69
70
|
"commondir": "^1.0.1",
|
|
70
71
|
"conf": "^10.1.2",
|
|
71
72
|
"cross-zip": "^4.0.0",
|
|
72
73
|
"del": "^6.0.0",
|
|
73
74
|
"enquirer": "^2.3.6",
|
|
74
|
-
"color-json": "^2.0.1",
|
|
75
75
|
"env-paths": "^3.0.0",
|
|
76
76
|
"execa": "^6.0.0",
|
|
77
77
|
"fast-glob": "^3.2.11",
|
|
@@ -83,6 +83,7 @@
|
|
|
83
83
|
"graphql": "^16.4.0",
|
|
84
84
|
"graphql-request": "^4.3.0",
|
|
85
85
|
"haikunator": "^2.1.2",
|
|
86
|
+
"is-interactive": "^2.0.0",
|
|
86
87
|
"js-yaml": "^4.1.0",
|
|
87
88
|
"latest-version": "^6.0.0",
|
|
88
89
|
"liquidjs": "^9.36.0",
|