@shopify/create-app 3.84.0 → 3.84.2

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.
@@ -9,7 +9,7 @@ import {
9
9
  packageManagerFromUserAgent,
10
10
  removeSession,
11
11
  setSession
12
- } from "./chunk-KXFF4CGE.js";
12
+ } from "./chunk-REUQOPSX.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-UVDRANBC.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.2";
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-5OIQQPNB.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-5OIQQPNB.js";
6
6
  import {
7
7
  cacheRetrieve,
8
8
  cacheStore,
9
9
  versionSatisfies
10
- } from "./chunk-KXFF4CGE.js";
10
+ } from "./chunk-REUQOPSX.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-UVDRANBC.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-PHJKJBTD.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-QPODWYGT.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-UVDRANBC.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-REUQOPSX.js.map
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  fanoutHooks,
3
3
  reportAnalyticsEvent
4
- } from "./chunk-SMNBH5GN.js";
4
+ } from "./chunk-X3DDDXQD.js";
5
5
  import {
6
6
  CLI_KIT_VERSION,
7
7
  getEnvironmentData
8
- } from "./chunk-G247P2WG.js";
8
+ } from "./chunk-5OIQQPNB.js";
9
9
  import {
10
10
  runWithRateLimit
11
- } from "./chunk-KXFF4CGE.js";
11
+ } from "./chunk-REUQOPSX.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-UVDRANBC.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-SLM4SKAZ.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-PHJKJBTD.js");
23235
23235
  await sendErrorToBugsnag(error, "unexpected_error");
23236
23236
  }
23237
23237
  }, durationStack = [];
@@ -28834,7 +28834,7 @@ init_cjs_shims();
28834
28834
 
28835
28835
  // ../cli-kit/dist/public/common/function.js
28836
28836
  init_cjs_shims();
28837
- var import_memoize = __toESM(require_memoize(), 1), import_debounce = __toESM(require_debounce(), 1), import_throttle2 = __toESM(require_throttle(), 1);
28837
+ var import_memoize = __toESM(require_memoize()), import_debounce = __toESM(require_debounce()), import_throttle2 = __toESM(require_throttle());
28838
28838
  function debounce(func, wait, options) {
28839
28839
  return (0, import_debounce.default)(func, wait, options);
28840
28840
  }
@@ -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-UVDRANBC.js.map
@@ -4,10 +4,10 @@ import {
4
4
  getEnvironmentData,
5
5
  getLastSeenUserIdAfterAuth,
6
6
  getSensitiveEnvironmentData
7
- } from "./chunk-G247P2WG.js";
7
+ } from "./chunk-5OIQQPNB.js";
8
8
  import {
9
9
  runWithRateLimit
10
- } from "./chunk-KXFF4CGE.js";
10
+ } from "./chunk-REUQOPSX.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-UVDRANBC.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-X3DDDXQD.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  execaSync,
3
3
  fileExistsSync
4
- } from "./chunk-H7IST3XL.js";
4
+ } from "./chunk-UVDRANBC.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-IJRHD7VF.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-SLM4SKAZ.js";
8
+ import "./chunk-X3DDDXQD.js";
9
+ import "./chunk-5OIQQPNB.js";
10
10
  import "./chunk-25IMI7TH.js";
11
- import "./chunk-KXFF4CGE.js";
12
- import "./chunk-H7IST3XL.js";
11
+ import "./chunk-REUQOPSX.js";
12
+ import "./chunk-UVDRANBC.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-PHJKJBTD.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-X3DDDXQD.js";
7
+ import "../chunk-5OIQQPNB.js";
8
8
  import "../chunk-25IMI7TH.js";
9
- import "../chunk-KXFF4CGE.js";
9
+ import "../chunk-REUQOPSX.js";
10
10
  import {
11
11
  addSensitiveMetadata,
12
12
  getAllSensitiveMetadata,
13
13
  outputDebug,
14
14
  renderWarning
15
- } from "../chunk-H7IST3XL.js";
15
+ } from "../chunk-UVDRANBC.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-QPODWYGT.js";
4
4
  import {
5
5
  CLI_KIT_VERSION,
6
6
  startAnalytics
7
- } from "../chunk-G247P2WG.js";
7
+ } from "../chunk-5OIQQPNB.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-REUQOPSX.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-UVDRANBC.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-SLM4SKAZ.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-X3DDDXQD.js";
21
21
  import {
22
22
  setCurrentCommandId,
23
23
  showNotificationsIfNeeded
24
- } from "./chunk-FCJKXKY5.js";
24
+ } from "./chunk-QPODWYGT.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-5OIQQPNB.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-REUQOPSX.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-UVDRANBC.js";
298
298
  import {
299
299
  require_brace_expansion,
300
300
  require_commonjs,
@@ -197219,7 +197219,8 @@ var ActiveAppReleaseFromApiKey = {
197219
197219
  }
197220
197220
  ]
197221
197221
  }
197222
- }
197222
+ },
197223
+ { kind: "Field", name: { kind: "Name", value: "grantedShopifyApprovalScopes" } }
197223
197224
  ]
197224
197225
  }
197225
197226
  },
@@ -198867,14 +198868,14 @@ var TEMPLATE_JSON_URL = "https://cdn.shopify.com/static/cli/extensions/templates
198867
198868
  return (await this.session()).accountInfo;
198868
198869
  }
198869
198870
  async appFromIdentifiers(apiKey) {
198870
- let { app } = await this.activeAppVersionRawResult(apiKey), { name, appModules } = app.activeRelease.version, appAccessModule = appModules.find((mod) => mod.specification.externalIdentifier === "app_access"), appHomeModule = appModules.find((mod) => mod.specification.externalIdentifier === "app_home"), apiSecretKeys = app.activeRoot.clientCredentials.secrets.map((secret) => ({ secret: secret.key }));
198871
+ let { app } = await this.activeAppVersionRawResult(apiKey), { name, appModules } = app.activeRelease.version, appHomeModule = appModules.find((mod) => mod.specification.externalIdentifier === "app_home"), apiSecretKeys = app.activeRoot.clientCredentials.secrets.map((secret) => ({ secret: secret.key }));
198871
198872
  return {
198872
198873
  id: app.id,
198873
198874
  title: name,
198874
198875
  apiKey: app.key,
198875
198876
  apiSecretKeys,
198876
198877
  organizationId: String(numberFromGid(app.organizationId)),
198877
- grantedScopes: appAccessModule?.config?.scopes ?? [],
198878
+ grantedScopes: app.activeRoot.grantedShopifyApprovalScopes,
198878
198879
  applicationUrl: appHomeModule?.config?.app_url,
198879
198880
  flags: [],
198880
198881
  developerPlatformClient: this
@@ -199451,7 +199452,8 @@ function numberFromGid(gid) {
199451
199452
  return gid.startsWith("gid://") ? Number(gid.match(/^gid.*\/(\d+)$/)[1]) : Number(gid);
199452
199453
  }
199453
199454
  async function appDeepLink({ id, organizationId }) {
199454
- return `https://${await developerDashboardFqdn()}/dashboard/${organizationId}/apps/${numberFromGid(id)}`;
199455
+ let orgId = numberFromGid(organizationId).toString();
199456
+ return `https://${await developerDashboardFqdn()}/dashboard/${orgId}/apps/${numberFromGid(id)}`;
199455
199457
  }
199456
199458
  async function versionDeepLink(organizationId, appId, versionId) {
199457
199459
  return `${await appDeepLink({ organizationId, id: appId })}/versions/${numberFromGid(versionId)}`;
@@ -199700,7 +199702,7 @@ function partition(collection, callback) {
199700
199702
  }
199701
199703
 
199702
199704
  // ../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);
199705
+ 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
199706
  function matchByNameAndType(local, remote) {
199705
199707
  let uniqueLocal = uniqBy(local, (elem) => [elem.graphQLType, elem.handle]), uniqueRemote = uniqBy(remote, (elem) => [elem.type, elem.title]), matched = {};
199706
199708
  uniqueLocal.forEach((localSource) => {
@@ -201446,7 +201448,7 @@ init_cjs_shims();
201446
201448
  init_cjs_shims();
201447
201449
  import { fileURLToPath as fileURLToPath2 } from "node:url";
201448
201450
  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");
201451
+ let { errorHandler: errorHandler3 } = await import("./error-handler-PHJKJBTD.js"), { isDevelopment: isDevelopment2 } = await import("./local-KL3Z3TUT.js"), oclif = await import("./lib-CLQ247I5.js"), { ShopifyConfig } = await import("./custom-oclif-loader-IJRHD7VF.js");
201450
201452
  isDevelopment2() && (oclif.default.settings.debug = !0);
201451
201453
  try {
201452
201454
  let config2 = new ShopifyConfig({ root: fileURLToPath2(options2.moduleURL) });
@@ -201461,7 +201463,7 @@ var import_core3 = __toESM(require_lib2());
201461
201463
  async function exitIfOldNodeVersion(versions2 = process.versions) {
201462
201464
  let nodeVersion = versions2.node, nodeMajorVersion = Number(nodeVersion.split(".")[0]);
201463
201465
  if (nodeMajorVersion < 18) {
201464
- let { renderError: renderError2 } = await import("./ui-JQST66AX.js");
201466
+ let { renderError: renderError2 } = await import("./ui-SLWJS67T.js");
201465
201467
  renderError2({
201466
201468
  headline: "Upgrade to a supported Node version now.",
201467
201469
  body: [
@@ -201488,7 +201490,7 @@ async function runCLI(options2, launchCLI2 = launchCLI, argv = process.argv, env
201488
201490
  return setupEnvironmentVariables(options2, argv, env), options2.runInCreateMode && await addInitToArgvWhenRunningCreateCLI(options2, argv), forceNoColor(argv, env), await exitIfOldNodeVersion(versions2), launchCLI2({ moduleURL: options2.moduleURL });
201489
201491
  }
201490
201492
  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-", "");
201493
+ let { findUpAndReadPackageJson: findUpAndReadPackageJson2 } = await import("./node-package-manager-Q5SI4GGN.js"), { moduleDirectory: moduleDirectory2 } = await import("./path-COZT77T2.js"), name = (await findUpAndReadPackageJson2(moduleDirectory2(options2.moduleURL))).content.name.replace("@shopify/create-", "");
201492
201494
  if (argv.findIndex((arg) => arg.includes("init")) === -1) {
201493
201495
  let initIndex2 = argv.findIndex((arg) => arg.match(new RegExp(`bin(\\/|\\\\)+(create-${name}|dev|run)`))) + 1;
201494
201496
  argv.splice(initIndex2, 0, "init");
@@ -202330,32 +202332,6 @@ async function bundleAndBuildExtensions(options2) {
202330
202332
  // ../app/dist/cli/services/import-extensions.js
202331
202333
  init_cjs_shims();
202332
202334
 
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
202335
  // ../app/dist/cli/prompts/import-extensions.js
202360
202336
  init_cjs_shims();
202361
202337
 
@@ -202683,7 +202659,27 @@ async function selectMigrationChoice(migrationChoices) {
202683
202659
  }
202684
202660
 
202685
202661
  // ../app/dist/cli/services/import-extensions.js
202686
- var allExtensionTypes = allMigrationChoices.flatMap((choice) => choice.extensionTypes);
202662
+ var allExtensionTypes = allMigrationChoices.flatMap((choice) => choice.extensionTypes), DirectoryAction;
202663
+ (function(DirectoryAction2) {
202664
+ DirectoryAction2.Write = "write", DirectoryAction2.Skip = "skip", DirectoryAction2.Cancel = "cancel";
202665
+ })(DirectoryAction || (DirectoryAction = {}));
202666
+ async function handleExtensionDirectory({ name, app }) {
202667
+ let hyphenizedName = hyphenate(name), extensionDirectory = joinPath(app.directory, blocks.extensions.directoryName, hyphenizedName);
202668
+ if (await fileExists(extensionDirectory)) {
202669
+ let choices = [
202670
+ { label: "Overwrite local TOML with remote configuration", value: DirectoryAction.Write },
202671
+ { label: "Keep local TOML", value: DirectoryAction.Skip },
202672
+ { label: "Cancel", value: DirectoryAction.Cancel }
202673
+ ], action = await renderSelectPrompt({
202674
+ message: `Directory "${hyphenizedName}" already exists. What would you like to do?`,
202675
+ choices
202676
+ });
202677
+ if (action === DirectoryAction.Cancel)
202678
+ throw new AbortSilentError();
202679
+ return { directory: extensionDirectory, action };
202680
+ }
202681
+ return await mkdir(extensionDirectory), await touchFile(joinPath(extensionDirectory, configurationFileNames.lockFile)), { directory: extensionDirectory, action: DirectoryAction.Write };
202682
+ }
202687
202683
  async function importExtensions(options2) {
202688
202684
  let { app, remoteApp, developerPlatformClient, extensionTypes, extensions, buildTomlObject: buildTomlObject6, all } = options2, extensionsToMigrate = extensions.filter((ext) => extensionTypes.includes(ext.type.toLowerCase()));
202689
202685
  if (extensionsToMigrate = filterOutImportedExtensions(app, extensionsToMigrate), extensionsToMigrate.length === 0)
@@ -202695,12 +202691,14 @@ async function importExtensions(options2) {
202695
202691
  promptAnswer !== "All" && (extensionsToMigrate = [extensionsToMigrate.find((ext) => ext?.uuid === promptAnswer)]);
202696
202692
  }
202697
202693
  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)) };
202694
+ let { directory, action } = await handleExtensionDirectory({ app, name: ext.title }), handle = slugify(ext.title.substring(0, MAX_EXTENSION_HANDLE_LENGTH));
202695
+ if (extensionUuids[handle] = ext.uuid, action === DirectoryAction.Write) {
202696
+ let tomlObject = buildTomlObject6(ext, extensions, app.configuration), path = joinPath(directory, "shopify.extension.toml");
202697
+ await writeFile(path, tomlObject);
202698
+ let lockFilePath = joinPath(directory, configurationFileNames.lockFile);
202699
+ await removeFile(lockFilePath);
202700
+ }
202701
+ return { extension: ext, directory: joinPath("extensions", basename(directory)) };
202704
202702
  }), generatedExtensions = await Promise.all(importPromises);
202705
202703
  renderSuccessMessages(generatedExtensions), await updateAppIdentifiers({
202706
202704
  app,
@@ -202871,7 +202869,7 @@ async function deploy(options2) {
202871
202869
  }), await updateAppIdentifiers({ app, identifiers, command: "deploy", developerPlatformClient });
202872
202870
  }
202873
202871
  }
202874
- ]), didMigrateExtensionsToDevDash && uploadExtensionsBundleResult.versionTag && await deleteEnvFile(app), await outputCompletionMessage({
202872
+ ]), await outputCompletionMessage({
202875
202873
  app,
202876
202874
  release: release2,
202877
202875
  uploadExtensionsBundleResult,
@@ -202882,9 +202880,6 @@ async function deploy(options2) {
202882
202880
  }
202883
202881
  return { app };
202884
202882
  }
202885
- async function deleteEnvFile(app) {
202886
- app.dotenv && fileExistsSync(app.dotenv.path) && await removeFile(app.dotenv.path);
202887
- }
202888
202883
  async function outputCompletionMessage({ app, release: release2, uploadExtensionsBundleResult, didMigrateExtensionsToDevDash }) {
202889
202884
  let linkAndMessage = [
202890
202885
  { link: { label: uploadExtensionsBundleResult.versionTag ?? "version", url: uploadExtensionsBundleResult.location } },
@@ -204644,12 +204639,7 @@ var themeFlags = {
204644
204639
  }),
204645
204640
  password: import_core7.Flags.string({
204646
204641
  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
- }
204642
+ env: "SHOPIFY_CLI_THEME_TOKEN"
204653
204643
  }),
204654
204644
  store: import_core7.Flags.string({
204655
204645
  char: "s",
@@ -206915,10 +206905,19 @@ async function initializeRepl(adminSession, themeId, url, themeAccessPassword, s
206915
206905
  return replLoop(session, themeId, url);
206916
206906
  }
206917
206907
 
206908
+ // ../theme/dist/cli/services/flags-validation.js
206909
+ init_cjs_shims();
206910
+ function validateThemePassword(password) {
206911
+ if (password && !password.startsWith("shptka_"))
206912
+ throw new AbortError("Invalid password. Please generate a new password from the Theme Access app.");
206913
+ }
206914
+
206918
206915
  // ../theme/dist/cli/commands/theme/console.js
206919
206916
  var import_core9 = __toESM(require_lib2(), 1), _a6, Console = class extends ThemeCommand {
206920
206917
  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"]);
206918
+ let { flags } = await this.parse(_a6);
206919
+ validateThemePassword(flags.password);
206920
+ let store = ensureThemeStore(flags), { url, password: themeAccessPassword } = flags, adminSession = await ensureAuthenticatedThemes(store, themeAccessPassword), { themeId, storePassword } = await ensureReplEnv(adminSession, flags["store-password"]);
206922
206921
  await initializeRepl(adminSession, themeId, url, themeAccessPassword, storePassword);
206923
206922
  }
206924
206923
  };
@@ -209527,7 +209526,9 @@ async function writeMetafieldDefinitionsToFile(path, content) {
209527
209526
  var import_core11 = __toESM(require_lib2(), 1);
209528
209527
  var _a8, Dev = class extends ThemeCommand {
209529
209528
  async run() {
209530
- let flags = (await this.parse(_a8)).flags, { ignore: ignore4 = [], only = [] } = flags, store = ensureThemeStore(flags), adminSession = await ensureAuthenticatedThemes(store, flags.password), theme;
209529
+ let flags = (await this.parse(_a8)).flags, { ignore: ignore4 = [], only = [] } = flags;
209530
+ validateThemePassword(flags.password);
209531
+ let store = ensureThemeStore(flags), adminSession = await ensureAuthenticatedThemes(store, flags.password), theme;
209531
209532
  if (flags.theme) {
209532
209533
  let filter = { filter: { theme: flags.theme } };
209533
209534
  theme = await findOrSelectTheme(adminSession, filter), flags = { ...flags, theme: theme.id.toString() };
@@ -213762,7 +213763,9 @@ async function openProfile(profileJson) {
213762
213763
  var import_core17 = __toESM(require_lib2(), 1);
213763
213764
  var _a16, Profile = class extends ThemeCommand {
213764
213765
  async run() {
213765
- let { flags } = await this.parse(_a16), store = ensureThemeStore(flags), { password: themeAccessPassword } = flags, adminSession = await ensureAuthenticatedThemes(store, themeAccessPassword), filter;
213766
+ let { flags } = await this.parse(_a16);
213767
+ validateThemePassword(flags.password);
213768
+ let store = ensureThemeStore(flags), { password: themeAccessPassword } = flags, adminSession = await ensureAuthenticatedThemes(store, themeAccessPassword), filter;
213766
213769
  flags.theme ? filter = { filter: { theme: flags.theme } } : filter = { filter: { live: !0 } };
213767
213770
  let theme = await findOrSelectTheme(adminSession, filter), tasks = [
213768
213771
  {
@@ -218253,6 +218256,32 @@ function isEditionWeek() {
218253
218256
  return now >= editionStart && now <= editionWeekEnd;
218254
218257
  }
218255
218258
 
218259
+ // ../app/dist/cli/services/extensions/common.js
218260
+ init_cjs_shims();
218261
+ async function ensureDownloadedExtensionFlavorExists(extensionFlavor, templateDownloadDir) {
218262
+ let templatePath = extensionFlavor?.path || "", origin = joinPath(templateDownloadDir, templatePath);
218263
+ if (!await fileExists(origin))
218264
+ throw new AbortError(`
218265
+ The extension is not available for ${extensionFlavor?.value}`);
218266
+ return origin;
218267
+ }
218268
+ async function ensureExtensionDirectoryExists({ name, app }) {
218269
+ let hyphenizedName = hyphenate(name), extensionDirectory = joinPath(app.directory, blocks.extensions.directoryName, hyphenizedName);
218270
+ if (await fileExists(extensionDirectory))
218271
+ throw new AbortError(`
218272
+ A directory with this name (${hyphenizedName}) already exists.
218273
+ Choose a new name for your extension.`);
218274
+ return await mkdir(extensionDirectory), await touchFile(joinPath(extensionDirectory, configurationFileNames.lockFile)), extensionDirectory;
218275
+ }
218276
+ async function canEnablePreviewMode({ localApp, developerPlatformClient, apiKey, organizationId }) {
218277
+ let { dashboardManagedExtensionRegistrations } = (await developerPlatformClient.appExtensionRegistrations({
218278
+ id: apiKey,
218279
+ apiKey,
218280
+ organizationId
218281
+ })).app;
218282
+ return dashboardManagedExtensionRegistrations.length > 0 || localApp.allExtensions.filter((ext) => ext.isThemeExtension).length > 0 || localApp.allExtensions.length > 0;
218283
+ }
218284
+
218256
218285
  // ../app/dist/cli/services/dev/port-warnings.js
218257
218286
  init_cjs_shims();
218258
218287
  function renderPortWarnings(portDetails) {
@@ -220553,14 +220582,13 @@ function getTemplateLanguage(flavor) {
220553
220582
  }
220554
220583
  }
220555
220584
  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 = {
220585
+ 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
220586
  directory,
220558
220587
  url,
220559
220588
  app: options2.app,
220560
220589
  type: options2.extensionTemplate.type,
220561
220590
  name: extensionName,
220562
220591
  extensionFlavor,
220563
- uid,
220564
220592
  onGetTemplateRepository: options2.onGetTemplateRepository ?? (async (url2, destination) => {
220565
220593
  await downloadGitRepository({ repoUrl: url2, destination, shallow: !0 });
220566
220594
  })
@@ -220586,13 +220614,13 @@ async function extensionInit(options2) {
220586
220614
  throw await removeFile(options2.directory), error;
220587
220615
  }
220588
220616
  }
220589
- async function themeExtensionInit({ directory, url, type, name, extensionFlavor, uid, onGetTemplateRepository }) {
220617
+ async function themeExtensionInit({ directory, url, type, name, extensionFlavor, onGetTemplateRepository }) {
220590
220618
  return inTemporaryDirectory(async (tmpDir) => {
220591
220619
  let templateDirectory = await downloadOrFindTemplateDirectory(url, extensionFlavor, tmpDir, onGetTemplateRepository);
220592
- await recursiveLiquidTemplateCopy(templateDirectory, directory, { name, type, uid });
220620
+ await recursiveLiquidTemplateCopy(templateDirectory, directory, { name, type, uid: nonRandomUUID(slugify(name)) });
220593
220621
  });
220594
220622
  }
220595
- async function functionExtensionInit({ directory, url, app, name, extensionFlavor, uid, onGetTemplateRepository }) {
220623
+ async function functionExtensionInit({ directory, url, app, name, extensionFlavor, onGetTemplateRepository }) {
220596
220624
  let templateLanguage = getTemplateLanguage(extensionFlavor?.value), taskList = [];
220597
220625
  taskList.push({
220598
220626
  title: "Generating function extension",
@@ -220603,7 +220631,7 @@ async function functionExtensionInit({ directory, url, app, name, extensionFlavo
220603
220631
  name,
220604
220632
  handle: slugify(name),
220605
220633
  flavor: extensionFlavor?.value,
220606
- uid
220634
+ uid: nonRandomUUID(slugify(name))
220607
220635
  });
220608
220636
  }), templateLanguage === "javascript") {
220609
220637
  let srcFileExtension = getSrcFileExtension(extensionFlavor?.value ?? "rust");
@@ -220628,7 +220656,7 @@ async function functionExtensionInit({ directory, url, app, name, extensionFlavo
220628
220656
  }
220629
220657
  }), await renderTasks(taskList);
220630
220658
  }
220631
- async function uiExtensionInit({ directory, url, app, name, extensionFlavor, uid, onGetTemplateRepository }) {
220659
+ async function uiExtensionInit({ directory, url, app, name, extensionFlavor, onGetTemplateRepository }) {
220632
220660
  let templateLanguage = getTemplateLanguage(extensionFlavor?.value), tasks = [
220633
220661
  {
220634
220662
  title: "Generating extension",
@@ -220641,7 +220669,7 @@ async function uiExtensionInit({ directory, url, app, name, extensionFlavor, uid
220641
220669
  name,
220642
220670
  handle: slugify(name),
220643
220671
  flavor: extensionFlavor?.value ?? "",
220644
- uid
220672
+ uid: nonRandomUUID(slugify(name))
220645
220673
  });
220646
220674
  }), templateLanguage === "javascript" && (await changeIndexFileExtension(directory, srcFileExtension), await removeUnwantedTemplateFilesPerFlavor(directory, extensionFlavor.value));
220647
220675
  }
@@ -20,7 +20,7 @@ import {
20
20
  macAddress,
21
21
  opentelemetryDomain,
22
22
  themeToken
23
- } from "./chunk-H7IST3XL.js";
23
+ } from "./chunk-UVDRANBC.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-KL3Z3TUT.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-REUQOPSX.js";
33
+ import "./chunk-UVDRANBC.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-Q5SI4GGN.js.map
@@ -16,7 +16,7 @@ import {
16
16
  renderTasks,
17
17
  renderTextPrompt,
18
18
  renderWarning
19
- } from "./chunk-H7IST3XL.js";
19
+ } from "./chunk-UVDRANBC.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-SLWJS67T.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.2"
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.2",
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.2",
51
+ "@shopify/app": "3.84.2",
52
52
  "esbuild-plugin-copy": "^2.1.1",
53
53
  "@vitest/coverage-istanbul": "^3.1.4"
54
54
  },