@shopify/cli-kit 3.0.0 → 3.0.1

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # @shopify/cli-kit
2
2
 
3
+ ## 3.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - c01cd9a5: Supports updated template names from the hydrogen monorepo. The `parseRepoUrl` helper now includes the full `http` address in the returns object.
8
+ - 9d324502: Add locale configuration to checkout_ui_extensions
9
+
3
10
  ## 3.0.0
4
11
 
5
12
  ### Major Changes
@@ -12317,7 +12317,7 @@ var path$w = /*#__PURE__*/Object.freeze({
12317
12317
  });
12318
12318
 
12319
12319
  var name = "@shopify/cli-kit";
12320
- var version$4 = "3.0.0";
12320
+ var version$4 = "3.0.1";
12321
12321
  var description$1 = "A set of utilities, interfaces, and models that are common across all the platform features";
12322
12322
  var keywords = [
12323
12323
  "shopify",
@@ -12432,11 +12432,11 @@ var cliKitPackageJson = {
12432
12432
  devDependencies: devDependencies
12433
12433
  };
12434
12434
 
12435
- var version$3 = "3.0.0";
12435
+ var version$3 = "3.0.1";
12436
12436
 
12437
- var version$2 = "3.0.0";
12437
+ var version$2 = "3.0.1";
12438
12438
 
12439
- var version$1 = "3.0.0";
12439
+ var version$1 = "3.0.1";
12440
12440
 
12441
12441
  const homedir$1 = os$8.homedir();
12442
12442
  const tmpdir$1 = os$8.tmpdir();
@@ -40671,7 +40671,7 @@ class Body$1 {
40671
40671
  return formData;
40672
40672
  }
40673
40673
 
40674
- const {toFormData} = await import('./multipart-parser-e253e1bc.js');
40674
+ const {toFormData} = await import('./multipart-parser-9b32947f.js');
40675
40675
  return toFormData(this.body, ct);
40676
40676
  }
40677
40677
 
@@ -172518,9 +172518,10 @@ var semver = /*#__PURE__*/Object.freeze({
172518
172518
  });
172519
172519
 
172520
172520
  const RubyCLIVersion = "2.16.0";
172521
+ const ThemeCheckVersion = "1.10.2";
172521
172522
  const MinBundlerVersion = "2.3.8";
172522
172523
  async function execCLI(args, adminSession) {
172523
- await installDependencies();
172524
+ await installCLIDependencies();
172524
172525
  const env = {
172525
172526
  ...process.env,
172526
172527
  SHOPIFY_CLI_ADMIN_AUTH_TOKEN: adminSession?.token,
@@ -172529,21 +172530,69 @@ async function execCLI(args, adminSession) {
172529
172530
  spawn$1("bundle", ["exec", "shopify"].concat(args), {
172530
172531
  stdio: "inherit",
172531
172532
  shell: true,
172532
- cwd: rubyCLIPath(),
172533
+ cwd: shopifyCLIDirectory(),
172533
172534
  env
172534
172535
  });
172535
172536
  }
172536
- async function installDependencies() {
172537
- const exists = await exists$1(rubyCLIPath());
172538
- const renderer = isUnitTest() || exists ? "silent" : "default";
172537
+ async function execThemeCheckCLI({
172538
+ directories,
172539
+ args,
172540
+ stdout,
172541
+ stderr
172542
+ }) {
172543
+ await installThemeCheckCLIDependencies(stdout);
172544
+ const processes = directories.map(async (directory) => {
172545
+ const files = await out(join$3(directory, "/**/*"));
172546
+ const fileCount = files.filter((file2) => !file2.match(/\.toml$/)).length;
172547
+ if (fileCount === 0)
172548
+ return;
172549
+ const customStderr = new Writable$1({
172550
+ write(chunk, ...args2) {
172551
+ if (chunk.toString("ascii").match(/^Checking/)) {
172552
+ stdout.write(chunk, ...args2);
172553
+ } else {
172554
+ stderr.write(chunk, ...args2);
172555
+ }
172556
+ }
172557
+ });
172558
+ await exec$2("bundle", ["exec", "theme-check"].concat([directory, ...args || []]), {
172559
+ stdout,
172560
+ stderr: customStderr,
172561
+ cwd: themeCheckDirectory()
172562
+ });
172563
+ });
172564
+ return Promise.all(processes);
172565
+ }
172566
+ async function installThemeCheckCLIDependencies(stdout) {
172567
+ const exists = await exists$1(themeCheckDirectory());
172568
+ if (!exists)
172569
+ stdout.write("Installing theme dependencies...");
172570
+ const list = new Listr([
172571
+ {
172572
+ title: "Installing theme dependencies",
172573
+ task: async () => {
172574
+ await validateRubyEnv();
172575
+ await createThemeCheckCLIWorkingDirectory();
172576
+ await createThemeCheckGemfile();
172577
+ await bundleInstallThemeCheck();
172578
+ }
172579
+ }
172580
+ ], { renderer: "silent" });
172581
+ await list.run();
172582
+ if (!exists)
172583
+ stdout.write("Installed theme dependencies!");
172584
+ }
172585
+ async function installCLIDependencies() {
172586
+ const exists = await exists$1(shopifyCLIDirectory());
172587
+ const renderer = exists ? "silent" : "default";
172539
172588
  const list = new Listr([
172540
172589
  {
172541
172590
  title: "Installing theme dependencies",
172542
172591
  task: async () => {
172543
172592
  await validateRubyEnv();
172544
- await createWorkingDirectory();
172545
- await createGemfile();
172546
- await bundleInstall();
172593
+ await createShopifyCLIWorkingDirectory();
172594
+ await createShopifyCLIGemfile();
172595
+ await bundleInstallShopifyCLI();
172547
172596
  }
172548
172597
  }
172549
172598
  ], { renderer });
@@ -172569,25 +172618,41 @@ async function getBundlerVersion() {
172569
172618
  throw new Abort("Bundler not found", "Make sure you have Bundler installed on your system: https://bundler.io/");
172570
172619
  }
172571
172620
  }
172572
- function createWorkingDirectory() {
172573
- return mkdir(rubyCLIPath());
172621
+ function createShopifyCLIWorkingDirectory() {
172622
+ return mkdir(shopifyCLIDirectory());
172574
172623
  }
172575
- async function createGemfile() {
172576
- const gemPath = join$3(rubyCLIPath(), "Gemfile");
172624
+ function createThemeCheckCLIWorkingDirectory() {
172625
+ return mkdir(themeCheckDirectory());
172626
+ }
172627
+ async function createShopifyCLIGemfile() {
172628
+ const gemPath = join$3(shopifyCLIDirectory(), "Gemfile");
172577
172629
  await write$1(gemPath, `source 'https://rubygems.org'
172578
172630
  gem 'shopify-cli', '${RubyCLIVersion}'`);
172579
172631
  }
172580
- async function bundleInstall() {
172581
- await exec$2("bundle", ["config", "set", "--local", "path", rubyCLIPath()], { cwd: rubyCLIPath() });
172582
- await exec$2("bundle", ["install"], { cwd: rubyCLIPath() });
172632
+ async function createThemeCheckGemfile() {
172633
+ const gemPath = join$3(themeCheckDirectory(), "Gemfile");
172634
+ await write$1(gemPath, `source 'https://rubygems.org'
172635
+ gem 'theme-check', '${ThemeCheckVersion}'`);
172636
+ }
172637
+ async function bundleInstallShopifyCLI() {
172638
+ await exec$2("bundle", ["config", "set", "--local", "path", shopifyCLIDirectory()], { cwd: shopifyCLIDirectory() });
172639
+ await exec$2("bundle", ["install"], { cwd: shopifyCLIDirectory() });
172583
172640
  }
172584
- function rubyCLIPath() {
172641
+ async function bundleInstallThemeCheck() {
172642
+ await exec$2("bundle", ["config", "set", "--local", "path", themeCheckDirectory()], { cwd: themeCheckDirectory() });
172643
+ await exec$2("bundle", ["install"], { cwd: themeCheckDirectory() });
172644
+ }
172645
+ function shopifyCLIDirectory() {
172585
172646
  return join$3(constants$2.paths.directories.cache.vendor.path(), "ruby-cli", RubyCLIVersion);
172586
172647
  }
172648
+ function themeCheckDirectory() {
172649
+ return join$3(constants$2.paths.directories.cache.vendor.path(), "theme-check", ThemeCheckVersion);
172650
+ }
172587
172651
 
172588
172652
  var ruby = /*#__PURE__*/Object.freeze({
172589
172653
  __proto__: null,
172590
- execCLI: execCLI
172654
+ execCLI: execCLI,
172655
+ execThemeCheckCLI: execThemeCheckCLI
172591
172656
  });
172592
172657
 
172593
172658
  async function readPackageJSON(directory) {
@@ -172900,4 +172965,4 @@ var plugins = /*#__PURE__*/Object.freeze({
172900
172965
  });
172901
172966
 
172902
172967
  export { npm as A, port as B, cli as C, id as D, temporary as E, FormData$3 as F, dotEnv as G, constants$2 as H, plugins as I, File$1 as a, string as b, github as c, dependency as d, error$j as e, file$1 as f, git as g, os$2 as h, environment as i, session as j, schema$2 as k, toml as l, store as m, api as n, output as o, path$w as p, http$2 as q, archiver as r, system as s, template as t, ui as u, version as v, checksum as w, ruby as x, yaml as y, semver as z };
172903
- //# sourceMappingURL=index-117ce1ba.js.map
172968
+ //# sourceMappingURL=index-fbaf7cec.js.map