@shopify/create-app 3.84.0 → 3.84.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.
@@ -4,10 +4,10 @@ import {
4
4
  getEnvironmentData,
5
5
  getLastSeenUserIdAfterAuth,
6
6
  getSensitiveEnvironmentData
7
- } from "./chunk-G247P2WG.js";
7
+ } from "./chunk-F7XIUISB.js";
8
8
  import {
9
9
  runWithRateLimit
10
- } from "./chunk-KXFF4CGE.js";
10
+ } from "./chunk-XCAGLQZT.js";
11
11
  import {
12
12
  alwaysLogAnalytics,
13
13
  alwaysLogMetrics,
@@ -24,7 +24,7 @@ import {
24
24
  outputDebug,
25
25
  outputToken,
26
26
  reportingRateLimit
27
- } from "./chunk-H7IST3XL.js";
27
+ } from "./chunk-BRA57BDM.js";
28
28
  import {
29
29
  __commonJS,
30
30
  __esm,
@@ -15927,4 +15927,4 @@ export {
15927
15927
  requestIdsCollection,
15928
15928
  reportAnalyticsEvent
15929
15929
  };
15930
- //# sourceMappingURL=chunk-SMNBH5GN.js.map
15930
+ //# sourceMappingURL=chunk-APC5TGT7.js.map
@@ -23231,7 +23231,7 @@ function createRuntimeMetadataContainer(defaultPublicMetadata = {}) {
23231
23231
  try {
23232
23232
  await getAndSet();
23233
23233
  } catch (error) {
23234
- let { sendErrorToBugsnag } = await import("./error-handler-EVQNKREX.js");
23234
+ let { sendErrorToBugsnag } = await import("./error-handler-M3MNE2JX.js");
23235
23235
  await sendErrorToBugsnag(error, "unexpected_error");
23236
23236
  }
23237
23237
  }, durationStack = [];
@@ -29015,7 +29015,7 @@ This usually happens when running a command non-interactively, for example in a
29015
29015
  }
29016
29016
 
29017
29017
  // ../cli-kit/dist/public/node/error.js
29018
- var import_core = __toESM(require_lib(), 1), import_ts_error = __toESM(require_cjs(), 1), FatalErrorType;
29018
+ var import_core = __toESM(require_lib()), import_ts_error = __toESM(require_cjs()), FatalErrorType;
29019
29019
  (function(FatalErrorType2) {
29020
29020
  FatalErrorType2[FatalErrorType2.Abort = 0] = "Abort", FatalErrorType2[FatalErrorType2.AbortSilent = 1] = "AbortSilent", FatalErrorType2[FatalErrorType2.Bug = 2] = "Bug";
29021
29021
  })(FatalErrorType || (FatalErrorType = {}));
@@ -32465,4 +32465,4 @@ react-reconciler/cjs/react-reconciler-constants.development.js:
32465
32465
  * LICENSE file in the root directory of this source tree.
32466
32466
  *)
32467
32467
  */
32468
- //# sourceMappingURL=chunk-H7IST3XL.js.map
32468
+ //# sourceMappingURL=chunk-BRA57BDM.js.map
@@ -9,7 +9,7 @@ import {
9
9
  packageManagerFromUserAgent,
10
10
  removeSession,
11
11
  setSession
12
- } from "./chunk-KXFF4CGE.js";
12
+ } from "./chunk-XCAGLQZT.js";
13
13
  import {
14
14
  AbortError,
15
15
  BugError,
@@ -45,7 +45,7 @@ import {
45
45
  spinFqdn,
46
46
  systemEnvironmentVariables,
47
47
  themeToken
48
- } from "./chunk-H7IST3XL.js";
48
+ } from "./chunk-BRA57BDM.js";
49
49
  import {
50
50
  cwd,
51
51
  sniffForJson
@@ -27647,7 +27647,7 @@ var require_form_data = __commonJS({
27647
27647
 
27648
27648
  // ../cli-kit/dist/public/common/version.js
27649
27649
  init_cjs_shims();
27650
- var CLI_KIT_VERSION = "3.84.0";
27650
+ var CLI_KIT_VERSION = "3.84.1";
27651
27651
 
27652
27652
  // ../cli-kit/dist/private/node/analytics.js
27653
27653
  init_cjs_shims();
@@ -33345,4 +33345,4 @@ mime-types/index.js:
33345
33345
  * MIT Licensed
33346
33346
  *)
33347
33347
  */
33348
- //# sourceMappingURL=chunk-G247P2WG.js.map
33348
+ //# sourceMappingURL=chunk-F7XIUISB.js.map
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  fanoutHooks,
3
3
  reportAnalyticsEvent
4
- } from "./chunk-SMNBH5GN.js";
4
+ } from "./chunk-APC5TGT7.js";
5
5
  import {
6
6
  CLI_KIT_VERSION,
7
7
  getEnvironmentData
8
- } from "./chunk-G247P2WG.js";
8
+ } from "./chunk-F7XIUISB.js";
9
9
  import {
10
10
  runWithRateLimit
11
- } from "./chunk-KXFF4CGE.js";
11
+ } from "./chunk-XCAGLQZT.js";
12
12
  import {
13
13
  AbortSilentError,
14
14
  CancelExecution,
@@ -23,7 +23,7 @@ import {
23
23
  reportingRateLimit,
24
24
  require_stacktracey,
25
25
  shouldReportErrorAsUnexpected
26
- } from "./chunk-H7IST3XL.js";
26
+ } from "./chunk-BRA57BDM.js";
27
27
  import {
28
28
  require_lib
29
29
  } from "./chunk-H3GWNOGA.js";
@@ -2142,4 +2142,4 @@ export {
2142
2142
  registerCleanBugsnagErrorsFromWithinPlugins,
2143
2143
  addBugsnagMetadata
2144
2144
  };
2145
- //# sourceMappingURL=chunk-FZ64J6AA.js.map
2145
+ //# sourceMappingURL=chunk-GYAMBODZ.js.map
@@ -2,12 +2,12 @@ import {
2
2
  CLI_KIT_VERSION,
3
3
  jsonOutputEnabled,
4
4
  z
5
- } from "./chunk-G247P2WG.js";
5
+ } from "./chunk-F7XIUISB.js";
6
6
  import {
7
7
  cacheRetrieve,
8
8
  cacheStore,
9
9
  versionSatisfies
10
- } from "./chunk-KXFF4CGE.js";
10
+ } from "./chunk-XCAGLQZT.js";
11
11
  import {
12
12
  AbortSilentError,
13
13
  exec,
@@ -16,7 +16,7 @@ import {
16
16
  renderError,
17
17
  renderInfo,
18
18
  renderWarning
19
- } from "./chunk-H7IST3XL.js";
19
+ } from "./chunk-BRA57BDM.js";
20
20
  import {
21
21
  init_cjs_shims
22
22
  } from "./chunk-PKR7KJ6P.js";
@@ -84,7 +84,7 @@ async function showNotificationsIfNeeded(currentSurfaces, environment = process.
84
84
  throw new AbortSilentError();
85
85
  let errorMessage = `Error showing notifications: ${error.message}`;
86
86
  outputDebug(errorMessage);
87
- let { sendErrorToBugsnag } = await import("./error-handler-EVQNKREX.js");
87
+ let { sendErrorToBugsnag } = await import("./error-handler-M3MNE2JX.js");
88
88
  await sendErrorToBugsnag(errorMessage, "unexpected_error");
89
89
  }
90
90
  }
@@ -174,4 +174,4 @@ export {
174
174
  showNotificationsIfNeeded,
175
175
  fetchNotificationsInBackground
176
176
  };
177
- //# sourceMappingURL=chunk-FCJKXKY5.js.map
177
+ //# sourceMappingURL=chunk-I5QSPA3G.js.map
@@ -18,7 +18,7 @@ import {
18
18
  require_get_stream,
19
19
  runWithTimer,
20
20
  writeFile
21
- } from "./chunk-H7IST3XL.js";
21
+ } from "./chunk-BRA57BDM.js";
22
22
  import {
23
23
  require_semver
24
24
  } from "./chunk-H3GWNOGA.js";
@@ -13909,4 +13909,4 @@ deep-extend/lib/deep-extend.js:
13909
13909
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13910
13910
  *)
13911
13911
  */
13912
- //# sourceMappingURL=chunk-KXFF4CGE.js.map
13912
+ //# sourceMappingURL=chunk-XCAGLQZT.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  execaSync,
3
3
  fileExistsSync
4
- } from "./chunk-H7IST3XL.js";
4
+ } from "./chunk-BRA57BDM.js";
5
5
  import {
6
6
  require_lib
7
7
  } from "./chunk-H3GWNOGA.js";
@@ -40,4 +40,4 @@ var import_core = __toESM(require_lib(), 1), ShopifyConfig = class extends impor
40
40
  export {
41
41
  ShopifyConfig
42
42
  };
43
- //# sourceMappingURL=custom-oclif-loader-F65UIOYS.js.map
43
+ //# sourceMappingURL=custom-oclif-loader-U7MCMR24.js.map
@@ -4,12 +4,12 @@ import {
4
4
  errorHandler,
5
5
  registerCleanBugsnagErrorsFromWithinPlugins,
6
6
  sendErrorToBugsnag
7
- } from "./chunk-FZ64J6AA.js";
8
- import "./chunk-SMNBH5GN.js";
9
- import "./chunk-G247P2WG.js";
7
+ } from "./chunk-GYAMBODZ.js";
8
+ import "./chunk-APC5TGT7.js";
9
+ import "./chunk-F7XIUISB.js";
10
10
  import "./chunk-25IMI7TH.js";
11
- import "./chunk-KXFF4CGE.js";
12
- import "./chunk-H7IST3XL.js";
11
+ import "./chunk-XCAGLQZT.js";
12
+ import "./chunk-BRA57BDM.js";
13
13
  import "./chunk-H3GWNOGA.js";
14
14
  import "./chunk-UMUTXITN.js";
15
15
  import "./chunk-Y2JP6WFP.js";
@@ -25,4 +25,4 @@ export {
25
25
  registerCleanBugsnagErrorsFromWithinPlugins,
26
26
  sendErrorToBugsnag
27
27
  };
28
- //# sourceMappingURL=error-handler-EVQNKREX.js.map
28
+ //# sourceMappingURL=error-handler-M3MNE2JX.js.map
@@ -3,16 +3,16 @@ import {
3
3
  } from "../chunk-CP3BRHWK.js";
4
4
  import {
5
5
  reportAnalyticsEvent
6
- } from "../chunk-SMNBH5GN.js";
7
- import "../chunk-G247P2WG.js";
6
+ } from "../chunk-APC5TGT7.js";
7
+ import "../chunk-F7XIUISB.js";
8
8
  import "../chunk-25IMI7TH.js";
9
- import "../chunk-KXFF4CGE.js";
9
+ import "../chunk-XCAGLQZT.js";
10
10
  import {
11
11
  addSensitiveMetadata,
12
12
  getAllSensitiveMetadata,
13
13
  outputDebug,
14
14
  renderWarning
15
- } from "../chunk-H7IST3XL.js";
15
+ } from "../chunk-BRA57BDM.js";
16
16
  import "../chunk-H3GWNOGA.js";
17
17
  import "../chunk-UMUTXITN.js";
18
18
  import "../chunk-Y2JP6WFP.js";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  fetchNotificationsInBackground
3
- } from "../chunk-FCJKXKY5.js";
3
+ } from "../chunk-I5QSPA3G.js";
4
4
  import {
5
5
  CLI_KIT_VERSION,
6
6
  startAnalytics
7
- } from "../chunk-G247P2WG.js";
7
+ } from "../chunk-F7XIUISB.js";
8
8
  import "../chunk-25IMI7TH.js";
9
9
  import {
10
10
  checkForCachedNewVersion,
11
11
  checkForNewVersion,
12
12
  packageManagerFromUserAgent,
13
13
  runAtMinimumInterval
14
- } from "../chunk-KXFF4CGE.js";
14
+ } from "../chunk-XCAGLQZT.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-H7IST3XL.js";
23
+ } from "../chunk-BRA57BDM.js";
24
24
  import "../chunk-H3GWNOGA.js";
25
25
  import "../chunk-UMUTXITN.js";
26
26
  import "../chunk-Y2JP6WFP.js";
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  errorHandler,
9
9
  registerCleanBugsnagErrorsFromWithinPlugins,
10
10
  require_end_of_stream
11
- } from "./chunk-FZ64J6AA.js";
11
+ } from "./chunk-GYAMBODZ.js";
12
12
  import {
13
13
  setNextDeprecationDate
14
14
  } from "./chunk-CP3BRHWK.js";
@@ -17,11 +17,11 @@ import {
17
17
  getListOfTunnelPlugins,
18
18
  reportAnalyticsEvent,
19
19
  requestIdsCollection
20
- } from "./chunk-SMNBH5GN.js";
20
+ } from "./chunk-APC5TGT7.js";
21
21
  import {
22
22
  setCurrentCommandId,
23
23
  showNotificationsIfNeeded
24
- } from "./chunk-FCJKXKY5.js";
24
+ } from "./chunk-I5QSPA3G.js";
25
25
  import {
26
26
  CLI_KIT_VERSION,
27
27
  ClientError,
@@ -73,7 +73,7 @@ import {
73
73
  setLastSeenUserIdAfterAuth,
74
74
  shopifyFetch,
75
75
  z
76
- } from "./chunk-G247P2WG.js";
76
+ } from "./chunk-F7XIUISB.js";
77
77
  import "./chunk-25IMI7TH.js";
78
78
  import {
79
79
  LocalStorage,
@@ -98,7 +98,7 @@ import {
98
98
  usesWorkspaces,
99
99
  versionSatisfies,
100
100
  writePackageJSON
101
- } from "./chunk-KXFF4CGE.js";
101
+ } from "./chunk-XCAGLQZT.js";
102
102
  import {
103
103
  AbortController as AbortController2,
104
104
  AbortError,
@@ -294,7 +294,7 @@ import {
294
294
  username,
295
295
  writeFile,
296
296
  writeFileSync
297
- } from "./chunk-H7IST3XL.js";
297
+ } from "./chunk-BRA57BDM.js";
298
298
  import {
299
299
  require_brace_expansion,
300
300
  require_commonjs,
@@ -194445,7 +194445,7 @@ function loadFwConfigFile(rootPath, fwConfigFileName, fwConfigFiles = {}) {
194445
194445
 
194446
194446
  // ../cli-kit/dist/public/node/toml.js
194447
194447
  init_cjs_shims();
194448
- var toml = __toESM(require_toml());
194448
+ var toml = __toESM(require_toml(), 1);
194449
194449
  function decodeToml(input) {
194450
194450
  let normalizedInput = input.replace(/\r\n$/g, `
194451
194451
  `);
@@ -199451,7 +199451,8 @@ function numberFromGid(gid) {
199451
199451
  return gid.startsWith("gid://") ? Number(gid.match(/^gid.*\/(\d+)$/)[1]) : Number(gid);
199452
199452
  }
199453
199453
  async function appDeepLink({ id, organizationId }) {
199454
- return `https://${await developerDashboardFqdn()}/dashboard/${organizationId}/apps/${numberFromGid(id)}`;
199454
+ let orgId = numberFromGid(organizationId).toString();
199455
+ return `https://${await developerDashboardFqdn()}/dashboard/${orgId}/apps/${numberFromGid(id)}`;
199455
199456
  }
199456
199457
  async function versionDeepLink(organizationId, appId, versionId) {
199457
199458
  return `${await appDeepLink({ organizationId, id: appId })}/versions/${numberFromGid(versionId)}`;
@@ -199700,7 +199701,7 @@ function partition(collection, callback) {
199700
199701
  }
199701
199702
 
199702
199703
  // ../app/dist/cli/services/context/id-matching.js
199703
- var sameTypeAndName = (local, remote) => remote.type.toLowerCase() === local.graphQLType.toLowerCase() && slugify(remote.title) === slugify(local.handle);
199704
+ var sameTypeAndName = (local, remote) => (remote.type.toLowerCase() === local.graphQLType.toLowerCase() || remote.type.toLowerCase() === local.externalType.toLowerCase() || remote.type.toLowerCase() === local.type.toLowerCase()) && slugify(remote.title) === slugify(local.handle);
199704
199705
  function matchByNameAndType(local, remote) {
199705
199706
  let uniqueLocal = uniqBy(local, (elem) => [elem.graphQLType, elem.handle]), uniqueRemote = uniqBy(remote, (elem) => [elem.type, elem.title]), matched = {};
199706
199707
  uniqueLocal.forEach((localSource) => {
@@ -201446,7 +201447,7 @@ init_cjs_shims();
201446
201447
  init_cjs_shims();
201447
201448
  import { fileURLToPath as fileURLToPath2 } from "node:url";
201448
201449
  async function launchCLI(options2) {
201449
- let { errorHandler: errorHandler3 } = await import("./error-handler-EVQNKREX.js"), { isDevelopment: isDevelopment2 } = await import("./local-VKFRWXVO.js"), oclif = await import("./lib-CLQ247I5.js"), { ShopifyConfig } = await import("./custom-oclif-loader-F65UIOYS.js");
201450
+ let { errorHandler: errorHandler3 } = await import("./error-handler-M3MNE2JX.js"), { isDevelopment: isDevelopment2 } = await import("./local-ZJSQNOBS.js"), oclif = await import("./lib-CLQ247I5.js"), { ShopifyConfig } = await import("./custom-oclif-loader-U7MCMR24.js");
201450
201451
  isDevelopment2() && (oclif.default.settings.debug = !0);
201451
201452
  try {
201452
201453
  let config2 = new ShopifyConfig({ root: fileURLToPath2(options2.moduleURL) });
@@ -201461,7 +201462,7 @@ var import_core3 = __toESM(require_lib2());
201461
201462
  async function exitIfOldNodeVersion(versions2 = process.versions) {
201462
201463
  let nodeVersion = versions2.node, nodeMajorVersion = Number(nodeVersion.split(".")[0]);
201463
201464
  if (nodeMajorVersion < 18) {
201464
- let { renderError: renderError2 } = await import("./ui-JQST66AX.js");
201465
+ let { renderError: renderError2 } = await import("./ui-5P6JUXXH.js");
201465
201466
  renderError2({
201466
201467
  headline: "Upgrade to a supported Node version now.",
201467
201468
  body: [
@@ -201488,7 +201489,7 @@ async function runCLI(options2, launchCLI2 = launchCLI, argv = process.argv, env
201488
201489
  return setupEnvironmentVariables(options2, argv, env), options2.runInCreateMode && await addInitToArgvWhenRunningCreateCLI(options2, argv), forceNoColor(argv, env), await exitIfOldNodeVersion(versions2), launchCLI2({ moduleURL: options2.moduleURL });
201489
201490
  }
201490
201491
  async function addInitToArgvWhenRunningCreateCLI(options2, argv = process.argv) {
201491
- let { findUpAndReadPackageJson: findUpAndReadPackageJson2 } = await import("./node-package-manager-VP5J3BKI.js"), { moduleDirectory: moduleDirectory2 } = await import("./path-COZT77T2.js"), name = (await findUpAndReadPackageJson2(moduleDirectory2(options2.moduleURL))).content.name.replace("@shopify/create-", "");
201492
+ let { findUpAndReadPackageJson: findUpAndReadPackageJson2 } = await import("./node-package-manager-ZPABMQVG.js"), { moduleDirectory: moduleDirectory2 } = await import("./path-COZT77T2.js"), name = (await findUpAndReadPackageJson2(moduleDirectory2(options2.moduleURL))).content.name.replace("@shopify/create-", "");
201492
201493
  if (argv.findIndex((arg) => arg.includes("init")) === -1) {
201493
201494
  let initIndex2 = argv.findIndex((arg) => arg.match(new RegExp(`bin(\\/|\\\\)+(create-${name}|dev|run)`))) + 1;
201494
201495
  argv.splice(initIndex2, 0, "init");
@@ -202330,32 +202331,6 @@ async function bundleAndBuildExtensions(options2) {
202330
202331
  // ../app/dist/cli/services/import-extensions.js
202331
202332
  init_cjs_shims();
202332
202333
 
202333
- // ../app/dist/cli/services/extensions/common.js
202334
- init_cjs_shims();
202335
- async function ensureDownloadedExtensionFlavorExists(extensionFlavor, templateDownloadDir) {
202336
- let templatePath = extensionFlavor?.path || "", origin = joinPath(templateDownloadDir, templatePath);
202337
- if (!await fileExists(origin))
202338
- throw new AbortError(`
202339
- The extension is not available for ${extensionFlavor?.value}`);
202340
- return origin;
202341
- }
202342
- async function ensureExtensionDirectoryExists({ name, app }) {
202343
- let hyphenizedName = hyphenate(name), extensionDirectory = joinPath(app.directory, blocks.extensions.directoryName, hyphenizedName);
202344
- if (await fileExists(extensionDirectory))
202345
- throw new AbortError(`
202346
- A directory with this name (${hyphenizedName}) already exists.
202347
- Choose a new name for your extension.`);
202348
- return await mkdir(extensionDirectory), await touchFile(joinPath(extensionDirectory, configurationFileNames.lockFile)), extensionDirectory;
202349
- }
202350
- async function canEnablePreviewMode({ localApp, developerPlatformClient, apiKey, organizationId }) {
202351
- let { dashboardManagedExtensionRegistrations } = (await developerPlatformClient.appExtensionRegistrations({
202352
- id: apiKey,
202353
- apiKey,
202354
- organizationId
202355
- })).app;
202356
- return dashboardManagedExtensionRegistrations.length > 0 || localApp.allExtensions.filter((ext) => ext.isThemeExtension).length > 0 || localApp.allExtensions.length > 0;
202357
- }
202358
-
202359
202334
  // ../app/dist/cli/prompts/import-extensions.js
202360
202335
  init_cjs_shims();
202361
202336
 
@@ -202683,7 +202658,27 @@ async function selectMigrationChoice(migrationChoices) {
202683
202658
  }
202684
202659
 
202685
202660
  // ../app/dist/cli/services/import-extensions.js
202686
- var allExtensionTypes = allMigrationChoices.flatMap((choice) => choice.extensionTypes);
202661
+ var allExtensionTypes = allMigrationChoices.flatMap((choice) => choice.extensionTypes), DirectoryAction;
202662
+ (function(DirectoryAction2) {
202663
+ DirectoryAction2.Write = "write", DirectoryAction2.Skip = "skip", DirectoryAction2.Cancel = "cancel";
202664
+ })(DirectoryAction || (DirectoryAction = {}));
202665
+ async function handleExtensionDirectory({ name, app }) {
202666
+ let hyphenizedName = hyphenate(name), extensionDirectory = joinPath(app.directory, blocks.extensions.directoryName, hyphenizedName);
202667
+ if (await fileExists(extensionDirectory)) {
202668
+ let choices = [
202669
+ { label: "Overwrite local TOML with remote configuration", value: DirectoryAction.Write },
202670
+ { label: "Keep local TOML", value: DirectoryAction.Skip },
202671
+ { label: "Cancel", value: DirectoryAction.Cancel }
202672
+ ], action = await renderSelectPrompt({
202673
+ message: `Directory "${hyphenizedName}" already exists. What would you like to do?`,
202674
+ choices
202675
+ });
202676
+ if (action === DirectoryAction.Cancel)
202677
+ throw new AbortSilentError();
202678
+ return { directory: extensionDirectory, action };
202679
+ }
202680
+ return await mkdir(extensionDirectory), await touchFile(joinPath(extensionDirectory, configurationFileNames.lockFile)), { directory: extensionDirectory, action: DirectoryAction.Write };
202681
+ }
202687
202682
  async function importExtensions(options2) {
202688
202683
  let { app, remoteApp, developerPlatformClient, extensionTypes, extensions, buildTomlObject: buildTomlObject6, all } = options2, extensionsToMigrate = extensions.filter((ext) => extensionTypes.includes(ext.type.toLowerCase()));
202689
202684
  if (extensionsToMigrate = filterOutImportedExtensions(app, extensionsToMigrate), extensionsToMigrate.length === 0)
@@ -202695,12 +202690,14 @@ async function importExtensions(options2) {
202695
202690
  promptAnswer !== "All" && (extensionsToMigrate = [extensionsToMigrate.find((ext) => ext?.uuid === promptAnswer)]);
202696
202691
  }
202697
202692
  let extensionUuids = {}, importPromises = extensionsToMigrate.map(async (ext) => {
202698
- let directory = await ensureExtensionDirectoryExists({ app, name: ext.title }), tomlObject = buildTomlObject6(ext, extensions, app.configuration), path = joinPath(directory, "shopify.extension.toml");
202699
- await writeFile(path, tomlObject);
202700
- let handle = slugify(ext.title.substring(0, MAX_EXTENSION_HANDLE_LENGTH));
202701
- extensionUuids[handle] = ext.uuid;
202702
- let lockFilePath = joinPath(directory, configurationFileNames.lockFile);
202703
- return await removeFile(lockFilePath), { extension: ext, directory: joinPath("extensions", basename(directory)) };
202693
+ let { directory, action } = await handleExtensionDirectory({ app, name: ext.title }), handle = slugify(ext.title.substring(0, MAX_EXTENSION_HANDLE_LENGTH));
202694
+ if (extensionUuids[handle] = ext.uuid, action === DirectoryAction.Write) {
202695
+ let tomlObject = buildTomlObject6(ext, extensions, app.configuration), path = joinPath(directory, "shopify.extension.toml");
202696
+ await writeFile(path, tomlObject);
202697
+ let lockFilePath = joinPath(directory, configurationFileNames.lockFile);
202698
+ await removeFile(lockFilePath);
202699
+ }
202700
+ return { extension: ext, directory: joinPath("extensions", basename(directory)) };
202704
202701
  }), generatedExtensions = await Promise.all(importPromises);
202705
202702
  renderSuccessMessages(generatedExtensions), await updateAppIdentifiers({
202706
202703
  app,
@@ -202871,7 +202868,7 @@ async function deploy(options2) {
202871
202868
  }), await updateAppIdentifiers({ app, identifiers, command: "deploy", developerPlatformClient });
202872
202869
  }
202873
202870
  }
202874
- ]), didMigrateExtensionsToDevDash && uploadExtensionsBundleResult.versionTag && await deleteEnvFile(app), await outputCompletionMessage({
202871
+ ]), await outputCompletionMessage({
202875
202872
  app,
202876
202873
  release: release2,
202877
202874
  uploadExtensionsBundleResult,
@@ -202882,9 +202879,6 @@ async function deploy(options2) {
202882
202879
  }
202883
202880
  return { app };
202884
202881
  }
202885
- async function deleteEnvFile(app) {
202886
- app.dotenv && fileExistsSync(app.dotenv.path) && await removeFile(app.dotenv.path);
202887
- }
202888
202882
  async function outputCompletionMessage({ app, release: release2, uploadExtensionsBundleResult, didMigrateExtensionsToDevDash }) {
202889
202883
  let linkAndMessage = [
202890
202884
  { link: { label: uploadExtensionsBundleResult.versionTag ?? "version", url: uploadExtensionsBundleResult.location } },
@@ -204644,12 +204638,7 @@ var themeFlags = {
204644
204638
  }),
204645
204639
  password: import_core7.Flags.string({
204646
204640
  description: "Password generated from the Theme Access app.",
204647
- env: "SHOPIFY_CLI_THEME_TOKEN",
204648
- parse: async (input) => {
204649
- if (input.startsWith("shptka_"))
204650
- return input;
204651
- throw new AbortError("Invalid password. Please generate a new password from the Theme Access app.");
204652
- }
204641
+ env: "SHOPIFY_CLI_THEME_TOKEN"
204653
204642
  }),
204654
204643
  store: import_core7.Flags.string({
204655
204644
  char: "s",
@@ -206915,10 +206904,19 @@ async function initializeRepl(adminSession, themeId, url, themeAccessPassword, s
206915
206904
  return replLoop(session, themeId, url);
206916
206905
  }
206917
206906
 
206907
+ // ../theme/dist/cli/services/flags-validation.js
206908
+ init_cjs_shims();
206909
+ function validateThemePassword(password) {
206910
+ if (password && !password.startsWith("shptka_"))
206911
+ throw new AbortError("Invalid password. Please generate a new password from the Theme Access app.");
206912
+ }
206913
+
206918
206914
  // ../theme/dist/cli/commands/theme/console.js
206919
206915
  var import_core9 = __toESM(require_lib2(), 1), _a6, Console = class extends ThemeCommand {
206920
206916
  async run() {
206921
- let { flags } = await this.parse(_a6), store = ensureThemeStore(flags), { url, password: themeAccessPassword } = flags, adminSession = await ensureAuthenticatedThemes(store, themeAccessPassword), { themeId, storePassword } = await ensureReplEnv(adminSession, flags["store-password"]);
206917
+ let { flags } = await this.parse(_a6);
206918
+ validateThemePassword(flags.password);
206919
+ let store = ensureThemeStore(flags), { url, password: themeAccessPassword } = flags, adminSession = await ensureAuthenticatedThemes(store, themeAccessPassword), { themeId, storePassword } = await ensureReplEnv(adminSession, flags["store-password"]);
206922
206920
  await initializeRepl(adminSession, themeId, url, themeAccessPassword, storePassword);
206923
206921
  }
206924
206922
  };
@@ -209527,7 +209525,9 @@ async function writeMetafieldDefinitionsToFile(path, content) {
209527
209525
  var import_core11 = __toESM(require_lib2(), 1);
209528
209526
  var _a8, Dev = class extends ThemeCommand {
209529
209527
  async run() {
209530
- let flags = (await this.parse(_a8)).flags, { ignore: ignore4 = [], only = [] } = flags, store = ensureThemeStore(flags), adminSession = await ensureAuthenticatedThemes(store, flags.password), theme;
209528
+ let flags = (await this.parse(_a8)).flags, { ignore: ignore4 = [], only = [] } = flags;
209529
+ validateThemePassword(flags.password);
209530
+ let store = ensureThemeStore(flags), adminSession = await ensureAuthenticatedThemes(store, flags.password), theme;
209531
209531
  if (flags.theme) {
209532
209532
  let filter = { filter: { theme: flags.theme } };
209533
209533
  theme = await findOrSelectTheme(adminSession, filter), flags = { ...flags, theme: theme.id.toString() };
@@ -213762,7 +213762,9 @@ async function openProfile(profileJson) {
213762
213762
  var import_core17 = __toESM(require_lib2(), 1);
213763
213763
  var _a16, Profile = class extends ThemeCommand {
213764
213764
  async run() {
213765
- let { flags } = await this.parse(_a16), store = ensureThemeStore(flags), { password: themeAccessPassword } = flags, adminSession = await ensureAuthenticatedThemes(store, themeAccessPassword), filter;
213765
+ let { flags } = await this.parse(_a16);
213766
+ validateThemePassword(flags.password);
213767
+ let store = ensureThemeStore(flags), { password: themeAccessPassword } = flags, adminSession = await ensureAuthenticatedThemes(store, themeAccessPassword), filter;
213766
213768
  flags.theme ? filter = { filter: { theme: flags.theme } } : filter = { filter: { live: !0 } };
213767
213769
  let theme = await findOrSelectTheme(adminSession, filter), tasks = [
213768
213770
  {
@@ -218253,6 +218255,32 @@ function isEditionWeek() {
218253
218255
  return now >= editionStart && now <= editionWeekEnd;
218254
218256
  }
218255
218257
 
218258
+ // ../app/dist/cli/services/extensions/common.js
218259
+ init_cjs_shims();
218260
+ async function ensureDownloadedExtensionFlavorExists(extensionFlavor, templateDownloadDir) {
218261
+ let templatePath = extensionFlavor?.path || "", origin = joinPath(templateDownloadDir, templatePath);
218262
+ if (!await fileExists(origin))
218263
+ throw new AbortError(`
218264
+ The extension is not available for ${extensionFlavor?.value}`);
218265
+ return origin;
218266
+ }
218267
+ async function ensureExtensionDirectoryExists({ name, app }) {
218268
+ let hyphenizedName = hyphenate(name), extensionDirectory = joinPath(app.directory, blocks.extensions.directoryName, hyphenizedName);
218269
+ if (await fileExists(extensionDirectory))
218270
+ throw new AbortError(`
218271
+ A directory with this name (${hyphenizedName}) already exists.
218272
+ Choose a new name for your extension.`);
218273
+ return await mkdir(extensionDirectory), await touchFile(joinPath(extensionDirectory, configurationFileNames.lockFile)), extensionDirectory;
218274
+ }
218275
+ async function canEnablePreviewMode({ localApp, developerPlatformClient, apiKey, organizationId }) {
218276
+ let { dashboardManagedExtensionRegistrations } = (await developerPlatformClient.appExtensionRegistrations({
218277
+ id: apiKey,
218278
+ apiKey,
218279
+ organizationId
218280
+ })).app;
218281
+ return dashboardManagedExtensionRegistrations.length > 0 || localApp.allExtensions.filter((ext) => ext.isThemeExtension).length > 0 || localApp.allExtensions.length > 0;
218282
+ }
218283
+
218256
218284
  // ../app/dist/cli/services/dev/port-warnings.js
218257
218285
  init_cjs_shims();
218258
218286
  function renderPortWarnings(portDetails) {
@@ -220553,14 +220581,13 @@ function getTemplateLanguage(flavor) {
220553
220581
  }
220554
220582
  }
220555
220583
  async function generateExtensionTemplate(options2) {
220556
- let extensionName = options2.extensionChoices.name, extensionFlavorValue = options2.extensionChoices.flavor, extensionFlavor = options2.extensionTemplate.supportedFlavors.find((flavor) => flavor.value === extensionFlavorValue), directory = await ensureExtensionDirectoryExists({ app: options2.app, name: extensionName }), url = options2.cloneUrl ?? options2.extensionTemplate.url, uid = options2.developerPlatformClient.supportsAtomicDeployments ? randomUUID() : void 0, initOptions = {
220584
+ let extensionName = options2.extensionChoices.name, extensionFlavorValue = options2.extensionChoices.flavor, extensionFlavor = options2.extensionTemplate.supportedFlavors.find((flavor) => flavor.value === extensionFlavorValue), directory = await ensureExtensionDirectoryExists({ app: options2.app, name: extensionName }), url = options2.cloneUrl ?? options2.extensionTemplate.url, initOptions = {
220557
220585
  directory,
220558
220586
  url,
220559
220587
  app: options2.app,
220560
220588
  type: options2.extensionTemplate.type,
220561
220589
  name: extensionName,
220562
220590
  extensionFlavor,
220563
- uid,
220564
220591
  onGetTemplateRepository: options2.onGetTemplateRepository ?? (async (url2, destination) => {
220565
220592
  await downloadGitRepository({ repoUrl: url2, destination, shallow: !0 });
220566
220593
  })
@@ -220586,13 +220613,13 @@ async function extensionInit(options2) {
220586
220613
  throw await removeFile(options2.directory), error;
220587
220614
  }
220588
220615
  }
220589
- async function themeExtensionInit({ directory, url, type, name, extensionFlavor, uid, onGetTemplateRepository }) {
220616
+ async function themeExtensionInit({ directory, url, type, name, extensionFlavor, onGetTemplateRepository }) {
220590
220617
  return inTemporaryDirectory(async (tmpDir) => {
220591
220618
  let templateDirectory = await downloadOrFindTemplateDirectory(url, extensionFlavor, tmpDir, onGetTemplateRepository);
220592
- await recursiveLiquidTemplateCopy(templateDirectory, directory, { name, type, uid });
220619
+ await recursiveLiquidTemplateCopy(templateDirectory, directory, { name, type, uid: nonRandomUUID(slugify(name)) });
220593
220620
  });
220594
220621
  }
220595
- async function functionExtensionInit({ directory, url, app, name, extensionFlavor, uid, onGetTemplateRepository }) {
220622
+ async function functionExtensionInit({ directory, url, app, name, extensionFlavor, onGetTemplateRepository }) {
220596
220623
  let templateLanguage = getTemplateLanguage(extensionFlavor?.value), taskList = [];
220597
220624
  taskList.push({
220598
220625
  title: "Generating function extension",
@@ -220603,7 +220630,7 @@ async function functionExtensionInit({ directory, url, app, name, extensionFlavo
220603
220630
  name,
220604
220631
  handle: slugify(name),
220605
220632
  flavor: extensionFlavor?.value,
220606
- uid
220633
+ uid: nonRandomUUID(slugify(name))
220607
220634
  });
220608
220635
  }), templateLanguage === "javascript") {
220609
220636
  let srcFileExtension = getSrcFileExtension(extensionFlavor?.value ?? "rust");
@@ -220628,7 +220655,7 @@ async function functionExtensionInit({ directory, url, app, name, extensionFlavo
220628
220655
  }
220629
220656
  }), await renderTasks(taskList);
220630
220657
  }
220631
- async function uiExtensionInit({ directory, url, app, name, extensionFlavor, uid, onGetTemplateRepository }) {
220658
+ async function uiExtensionInit({ directory, url, app, name, extensionFlavor, onGetTemplateRepository }) {
220632
220659
  let templateLanguage = getTemplateLanguage(extensionFlavor?.value), tasks = [
220633
220660
  {
220634
220661
  title: "Generating extension",
@@ -220641,7 +220668,7 @@ async function uiExtensionInit({ directory, url, app, name, extensionFlavor, uid
220641
220668
  name,
220642
220669
  handle: slugify(name),
220643
220670
  flavor: extensionFlavor?.value ?? "",
220644
- uid
220671
+ uid: nonRandomUUID(slugify(name))
220645
220672
  });
220646
220673
  }), templateLanguage === "javascript" && (await changeIndexFileExtension(directory, srcFileExtension), await removeUnwantedTemplateFilesPerFlavor(directory, extensionFlavor.value));
220647
220674
  }
@@ -20,7 +20,7 @@ import {
20
20
  macAddress,
21
21
  opentelemetryDomain,
22
22
  themeToken
23
- } from "./chunk-H7IST3XL.js";
23
+ } from "./chunk-BRA57BDM.js";
24
24
  import "./chunk-H3GWNOGA.js";
25
25
  import "./chunk-UMUTXITN.js";
26
26
  import "./chunk-Y2JP6WFP.js";
@@ -51,4 +51,4 @@ export {
51
51
  opentelemetryDomain,
52
52
  themeToken
53
53
  };
54
- //# sourceMappingURL=local-VKFRWXVO.js.map
54
+ //# sourceMappingURL=local-ZJSQNOBS.js.map
@@ -29,8 +29,8 @@ import {
29
29
  versionSatisfies,
30
30
  writePackageJSON,
31
31
  yarnLockfile
32
- } from "./chunk-KXFF4CGE.js";
33
- import "./chunk-H7IST3XL.js";
32
+ } from "./chunk-XCAGLQZT.js";
33
+ import "./chunk-BRA57BDM.js";
34
34
  import "./chunk-H3GWNOGA.js";
35
35
  import "./chunk-UMUTXITN.js";
36
36
  import "./chunk-Y2JP6WFP.js";
@@ -70,4 +70,4 @@ export {
70
70
  writePackageJSON,
71
71
  yarnLockfile
72
72
  };
73
- //# sourceMappingURL=node-package-manager-VP5J3BKI.js.map
73
+ //# sourceMappingURL=node-package-manager-ZPABMQVG.js.map
@@ -16,7 +16,7 @@ import {
16
16
  renderTasks,
17
17
  renderTextPrompt,
18
18
  renderWarning
19
- } from "./chunk-H7IST3XL.js";
19
+ } from "./chunk-BRA57BDM.js";
20
20
  import "./chunk-H3GWNOGA.js";
21
21
  import "./chunk-UMUTXITN.js";
22
22
  import "./chunk-Y2JP6WFP.js";
@@ -43,4 +43,4 @@ export {
43
43
  renderTextPrompt,
44
44
  renderWarning
45
45
  };
46
- //# sourceMappingURL=ui-JQST66AX.js.map
46
+ //# sourceMappingURL=ui-5P6JUXXH.js.map
@@ -104,5 +104,5 @@
104
104
  "summary": "Create a new app project"
105
105
  }
106
106
  },
107
- "version": "3.84.0"
107
+ "version": "3.84.1"
108
108
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopify/create-app",
3
- "version": "3.84.0",
3
+ "version": "3.84.1",
4
4
  "private": false,
5
5
  "description": "A CLI tool to create a new Shopify app.",
6
6
  "keywords": [
@@ -47,8 +47,8 @@
47
47
  "esbuild": "0.25.5"
48
48
  },
49
49
  "devDependencies": {
50
- "@shopify/cli-kit": "3.84.0",
51
- "@shopify/app": "3.84.0",
50
+ "@shopify/cli-kit": "3.84.1",
51
+ "@shopify/app": "3.84.1",
52
52
  "esbuild-plugin-copy": "^2.1.1",
53
53
  "@vitest/coverage-istanbul": "^3.1.4"
54
54
  },