@shopify/cli-kit 3.0.16 → 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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @shopify/cli-kit
2
2
 
3
+ ## 3.0.17
4
+
5
+ ### Patch Changes
6
+
7
+ - df0d0347: Use inquirer with SHOPIFY_USE_INQUIRER
8
+ - 6657a57c: Stop passing configuration when deploying a function
9
+
3
10
  ## 3.0.16
4
11
 
5
12
  ### Patch Changes
@@ -25,6 +25,7 @@ import tty__default from 'tty';
25
25
  import StackTracey from 'stacktracey';
26
26
  import { Errors, Flags } from '@oclif/core';
27
27
  import sourceMapSupport from 'source-map-support';
28
+ import inquirer from 'inquirer';
28
29
  import { createRequire } from 'module';
29
30
  import http$4 from 'node:http';
30
31
  import https$3 from 'node:https';
@@ -12321,7 +12322,7 @@ var path$w = /*#__PURE__*/Object.freeze({
12321
12322
  });
12322
12323
 
12323
12324
  var name = "@shopify/cli-kit";
12324
- var version$2 = "3.0.16";
12325
+ var version$2 = "3.0.17";
12325
12326
  var description$1 = "A set of utilities, interfaces, and models that are common across all the platform features";
12326
12327
  var keywords = [
12327
12328
  "shopify",
@@ -12371,6 +12372,7 @@ var os$7 = [
12371
12372
  var dependencies$1 = {
12372
12373
  "@oclif/core": "^1.0",
12373
12374
  envfile: "^6.17.0",
12375
+ inquirer: "^8.2.4",
12374
12376
  keytar: "^7.9.0",
12375
12377
  open: "^8.4.0",
12376
12378
  prettier: "^2.6.2",
@@ -12380,6 +12382,7 @@ var dependencies$1 = {
12380
12382
  var devDependencies = {
12381
12383
  "@iarna/toml": "^2.2.5",
12382
12384
  "@types/cross-zip": "^4.0.0",
12385
+ "@types/inquirer": "^8.2.1",
12383
12386
  "@types/js-yaml": "^4.0.5",
12384
12387
  "@types/semver": "^7.3.9",
12385
12388
  "abort-controller": "^3.0.0",
@@ -21579,7 +21582,7 @@ class Abort extends Fatal {
21579
21582
  super(message, 0 /* Abort */, tryMessage);
21580
21583
  }
21581
21584
  }
21582
- class AbortSilent$1 extends Fatal {
21585
+ class AbortSilent extends Fatal {
21583
21586
  constructor() {
21584
21587
  super("", 1 /* AbortSilent */);
21585
21588
  }
@@ -21629,7 +21632,7 @@ var error$j = /*#__PURE__*/Object.freeze({
21629
21632
  CancelExecution: CancelExecution,
21630
21633
  Fatal: Fatal,
21631
21634
  Abort: Abort,
21632
- AbortSilent: AbortSilent$1,
21635
+ AbortSilent: AbortSilent,
21633
21636
  Bug: Bug,
21634
21637
  handler: handler,
21635
21638
  mapper: mapper$1,
@@ -26502,22 +26505,35 @@ var Listr = class {
26502
26505
  }
26503
26506
  };
26504
26507
 
26505
- const prompt = async (questions) => {
26508
+ const prompt = async (questions, debugForceInquirer = false) => {
26506
26509
  if (!isTerminalInteractive() && questions.length !== 0) {
26507
26510
  throw new Bug(content`
26508
26511
  The CLI prompted in a non-interactive terminal with the following questions:
26509
26512
  ${token.json(questions)}
26510
26513
  `);
26511
26514
  }
26512
- const mappedQuestions = questions.map(mapper);
26513
- const value = {};
26514
- for (const question of mappedQuestions) {
26515
- if (question.preface) {
26516
- info(question.preface);
26515
+ if (debugForceInquirer || isTruthy$1(process.env.SHOPIFY_USE_INQUIRER)) {
26516
+ const results = [];
26517
+ for (const question of questions) {
26518
+ if (question.preface) {
26519
+ info(question.preface);
26520
+ }
26521
+ const questionName = question.name;
26522
+ const answer = (await inquirer.prompt([convertQuestionForInquirer(question)]))[questionName];
26523
+ results.push([questionName, answer]);
26524
+ }
26525
+ return Object.fromEntries(results);
26526
+ } else {
26527
+ const mappedQuestions = questions.map(mapper);
26528
+ const value = {};
26529
+ for (const question of mappedQuestions) {
26530
+ if (question.preface) {
26531
+ info(question.preface);
26532
+ }
26533
+ value[question.name] = await question.run();
26517
26534
  }
26518
- value[question.name] = await question.run();
26535
+ return value;
26519
26536
  }
26520
- return value;
26521
26537
  };
26522
26538
  async function nonEmptyDirectoryPrompt(directory) {
26523
26539
  if (await exists$1(directory)) {
@@ -26539,6 +26555,19 @@ async function nonEmptyDirectoryPrompt(directory) {
26539
26555
  remove$4(directory);
26540
26556
  }
26541
26557
  }
26558
+ function convertQuestionForInquirer(question) {
26559
+ switch (question.type) {
26560
+ case "input":
26561
+ case "password":
26562
+ return question;
26563
+ case "select":
26564
+ case "autocomplete":
26565
+ return {
26566
+ ...question,
26567
+ type: "list"
26568
+ };
26569
+ }
26570
+ }
26542
26571
  function mapper(question) {
26543
26572
  switch (question.type) {
26544
26573
  case "input":
@@ -40871,7 +40900,7 @@ class Body$1 {
40871
40900
  return formData;
40872
40901
  }
40873
40902
 
40874
- const {toFormData} = await import('./multipart-parser-654817b0.js');
40903
+ const {toFormData} = await import('./multipart-parser-cc9089c4.js');
40875
40904
  return toFormData(this.body, ct);
40876
40905
  }
40877
40906
 
@@ -155548,9 +155577,9 @@ const AppFunctionSetMutation = dist$3.gql`
155548
155577
  $force: Boolean
155549
155578
  $schemaMajorVersion: String
155550
155579
  $schemaMinorVersion: String
155551
- $scriptConfigVersion: String!
155580
+ $scriptConfigVersion: String
155552
155581
  $configurationUi: Boolean!
155553
- $configurationDefinition: String!
155582
+ $configurationDefinition: String
155554
155583
  $moduleUploadUrl: String!
155555
155584
  $library: LibraryInput
155556
155585
  $inputQuery: String
@@ -174839,4 +174868,4 @@ var vscode = /*#__PURE__*/Object.freeze({
174839
174868
  });
174840
174869
 
174841
174870
  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 };
174842
- //# sourceMappingURL=index-43045fd6.js.map
174871
+ //# sourceMappingURL=index-3f7f30b9.js.map