@shopify/create-app 3.87.4 → 3.88.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.
@@ -1,15 +1,13 @@
1
1
  import {
2
+ getNextDeprecationDate,
2
3
  reportAnalyticsEvent
3
- } from "./chunk-3PEDZR7O.js";
4
- import {
5
- getNextDeprecationDate
6
- } from "./chunk-AEMZTD5E.js";
4
+ } from "./chunk-M7VMC3PN.js";
7
5
  import {
8
6
  addSensitiveMetadata,
9
7
  getAllSensitiveMetadata,
10
8
  outputDebug,
11
9
  renderWarning
12
- } from "./chunk-ONMQ7D6J.js";
10
+ } from "./chunk-YZFEE3WJ.js";
13
11
  import {
14
12
  init_cjs_shims
15
13
  } from "./chunk-PKR7KJ6P.js";
@@ -77,4 +75,4 @@ export {
77
75
  postRunHookHasCompleted,
78
76
  hook
79
77
  };
80
- //# sourceMappingURL=chunk-VJVF56JB.js.map
78
+ //# sourceMappingURL=chunk-YXRIPYLR.js.map
@@ -23357,7 +23357,7 @@ init_cjs_shims();
23357
23357
 
23358
23358
  // ../cli-kit/dist/public/node/abort.js
23359
23359
  init_cjs_shims();
23360
- var import_node_abort_controller = __toESM(require_node_abort_controller()), AbortController = class extends import_node_abort_controller.AbortController {
23360
+ var import_node_abort_controller = __toESM(require_node_abort_controller(), 1), AbortController = class extends import_node_abort_controller.AbortController {
23361
23361
  }, AbortSignal = class extends import_node_abort_controller.AbortSignal {
23362
23362
  };
23363
23363
 
@@ -23388,7 +23388,7 @@ function createRuntimeMetadataContainer(defaultPublicMetadata = {}) {
23388
23388
  try {
23389
23389
  await getAndSet();
23390
23390
  } catch (error) {
23391
- let { sendErrorToBugsnag } = await import("./error-handler-OO5B7RPA.js");
23391
+ let { sendErrorToBugsnag } = await import("./error-handler-EMA3ZDST.js");
23392
23392
  await sendErrorToBugsnag(error, "unexpected_error");
23393
23393
  }
23394
23394
  }, durationStack = [];
@@ -28222,6 +28222,22 @@ function normalizeDelimitedString(delimitedString, delimiter2 = ",") {
28222
28222
  let sortedItems = delimitedString.split(delimiter2).map((value) => value.trim()).filter((value) => value !== "").sort();
28223
28223
  return [...new Set(sortedItems)].join(delimiter2);
28224
28224
  }
28225
+ function timeAgo(from, to) {
28226
+ let seconds = Math.floor((to.getTime() - from.getTime()) / 1e3);
28227
+ if (seconds < 60)
28228
+ return `${formatTimeUnit(seconds, "second")} ago`;
28229
+ let minutes = Math.floor(seconds / 60);
28230
+ if (minutes < 60)
28231
+ return `${formatTimeUnit(minutes, "minute")} ago`;
28232
+ let hours = Math.floor(minutes / 60);
28233
+ if (hours < 24)
28234
+ return `${formatTimeUnit(hours, "hour")} ago`;
28235
+ let days = Math.floor(hours / 24);
28236
+ return `${formatTimeUnit(days, "day")} ago`;
28237
+ }
28238
+ function formatTimeUnit(count, unit) {
28239
+ return `${count} ${unit}${count === 1 ? "" : "s"}`;
28240
+ }
28225
28241
 
28226
28242
  // ../cli-kit/dist/private/node/ui/components/Prompts/InfoTable.js
28227
28243
  var import_react40 = __toESM(require_react(), 1), InfoTable = ({ table }) => {
@@ -28912,7 +28928,10 @@ function Tasks({ tasks, silent = isUnitTest(), onComplete = noop3, abortSignal,
28912
28928
  }
28913
28929
  }), useExitOnCtrlC();
28914
28930
  let { isAborted } = useAbortSignal(abortSignal);
28915
- return silent ? null : state === TasksState.Loading && !isAborted ? import_react53.default.createElement(LoadingBar, { title: currentTask.title, noColor, noProgressBar }) : null;
28931
+ if (silent)
28932
+ return null;
28933
+ let title = typeof currentTask.title == "string" ? currentTask.title : currentTask.title.value;
28934
+ return state === TasksState.Loading && !isAborted ? import_react53.default.createElement(LoadingBar, { title, noColor, noProgressBar }) : null;
28916
28935
  }
28917
28936
 
28918
28937
  // ../cli-kit/dist/private/node/ui/components/TextPrompt.js
@@ -29054,19 +29073,19 @@ function AutocompletePrompt({ message, choices, infoTable, onSubmit, search, has
29054
29073
  // ../cli-kit/dist/private/node/ui/components/SingleTask.js
29055
29074
  init_cjs_shims();
29056
29075
  var import_react56 = __toESM(require_react(), 1);
29057
- var SingleTask = ({ taskPromise, title, noColor }) => {
29058
- let [isDone, setIsDone] = (0, import_react56.useState)(!1), { exit: unmountInk } = use_app_default();
29076
+ var SingleTask = ({ task, title, onComplete, noColor }) => {
29077
+ let [status, setStatus] = (0, import_react56.useState)(title), [isDone, setIsDone] = (0, import_react56.useState)(!1), { exit: unmountInk } = use_app_default();
29059
29078
  return useExitOnCtrlC(), (0, import_react56.useEffect)(() => {
29060
- taskPromise.then(() => {
29061
- setIsDone(!0), unmountInk();
29079
+ task(setStatus).then((result) => {
29080
+ setIsDone(!0), onComplete?.(result), unmountInk();
29062
29081
  }).catch((error) => {
29063
29082
  setIsDone(!0), unmountInk(error);
29064
29083
  });
29065
- }, [taskPromise, unmountInk]), isDone ? null : import_react56.default.createElement(LoadingBar, { title, noColor });
29084
+ }, [task, unmountInk, onComplete]), isDone ? null : import_react56.default.createElement(LoadingBar, { title: status.value, noColor });
29066
29085
  };
29067
29086
 
29068
29087
  // ../cli-kit/dist/public/node/ui.js
29069
- var import_react57 = __toESM(require_react()), defaultUIDebugOptions = {
29088
+ var import_react57 = __toESM(require_react(), 1), defaultUIDebugOptions = {
29070
29089
  skipTTYCheck: !1
29071
29090
  };
29072
29091
  async function renderConcurrent({ renderOptions, ...props }) {
@@ -29155,15 +29174,13 @@ async function renderTasks(tasks, { renderOptions, noProgressBar } = {}) {
29155
29174
  }).catch(reject);
29156
29175
  });
29157
29176
  }
29158
- async function renderSingleTask({ title, taskPromise }, { renderOptions } = {}) {
29159
- let promise = typeof taskPromise == "function" ? taskPromise() : taskPromise, [_renderResult, taskResult] = await Promise.all([
29160
- render2(import_react57.default.createElement(SingleTask, { title, taskPromise: promise }), {
29177
+ async function renderSingleTask({ title, task, renderOptions }) {
29178
+ return new Promise((resolve, reject) => {
29179
+ render2(import_react57.default.createElement(SingleTask, { title, task, onComplete: resolve }), {
29161
29180
  ...renderOptions,
29162
29181
  exitOnCtrlC: !1
29163
- }),
29164
- promise
29165
- ]);
29166
- return taskResult;
29182
+ }).catch(reject);
29183
+ });
29167
29184
  }
29168
29185
  async function renderTextPrompt({ renderOptions, ...props }, uiDebugOptions = defaultUIDebugOptions) {
29169
29186
  return throwInNonTTY({ message: props.message, stdin: renderOptions?.stdin }, uiDebugOptions), runWithTimer("cmd_all_timing_prompts_ms")(async () => {
@@ -30208,6 +30225,7 @@ function makeUsernameFromId(userId) {
30208
30225
 
30209
30226
  // ../cli-kit/dist/public/node/system.js
30210
30227
  var import_which = __toESM(require_lib2(), 1);
30228
+ import { fstatSync } from "fs";
30211
30229
  async function openURL(url) {
30212
30230
  let externalOpen = await import("./open-BHIF7E3E.js");
30213
30231
  try {
@@ -30292,6 +30310,23 @@ function isCI() {
30292
30310
  async function isWsl() {
30293
30311
  return (await import("./is-wsl-YAJ3DFN7.js")).default;
30294
30312
  }
30313
+ function isStdinPiped() {
30314
+ try {
30315
+ let stats = fstatSync(0);
30316
+ return stats.isFIFO() || stats.isFile();
30317
+ } catch {
30318
+ return !1;
30319
+ }
30320
+ }
30321
+ async function readStdinString() {
30322
+ if (!isStdinPiped())
30323
+ return;
30324
+ let data = "";
30325
+ process.stdin.setEncoding("utf8");
30326
+ for await (let chunk of process.stdin)
30327
+ data += String(chunk);
30328
+ return data.trim();
30329
+ }
30295
30330
 
30296
30331
  // ../cli-kit/dist/public/node/version.js
30297
30332
  init_cjs_shims();
@@ -31876,7 +31911,7 @@ minimatch.unescape = unescape2;
31876
31911
  // ../cli-kit/dist/public/node/fs.js
31877
31912
  var import_fast_glob = __toESM(require_out(), 1);
31878
31913
  import { mkdirSync as fsMkdirSync, readFileSync as fsReadFileSync, writeFileSync as fsWriteFileSync, appendFileSync as fsAppendFileSync, statSync as fsStatSync, createReadStream as fsCreateReadStream, createWriteStream as fsCreateWriteStream, constants as fsConstants, existsSync as fsFileExistsSync, unlinkSync as fsUnlinkSync, accessSync, statSync } from "fs";
31879
- import { mkdir as fsMkdir, writeFile as fsWriteFile, readFile as fsReadFile, realpath as fsRealPath, appendFile as fsAppendFile, mkdtemp as fsMkdtemp, stat as fsStat, lstat as fsLstat, chmod as fsChmod, access as fsAccess, rename as fsRename, unlink as fsUnlink, readdir as fsReaddir } from "fs/promises";
31914
+ import { mkdir as fsMkdir, writeFile as fsWriteFile, readFile as fsReadFile, realpath as fsRealPath, appendFile as fsAppendFile, mkdtemp as fsMkdtemp, stat as fsStat, lstat as fsLstat, chmod as fsChmod, access as fsAccess, rename as fsRename, unlink as fsUnlink, readdir as fsReaddir, symlink as fsSymlink } from "fs/promises";
31880
31915
  async function inTemporaryDirectory(callback) {
31881
31916
  return temporaryDirectoryTask(callback);
31882
31917
  }
@@ -31917,6 +31952,15 @@ async function mkdir(path8) {
31917
31952
  async function removeFile(path8) {
31918
31953
  outputDebug(outputContent`Removing file at ${outputToken.path(path8)}...`), await remove(path8);
31919
31954
  }
31955
+ async function symlink(target, path8) {
31956
+ outputDebug(outputContent`Creating symbolic link from ${outputToken.path(path8)} to ${outputToken.path(target)}...`);
31957
+ let type = "file";
31958
+ try {
31959
+ (await fsLstat(target)).isDirectory() && (type = "junction");
31960
+ } catch {
31961
+ }
31962
+ await fsSymlink(target, path8, type);
31963
+ }
31920
31964
  function removeFileSync(path8) {
31921
31965
  outputDebug(outputContent`Sync-removing file at ${outputToken.path(path8)}...`), removeSync(path8);
31922
31966
  }
@@ -32016,17 +32060,6 @@ function matchGlob(key, pattern, options) {
32016
32060
  function readdir(path8) {
32017
32061
  return fsReaddir(path8);
32018
32062
  }
32019
- async function copyDirectoryContents(srcDir, destDir) {
32020
- if (!await fileExists(srcDir))
32021
- throw new Error(`Source directory ${srcDir} does not exist`);
32022
- await fileExists(destDir) || await mkdir(destDir);
32023
- let items = await glob(joinPath(srcDir, "**/*")), filesToCopy = [];
32024
- for (let item of items) {
32025
- let relativePath = item.replace(srcDir, "").replace(/^[/\\]/, ""), destPath = joinPath(destDir, relativePath);
32026
- filesToCopy.push(copyFile(item, destPath));
32027
- }
32028
- await Promise.all(filesToCopy);
32029
- }
32030
32063
 
32031
32064
  // ../../node_modules/.pnpm/is-interactive@2.0.0/node_modules/is-interactive/index.js
32032
32065
  init_cjs_shims();
@@ -32192,6 +32225,7 @@ export {
32192
32225
  joinWithAnd,
32193
32226
  pascalize,
32194
32227
  normalizeDelimitedString,
32228
+ timeAgo,
32195
32229
  inTemporaryDirectory,
32196
32230
  tempDirectory,
32197
32231
  readFile,
@@ -32204,6 +32238,7 @@ export {
32204
32238
  writeFileSync,
32205
32239
  mkdir,
32206
32240
  removeFile,
32241
+ symlink,
32207
32242
  removeFileSync,
32208
32243
  rmdir,
32209
32244
  isDirectory,
@@ -32226,7 +32261,6 @@ export {
32226
32261
  findPathUp,
32227
32262
  matchGlob,
32228
32263
  readdir,
32229
- copyDirectoryContents,
32230
32264
  treeKill,
32231
32265
  mimicFunction,
32232
32266
  require_signal_exit,
@@ -32242,6 +32276,7 @@ export {
32242
32276
  terminalSupportsPrompting,
32243
32277
  isCI,
32244
32278
  isWsl,
32279
+ readStdinString,
32245
32280
  isTerminalInteractive,
32246
32281
  homeDirectory,
32247
32282
  isDevelopment,
@@ -32433,4 +32468,4 @@ react-reconciler/cjs/react-reconciler-constants.development.js:
32433
32468
  * LICENSE file in the root directory of this source tree.
32434
32469
  *)
32435
32470
  */
32436
- //# sourceMappingURL=chunk-ONMQ7D6J.js.map
32471
+ //# sourceMappingURL=chunk-YZFEE3WJ.js.map
@@ -2,7 +2,7 @@ import {
2
2
  execaSync,
3
3
  fileExistsSync,
4
4
  isDevelopment
5
- } from "./chunk-ONMQ7D6J.js";
5
+ } from "./chunk-YZFEE3WJ.js";
6
6
  import {
7
7
  require_lib
8
8
  } from "./chunk-V7OWCSFT.js";
@@ -46,4 +46,4 @@ var import_core = __toESM(require_lib(), 1), ShopifyConfig = class extends impor
46
46
  export {
47
47
  ShopifyConfig
48
48
  };
49
- //# sourceMappingURL=custom-oclif-loader-P5WMEY4P.js.map
49
+ //# sourceMappingURL=custom-oclif-loader-LMLLWIIT.js.map
@@ -4,12 +4,11 @@ import {
4
4
  errorHandler,
5
5
  registerCleanBugsnagErrorsFromWithinPlugins,
6
6
  sendErrorToBugsnag
7
- } from "./chunk-E7QU3XLI.js";
8
- import "./chunk-3PEDZR7O.js";
9
- import "./chunk-AEMZTD5E.js";
7
+ } from "./chunk-EL5DCDEL.js";
8
+ import "./chunk-M7VMC3PN.js";
10
9
  import "./chunk-XD3LXUGW.js";
11
- import "./chunk-AG24RXY5.js";
12
- import "./chunk-ONMQ7D6J.js";
10
+ import "./chunk-5F7FMAT2.js";
11
+ import "./chunk-YZFEE3WJ.js";
13
12
  import "./chunk-V7OWCSFT.js";
14
13
  import "./chunk-UMUTXITN.js";
15
14
  import "./chunk-Y2JP6WFP.js";
@@ -27,4 +26,4 @@ export {
27
26
  registerCleanBugsnagErrorsFromWithinPlugins,
28
27
  sendErrorToBugsnag
29
28
  };
30
- //# sourceMappingURL=error-handler-OO5B7RPA.js.map
29
+ //# sourceMappingURL=error-handler-EMA3ZDST.js.map
@@ -1,11 +1,10 @@
1
1
  import {
2
2
  hook
3
- } from "../chunk-VJVF56JB.js";
4
- import "../chunk-3PEDZR7O.js";
5
- import "../chunk-AEMZTD5E.js";
3
+ } from "../chunk-YXRIPYLR.js";
4
+ import "../chunk-M7VMC3PN.js";
6
5
  import "../chunk-XD3LXUGW.js";
7
- import "../chunk-AG24RXY5.js";
8
- import "../chunk-ONMQ7D6J.js";
6
+ import "../chunk-5F7FMAT2.js";
7
+ import "../chunk-YZFEE3WJ.js";
9
8
  import "../chunk-V7OWCSFT.js";
10
9
  import "../chunk-UMUTXITN.js";
11
10
  import "../chunk-Y2JP6WFP.js";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  fetchNotificationsInBackground
3
- } from "../chunk-4YD2DGEA.js";
3
+ } from "../chunk-GRJC5EZB.js";
4
4
  import {
5
5
  CLI_KIT_VERSION,
6
6
  startAnalytics
7
- } from "../chunk-AEMZTD5E.js";
7
+ } from "../chunk-M7VMC3PN.js";
8
8
  import "../chunk-XD3LXUGW.js";
9
9
  import {
10
10
  checkForCachedNewVersion,
11
11
  checkForNewVersion,
12
12
  packageManagerFromUserAgent,
13
13
  runAtMinimumInterval
14
- } from "../chunk-AG24RXY5.js";
14
+ } from "../chunk-5F7FMAT2.js";
15
15
  import {
16
16
  currentProcessIsGlobal,
17
17
  inferPackageManagerForGlobalCLI,
@@ -20,7 +20,7 @@ import {
20
20
  outputDebug,
21
21
  outputToken,
22
22
  outputWarn
23
- } from "../chunk-ONMQ7D6J.js";
23
+ } from "../chunk-YZFEE3WJ.js";
24
24
  import "../chunk-V7OWCSFT.js";
25
25
  import "../chunk-UMUTXITN.js";
26
26
  import "../chunk-Y2JP6WFP.js";