@shopify/cli-kit 3.0.14 → 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 +7 -0
- package/dist/{index-3f46deaa.js → index-f32e5d27.js} +103 -24
- package/dist/index-f32e5d27.js.map +1 -0
- package/dist/index.d.ts +65 -5
- package/dist/index.js +1 -1
- package/dist/{multipart-parser-31f44703.js → multipart-parser-ac67c8ac.js} +2 -2
- package/dist/{multipart-parser-31f44703.js.map → multipart-parser-ac67c8ac.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-3f46deaa.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,7 @@ import require$$0$2 from 'readline';
|
|
|
4
4
|
import require$$0$5, { sep as sep$1, extname as extname$1, resolve as resolve$4, dirname as dirname$2 } from 'path';
|
|
5
5
|
import path$I from 'node:path';
|
|
6
6
|
import url$1, { fileURLToPath, pathToFileURL, format as format$6 } from 'node:url';
|
|
7
|
-
import process$2, { platform as platform$
|
|
7
|
+
import process$2, { platform as platform$2 } from 'node:process';
|
|
8
8
|
import fs$L, { promises } from 'node:fs';
|
|
9
9
|
import require$$1$2, { constants as constants$8, EOL, networkInterfaces } from 'os';
|
|
10
10
|
import require$$0$6, { promisify as promisify$7 } from 'util';
|
|
@@ -12321,7 +12321,7 @@ var path$w = /*#__PURE__*/Object.freeze({
|
|
|
12321
12321
|
});
|
|
12322
12322
|
|
|
12323
12323
|
var name = "@shopify/cli-kit";
|
|
12324
|
-
var version$2 = "3.0.
|
|
12324
|
+
var version$2 = "3.0.15";
|
|
12325
12325
|
var description$1 = "A set of utilities, interfaces, and models that are common across all the platform features";
|
|
12326
12326
|
var keywords = [
|
|
12327
12327
|
"shopify",
|
|
@@ -14774,7 +14774,7 @@ var constants$1 = require$$0$b;
|
|
|
14774
14774
|
var origCwd = process.cwd;
|
|
14775
14775
|
var cwd = null;
|
|
14776
14776
|
|
|
14777
|
-
var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
|
|
14777
|
+
var platform$1 = process.env.GRACEFUL_FS_PLATFORM || process.platform;
|
|
14778
14778
|
|
|
14779
14779
|
process.cwd = function() {
|
|
14780
14780
|
if (!cwd)
|
|
@@ -14864,7 +14864,7 @@ function patch$2 (fs) {
|
|
|
14864
14864
|
// failures. Also, take care to yield the scheduler. Windows scheduling gives
|
|
14865
14865
|
// CPU to a busy looping process, which can cause the program causing the lock
|
|
14866
14866
|
// contention to be starved of CPU by node, so the contention doesn't resolve.
|
|
14867
|
-
if (platform === "win32") {
|
|
14867
|
+
if (platform$1 === "win32") {
|
|
14868
14868
|
fs.rename = typeof fs.rename !== 'function' ? fs.rename
|
|
14869
14869
|
: (function (fs$rename) {
|
|
14870
14870
|
function rename (from, to, cb) {
|
|
@@ -25088,12 +25088,15 @@ var wrapAnsi_1 = (string, columns, options) => {
|
|
|
25088
25088
|
.join('\n');
|
|
25089
25089
|
};
|
|
25090
25090
|
|
|
25091
|
-
const
|
|
25092
|
-
|
|
25091
|
+
const {
|
|
25092
|
+
env: env$1 = {},
|
|
25093
|
+
argv = [],
|
|
25094
|
+
platform = "",
|
|
25095
|
+
} = typeof process === "undefined" ? {} : process;
|
|
25093
25096
|
|
|
25094
25097
|
const isDisabled = "NO_COLOR" in env$1 || argv.includes("--no-color");
|
|
25095
25098
|
const isForced = "FORCE_COLOR" in env$1 || argv.includes("--color");
|
|
25096
|
-
const isWindows =
|
|
25099
|
+
const isWindows = platform === "win32";
|
|
25097
25100
|
const isDumbTerminal = env$1.TERM === "dumb";
|
|
25098
25101
|
|
|
25099
25102
|
const isCompatibleTerminal =
|
|
@@ -25104,7 +25107,8 @@ const isCI =
|
|
|
25104
25107
|
("GITHUB_ACTIONS" in env$1 || "GITLAB_CI" in env$1 || "CIRCLECI" in env$1);
|
|
25105
25108
|
|
|
25106
25109
|
const isColorSupported =
|
|
25107
|
-
!isDisabled &&
|
|
25110
|
+
!isDisabled &&
|
|
25111
|
+
(isForced || (isWindows && !isDumbTerminal) || isCompatibleTerminal || isCI);
|
|
25108
25112
|
|
|
25109
25113
|
const replaceClose = (
|
|
25110
25114
|
index,
|
|
@@ -40840,7 +40844,7 @@ class Body$1 {
|
|
|
40840
40844
|
return formData;
|
|
40841
40845
|
}
|
|
40842
40846
|
|
|
40843
|
-
const {toFormData} = await import('./multipart-parser-
|
|
40847
|
+
const {toFormData} = await import('./multipart-parser-ac67c8ac.js');
|
|
40844
40848
|
return toFormData(this.body, ct);
|
|
40845
40849
|
}
|
|
40846
40850
|
|
|
@@ -42291,7 +42295,9 @@ async function fetch$4(url, options_) {
|
|
|
42291
42295
|
});
|
|
42292
42296
|
|
|
42293
42297
|
fixResponseChunkedTransferBadEnding(request_, error => {
|
|
42294
|
-
response.body
|
|
42298
|
+
if (response && response.body) {
|
|
42299
|
+
response.body.destroy(error);
|
|
42300
|
+
}
|
|
42295
42301
|
});
|
|
42296
42302
|
|
|
42297
42303
|
/* c8 ignore next 18 */
|
|
@@ -54764,11 +54770,26 @@ function parseRepoUrl(src) {
|
|
|
54764
54770
|
const http = `https://${normalizedSite}/${user}/${name}`;
|
|
54765
54771
|
return { site: normalizedSite, user, name, ref, subDirectory, ssh, http };
|
|
54766
54772
|
}
|
|
54773
|
+
function parseGithubRepoReference(src) {
|
|
54774
|
+
const url = new URL(src);
|
|
54775
|
+
if (url.origin !== "https://github.com") {
|
|
54776
|
+
throw new Abort("Only GitHub repository references are supported.");
|
|
54777
|
+
}
|
|
54778
|
+
const branch = url.hash ? url.hash.slice(1) : void 0;
|
|
54779
|
+
const [_, user, repo, ...repoPath] = url.pathname.split("/");
|
|
54780
|
+
const filePath = repoPath.length > 0 ? repoPath.join("/") : void 0;
|
|
54781
|
+
return {
|
|
54782
|
+
repoBaseUrl: `${url.origin}/${user}/${repo}`,
|
|
54783
|
+
branch,
|
|
54784
|
+
filePath
|
|
54785
|
+
};
|
|
54786
|
+
}
|
|
54767
54787
|
|
|
54768
54788
|
var github = /*#__PURE__*/Object.freeze({
|
|
54769
54789
|
__proto__: null,
|
|
54770
54790
|
getLatestRelease: getLatestRelease,
|
|
54771
|
-
parseRepoUrl: parseRepoUrl
|
|
54791
|
+
parseRepoUrl: parseRepoUrl,
|
|
54792
|
+
parseGithubRepoReference: parseGithubRepoReference
|
|
54772
54793
|
});
|
|
54773
54794
|
|
|
54774
54795
|
var distWeb = {exports: {}};
|
|
@@ -67398,6 +67419,14 @@ var semver = /*#__PURE__*/Object.freeze({
|
|
|
67398
67419
|
coerce: coerce_1
|
|
67399
67420
|
});
|
|
67400
67421
|
|
|
67422
|
+
const genericConfigurationFileNames = {
|
|
67423
|
+
yarn: {
|
|
67424
|
+
lockfile: "yarn.lock"
|
|
67425
|
+
},
|
|
67426
|
+
pnpm: {
|
|
67427
|
+
lockfile: "pnpm-lock.yaml"
|
|
67428
|
+
}
|
|
67429
|
+
};
|
|
67401
67430
|
const dependencyManager = ["yarn", "npm", "pnpm"];
|
|
67402
67431
|
const PackageJsonNotFoundError = (directory) => {
|
|
67403
67432
|
return new Abort(`The directory ${directory} doesn't have a package.json.`);
|
|
@@ -67411,6 +67440,17 @@ function dependencyManagerUsedForCreating(env = process.env) {
|
|
|
67411
67440
|
return "npm";
|
|
67412
67441
|
}
|
|
67413
67442
|
}
|
|
67443
|
+
async function getDependencyManager(directory) {
|
|
67444
|
+
const yarnLockPath = join$3(directory, genericConfigurationFileNames.yarn.lockfile);
|
|
67445
|
+
const pnpmLockPath = join$3(directory, genericConfigurationFileNames.pnpm.lockfile);
|
|
67446
|
+
if (await exists$1(yarnLockPath)) {
|
|
67447
|
+
return "yarn";
|
|
67448
|
+
} else if (await exists$1(pnpmLockPath)) {
|
|
67449
|
+
return "pnpm";
|
|
67450
|
+
} else {
|
|
67451
|
+
return "npm";
|
|
67452
|
+
}
|
|
67453
|
+
}
|
|
67414
67454
|
async function installNPMDependenciesRecursively(options) {
|
|
67415
67455
|
const packageJsons = await out(join$3(options.directory, "**/package.json"), {
|
|
67416
67456
|
ignore: [join$3(options.directory, "node_modules/**/package.json")],
|
|
@@ -67496,6 +67536,9 @@ async function addNPMDependenciesIfNeeded(dependencies, options) {
|
|
|
67496
67536
|
signal: options.signal
|
|
67497
67537
|
});
|
|
67498
67538
|
}
|
|
67539
|
+
async function addLatestNPMDependencies(dependencies, options) {
|
|
67540
|
+
await addNPMDependenciesIfNeeded(dependencies.map((dependency) => `${dependency}@latest`), options);
|
|
67541
|
+
}
|
|
67499
67542
|
function argumentsToAddDependenciesWithNPM(dependencies, type) {
|
|
67500
67543
|
let command = ["install"];
|
|
67501
67544
|
command = command.concat(dependencies);
|
|
@@ -67547,16 +67590,20 @@ function argumentsToAddDependenciesWithPNPM(dependencies, type) {
|
|
|
67547
67590
|
|
|
67548
67591
|
var dependency = /*#__PURE__*/Object.freeze({
|
|
67549
67592
|
__proto__: null,
|
|
67593
|
+
genericConfigurationFileNames: genericConfigurationFileNames,
|
|
67550
67594
|
dependencyManager: dependencyManager,
|
|
67551
67595
|
PackageJsonNotFoundError: PackageJsonNotFoundError,
|
|
67552
67596
|
dependencyManagerUsedForCreating: dependencyManagerUsedForCreating,
|
|
67597
|
+
getDependencyManager: getDependencyManager,
|
|
67553
67598
|
installNPMDependenciesRecursively: installNPMDependenciesRecursively,
|
|
67554
67599
|
install: install,
|
|
67555
67600
|
getPackageName: getPackageName,
|
|
67556
67601
|
getDependencies: getDependencies,
|
|
67557
67602
|
checkForNewVersion: checkForNewVersion,
|
|
67558
67603
|
getOutputUpdateCLIReminder: getOutputUpdateCLIReminder,
|
|
67559
|
-
|
|
67604
|
+
packageJSONContents: packageJSONContents,
|
|
67605
|
+
addNPMDependenciesIfNeeded: addNPMDependenciesIfNeeded,
|
|
67606
|
+
addLatestNPMDependencies: addLatestNPMDependencies
|
|
67560
67607
|
});
|
|
67561
67608
|
|
|
67562
67609
|
const getEnvironmentVariable = () => {
|
|
@@ -67572,7 +67619,7 @@ const getUsernameFromOsUserInfo = () => {
|
|
|
67572
67619
|
};
|
|
67573
67620
|
const cleanWindowsCommand = (value) => value.replace(/^.*\\/, "");
|
|
67574
67621
|
const makeUsernameFromId = (userId) => `no-username-${userId}`;
|
|
67575
|
-
const username = async (platform = platform$
|
|
67622
|
+
const username = async (platform = platform$2) => {
|
|
67576
67623
|
const environmentVariable = getEnvironmentVariable();
|
|
67577
67624
|
if (environmentVariable) {
|
|
67578
67625
|
return environmentVariable;
|
|
@@ -67597,7 +67644,7 @@ const username = async (platform = platform$1) => {
|
|
|
67597
67644
|
return null;
|
|
67598
67645
|
}
|
|
67599
67646
|
};
|
|
67600
|
-
const platformAndArch = (platform = platform$
|
|
67647
|
+
const platformAndArch = (platform = platform$2) => {
|
|
67601
67648
|
let arch$1 = arch();
|
|
67602
67649
|
if (arch$1 === "x64") {
|
|
67603
67650
|
arch$1 = "amd64";
|
|
@@ -155201,6 +155248,17 @@ const AllOrganizationsQuery = dist$3.gql`
|
|
|
155201
155248
|
businessName
|
|
155202
155249
|
website
|
|
155203
155250
|
appsNext
|
|
155251
|
+
apps {
|
|
155252
|
+
nodes {
|
|
155253
|
+
id
|
|
155254
|
+
title
|
|
155255
|
+
apiKey
|
|
155256
|
+
apiSecretKeys {
|
|
155257
|
+
secret
|
|
155258
|
+
}
|
|
155259
|
+
appType
|
|
155260
|
+
}
|
|
155261
|
+
}
|
|
155204
155262
|
}
|
|
155205
155263
|
}
|
|
155206
155264
|
}
|
|
@@ -155300,7 +155358,7 @@ const GenerateSignedUploadUrl = dist$3.gql`
|
|
|
155300
155358
|
`;
|
|
155301
155359
|
|
|
155302
155360
|
const CreateDeployment = dist$3.gql`
|
|
155303
|
-
mutation CreateDeployment($apiKey: String!, $uuid: String!, $bundleUrl: String!, $extensions: [ExtensionSettings!]) {
|
|
155361
|
+
mutation CreateDeployment($apiKey: String!, $uuid: String!, $bundleUrl: String!, $extensions: [ExtensionSettings!]!) {
|
|
155304
155362
|
deploymentCreate(input: {apiKey: $apiKey, uuid: $uuid, bundleUrl: $bundleUrl, extensions: $extensions}) {
|
|
155305
155363
|
deployment {
|
|
155306
155364
|
uuid
|
|
@@ -174244,6 +174302,8 @@ var checksum = /*#__PURE__*/Object.freeze({
|
|
|
174244
174302
|
const RubyCLIVersion = "2.16.0";
|
|
174245
174303
|
const ThemeCheckVersion = "1.10.2";
|
|
174246
174304
|
const MinBundlerVersion = "2.3.8";
|
|
174305
|
+
const MinRubyVersion = "2.3.0";
|
|
174306
|
+
const MinRubyGemVersion = "2.5.0";
|
|
174247
174307
|
async function execCLI(args, adminSession) {
|
|
174248
174308
|
await installCLIDependencies();
|
|
174249
174309
|
const env = {
|
|
@@ -174323,23 +174383,42 @@ async function installCLIDependencies() {
|
|
|
174323
174383
|
await list.run();
|
|
174324
174384
|
}
|
|
174325
174385
|
async function validateRubyEnv() {
|
|
174386
|
+
await validateRuby();
|
|
174387
|
+
await validateRubyGems();
|
|
174388
|
+
await validateBundler();
|
|
174389
|
+
}
|
|
174390
|
+
async function validateRuby() {
|
|
174391
|
+
let version2;
|
|
174326
174392
|
try {
|
|
174327
|
-
await
|
|
174393
|
+
const stdout = await captureOutput("ruby", ["-v"]);
|
|
174394
|
+
version2 = coerce_1(stdout);
|
|
174328
174395
|
} catch {
|
|
174329
|
-
throw new Abort("Ruby environment not found",
|
|
174396
|
+
throw new Abort("Ruby environment not found", `Make sure you have Ruby installed on your system: ${content`${token.link("", "https://www.ruby-lang.org/en/documentation/installation/")}`.value}`);
|
|
174397
|
+
}
|
|
174398
|
+
const isValid = version2?.compare(MinRubyVersion);
|
|
174399
|
+
if (isValid === -1 || isValid === void 0) {
|
|
174400
|
+
throw new Abort(`Ruby version ${content`${token.yellow(version2.raw)}`.value} is not supported`, `Make sure you have at least Ruby ${content`${token.yellow(MinRubyVersion)}`.value} installed on your system: ${content`${token.link("", "https://www.ruby-lang.org/en/documentation/installation/")}`.value}`);
|
|
174330
174401
|
}
|
|
174331
|
-
|
|
174332
|
-
|
|
174402
|
+
}
|
|
174403
|
+
async function validateRubyGems() {
|
|
174404
|
+
const stdout = await captureOutput("gem", ["-v"]);
|
|
174405
|
+
const version2 = coerce_1(stdout);
|
|
174406
|
+
const isValid = version2?.compare(MinRubyGemVersion);
|
|
174333
174407
|
if (isValid === -1 || isValid === void 0) {
|
|
174334
|
-
throw new Abort(`
|
|
174408
|
+
throw new Abort(`RubyGems version ${content`${token.yellow(version2.raw)}`.value} is not supported`, `To update to the latest version of RubyGems, run ${content`${token.genericShellCommand("gem update --system")}`.value}`);
|
|
174335
174409
|
}
|
|
174336
174410
|
}
|
|
174337
|
-
async function
|
|
174411
|
+
async function validateBundler() {
|
|
174412
|
+
let version2;
|
|
174338
174413
|
try {
|
|
174339
174414
|
const stdout = await captureOutput("bundler", ["-v"]);
|
|
174340
|
-
|
|
174415
|
+
version2 = coerce_1(stdout);
|
|
174341
174416
|
} catch {
|
|
174342
|
-
throw new Abort("Bundler not found",
|
|
174417
|
+
throw new Abort("Bundler not found", `To install the latest version of Bundler, run ${content`${token.genericShellCommand("gem install bundler")}`.value}`);
|
|
174418
|
+
}
|
|
174419
|
+
const isValid = version2?.compare(MinBundlerVersion);
|
|
174420
|
+
if (isValid === -1 || isValid === void 0) {
|
|
174421
|
+
throw new Abort(`Bundler version ${content`${token.yellow(version2.raw)}`.value} is not supported`, `To update to the latest version of Bundler, run ${content`${token.genericShellCommand("gem install bundler")}`.value}`);
|
|
174343
174422
|
}
|
|
174344
174423
|
}
|
|
174345
174424
|
function createShopifyCLIWorkingDirectory() {
|
|
@@ -174729,4 +174808,4 @@ var vscode = /*#__PURE__*/Object.freeze({
|
|
|
174729
174808
|
});
|
|
174730
174809
|
|
|
174731
174810
|
export { semver as A, npm as B, port as C, cli as D, id as E, FormData$3 as F, temporary as G, dotEnv as H, abort as I, constants$2 as J, plugins as K, vscode as L, File$1 as a, string as b, github as c, dependency as d, error$j as e, file$1 as f, git as g, haiku as h, os$2 as i, environment as j, session as k, schema$2 as l, toml as m, store as n, output as o, path$w as p, api as q, http$2 as r, system as s, template as t, ui as u, version$1 as v, archiver as w, checksum as x, yaml as y, ruby as z };
|
|
174732
|
-
//# sourceMappingURL=index-
|
|
174811
|
+
//# sourceMappingURL=index-f32e5d27.js.map
|