@shopify/create-app 3.78.0 → 3.78.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-TZQZBGJA.js";
7
+ } from "./chunk-YKOYLUBN.js";
8
8
  import {
9
9
  runWithRateLimit
10
- } from "./chunk-7CKA5IOI.js";
10
+ } from "./chunk-DLSEULVM.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-DVEXWVPW.js";
27
+ } from "./chunk-PIO22A2A.js";
28
28
  import {
29
29
  __commonJS,
30
30
  __esm,
@@ -15926,4 +15926,4 @@ export {
15926
15926
  requestIdsCollection,
15927
15927
  reportAnalyticsEvent
15928
15928
  };
15929
- //# sourceMappingURL=chunk-DRUQOCHK.js.map
15929
+ //# sourceMappingURL=chunk-6MRAQG44.js.map
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  fanoutHooks,
3
3
  reportAnalyticsEvent
4
- } from "./chunk-DRUQOCHK.js";
4
+ } from "./chunk-6MRAQG44.js";
5
5
  import {
6
6
  CLI_KIT_VERSION,
7
7
  getEnvironmentData
8
- } from "./chunk-TZQZBGJA.js";
8
+ } from "./chunk-YKOYLUBN.js";
9
9
  import {
10
10
  runWithRateLimit
11
- } from "./chunk-7CKA5IOI.js";
11
+ } from "./chunk-DLSEULVM.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-DVEXWVPW.js";
26
+ } from "./chunk-PIO22A2A.js";
27
27
  import {
28
28
  require_lib
29
29
  } from "./chunk-S3QEOIDU.js";
@@ -2133,4 +2133,4 @@ export {
2133
2133
  registerCleanBugsnagErrorsFromWithinPlugins,
2134
2134
  addBugsnagMetadata
2135
2135
  };
2136
- //# sourceMappingURL=chunk-IQB5E27B.js.map
2136
+ //# sourceMappingURL=chunk-BYEWWOVM.js.map
@@ -18,7 +18,7 @@ import {
18
18
  require_get_stream,
19
19
  runWithTimer,
20
20
  writeFile
21
- } from "./chunk-DVEXWVPW.js";
21
+ } from "./chunk-PIO22A2A.js";
22
22
  import {
23
23
  dirname,
24
24
  joinPath
@@ -14831,4 +14831,4 @@ deep-extend/lib/deep-extend.js:
14831
14831
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14832
14832
  *)
14833
14833
  */
14834
- //# sourceMappingURL=chunk-7CKA5IOI.js.map
14834
+ //# sourceMappingURL=chunk-DLSEULVM.js.map
@@ -22455,7 +22455,7 @@ function createRuntimeMetadataContainer(defaultPublicMetadata = {}) {
22455
22455
  try {
22456
22456
  await getAndSet();
22457
22457
  } catch (error) {
22458
- let { sendErrorToBugsnag } = await import("./error-handler-UP2PHFP4.js");
22458
+ let { sendErrorToBugsnag } = await import("./error-handler-EUINVIQB.js");
22459
22459
  await sendErrorToBugsnag(error, "unexpected_error");
22460
22460
  }
22461
22461
  }, durationStack = [];
@@ -30894,6 +30894,9 @@ function mkdirSync(path8) {
30894
30894
  async function removeFile(path8) {
30895
30895
  outputDebug(outputContent`Removing file at ${outputToken.path(path8)}...`), await remove(path8);
30896
30896
  }
30897
+ function removeFileSync(path8) {
30898
+ outputDebug(outputContent`Sync-removing file at ${outputToken.path(path8)}...`), removeSync(path8);
30899
+ }
30897
30900
  async function rmdir(path8, options = {}) {
30898
30901
  let { default: del } = await import("./del-G6PUU7PY.js");
30899
30902
  outputDebug(outputContent`Removing directory at ${outputToken.path(path8)}...`), await del(path8, { force: options.force });
@@ -31458,6 +31461,7 @@ export {
31458
31461
  mkdir,
31459
31462
  mkdirSync,
31460
31463
  removeFile,
31464
+ removeFileSync,
31461
31465
  rmdir,
31462
31466
  isDirectory,
31463
31467
  fileSize,
@@ -31705,4 +31709,4 @@ react-reconciler/cjs/react-reconciler-constants.development.js:
31705
31709
  * LICENSE file in the root directory of this source tree.
31706
31710
  *)
31707
31711
  */
31708
- //# sourceMappingURL=chunk-DVEXWVPW.js.map
31712
+ //# sourceMappingURL=chunk-PIO22A2A.js.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  CLI_KIT_VERSION,
3
3
  z
4
- } from "./chunk-TZQZBGJA.js";
4
+ } from "./chunk-YKOYLUBN.js";
5
5
  import {
6
6
  cacheRetrieve,
7
7
  cacheStore,
8
8
  versionSatisfies
9
- } from "./chunk-7CKA5IOI.js";
9
+ } from "./chunk-DLSEULVM.js";
10
10
  import {
11
11
  AbortSilentError,
12
12
  exec,
@@ -16,7 +16,7 @@ import {
16
16
  renderError,
17
17
  renderInfo,
18
18
  renderWarning
19
- } from "./chunk-DVEXWVPW.js";
19
+ } from "./chunk-PIO22A2A.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-UP2PHFP4.js");
87
+ let { sendErrorToBugsnag } = await import("./error-handler-EUINVIQB.js");
88
88
  await sendErrorToBugsnag(errorMessage, "unexpected_error");
89
89
  }
90
90
  }
@@ -173,4 +173,4 @@ export {
173
173
  showNotificationsIfNeeded,
174
174
  fetchNotificationsInBackground
175
175
  };
176
- //# sourceMappingURL=chunk-JLQPPUUW.js.map
176
+ //# sourceMappingURL=chunk-RLKXROME.js.map
@@ -9,7 +9,7 @@ import {
9
9
  packageManagerFromUserAgent,
10
10
  removeSession,
11
11
  setSession
12
- } from "./chunk-7CKA5IOI.js";
12
+ } from "./chunk-DLSEULVM.js";
13
13
  import {
14
14
  AbortError,
15
15
  BugError,
@@ -49,7 +49,7 @@ import {
49
49
  sleep,
50
50
  spinFqdn,
51
51
  themeToken
52
- } from "./chunk-DVEXWVPW.js";
52
+ } from "./chunk-PIO22A2A.js";
53
53
  import {
54
54
  cwd
55
55
  } from "./chunk-ZUCWDIGE.js";
@@ -26951,7 +26951,7 @@ var require_form_data = __commonJS({
26951
26951
 
26952
26952
  // ../cli-kit/dist/public/common/version.js
26953
26953
  init_cjs_shims();
26954
- var CLI_KIT_VERSION = "3.78.0";
26954
+ var CLI_KIT_VERSION = "3.78.1";
26955
26955
 
26956
26956
  // ../cli-kit/dist/private/node/analytics.js
26957
26957
  init_cjs_shims();
@@ -30966,7 +30966,7 @@ async function normalizeStoreFqdn(store2) {
30966
30966
 
30967
30967
  // ../cli-kit/dist/public/node/http.js
30968
30968
  init_cjs_shims();
30969
- var import_form_data = __toESM(require_form_data(), 1);
30969
+ var import_form_data = __toESM(require_form_data());
30970
30970
 
30971
30971
  // ../../node_modules/.pnpm/node-fetch@3.3.2/node_modules/node-fetch/src/index.js
30972
30972
  init_cjs_shims();
@@ -32535,4 +32535,4 @@ mime-types/index.js:
32535
32535
  * MIT Licensed
32536
32536
  *)
32537
32537
  */
32538
- //# sourceMappingURL=chunk-TZQZBGJA.js.map
32538
+ //# sourceMappingURL=chunk-YKOYLUBN.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  execaSync,
3
3
  fileExistsSync
4
- } from "./chunk-DVEXWVPW.js";
4
+ } from "./chunk-PIO22A2A.js";
5
5
  import {
6
6
  require_lib
7
7
  } from "./chunk-S3QEOIDU.js";
@@ -43,4 +43,4 @@ var import_core = __toESM(require_lib(), 1), ShopifyConfig = class extends impor
43
43
  export {
44
44
  ShopifyConfig
45
45
  };
46
- //# sourceMappingURL=custom-oclif-loader-NSO2JRGJ.js.map
46
+ //# sourceMappingURL=custom-oclif-loader-RG432YHP.js.map
@@ -4,12 +4,12 @@ import {
4
4
  errorHandler,
5
5
  registerCleanBugsnagErrorsFromWithinPlugins,
6
6
  sendErrorToBugsnag
7
- } from "./chunk-IQB5E27B.js";
8
- import "./chunk-DRUQOCHK.js";
9
- import "./chunk-TZQZBGJA.js";
7
+ } from "./chunk-BYEWWOVM.js";
8
+ import "./chunk-6MRAQG44.js";
9
+ import "./chunk-YKOYLUBN.js";
10
10
  import "./chunk-25IMI7TH.js";
11
- import "./chunk-7CKA5IOI.js";
12
- import "./chunk-DVEXWVPW.js";
11
+ import "./chunk-DLSEULVM.js";
12
+ import "./chunk-PIO22A2A.js";
13
13
  import "./chunk-S3QEOIDU.js";
14
14
  import "./chunk-3I3GQNEW.js";
15
15
  import "./chunk-ZUCWDIGE.js";
@@ -28,4 +28,4 @@ export {
28
28
  registerCleanBugsnagErrorsFromWithinPlugins,
29
29
  sendErrorToBugsnag
30
30
  };
31
- //# sourceMappingURL=error-handler-UP2PHFP4.js.map
31
+ //# sourceMappingURL=error-handler-EUINVIQB.js.map
@@ -3,16 +3,16 @@ import {
3
3
  } from "../chunk-CP3BRHWK.js";
4
4
  import {
5
5
  reportAnalyticsEvent
6
- } from "../chunk-DRUQOCHK.js";
7
- import "../chunk-TZQZBGJA.js";
6
+ } from "../chunk-6MRAQG44.js";
7
+ import "../chunk-YKOYLUBN.js";
8
8
  import "../chunk-25IMI7TH.js";
9
- import "../chunk-7CKA5IOI.js";
9
+ import "../chunk-DLSEULVM.js";
10
10
  import {
11
11
  addSensitiveMetadata,
12
12
  getAllSensitiveMetadata,
13
13
  outputDebug,
14
14
  renderWarning
15
- } from "../chunk-DVEXWVPW.js";
15
+ } from "../chunk-PIO22A2A.js";
16
16
  import "../chunk-S3QEOIDU.js";
17
17
  import "../chunk-3I3GQNEW.js";
18
18
  import "../chunk-ZUCWDIGE.js";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  fetchNotificationsInBackground
3
- } from "../chunk-JLQPPUUW.js";
3
+ } from "../chunk-RLKXROME.js";
4
4
  import {
5
5
  CLI_KIT_VERSION,
6
6
  startAnalytics
7
- } from "../chunk-TZQZBGJA.js";
7
+ } from "../chunk-YKOYLUBN.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-7CKA5IOI.js";
14
+ } from "../chunk-DLSEULVM.js";
15
15
  import {
16
16
  currentProcessIsGlobal,
17
17
  inferPackageManagerForGlobalCLI,
@@ -19,7 +19,7 @@ import {
19
19
  outputDebug,
20
20
  outputToken,
21
21
  outputWarn
22
- } from "../chunk-DVEXWVPW.js";
22
+ } from "../chunk-PIO22A2A.js";
23
23
  import "../chunk-S3QEOIDU.js";
24
24
  import "../chunk-3I3GQNEW.js";
25
25
  import "../chunk-ZUCWDIGE.js";
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  errorHandler,
13
13
  registerCleanBugsnagErrorsFromWithinPlugins,
14
14
  require_end_of_stream
15
- } from "./chunk-IQB5E27B.js";
15
+ } from "./chunk-BYEWWOVM.js";
16
16
  import {
17
17
  setNextDeprecationDate
18
18
  } from "./chunk-CP3BRHWK.js";
@@ -21,11 +21,11 @@ import {
21
21
  getListOfTunnelPlugins,
22
22
  reportAnalyticsEvent,
23
23
  requestIdsCollection
24
- } from "./chunk-DRUQOCHK.js";
24
+ } from "./chunk-6MRAQG44.js";
25
25
  import {
26
26
  setCurrentCommandId,
27
27
  showNotificationsIfNeeded
28
- } from "./chunk-JLQPPUUW.js";
28
+ } from "./chunk-RLKXROME.js";
29
29
  import {
30
30
  CLI_KIT_VERSION,
31
31
  ClientError,
@@ -61,7 +61,7 @@ import {
61
61
  setLastSeenUserIdAfterAuth,
62
62
  shopifyFetch,
63
63
  z
64
- } from "./chunk-TZQZBGJA.js";
64
+ } from "./chunk-YKOYLUBN.js";
65
65
  import "./chunk-25IMI7TH.js";
66
66
  import {
67
67
  LocalStorage,
@@ -85,7 +85,7 @@ import {
85
85
  usesWorkspaces,
86
86
  versionSatisfies,
87
87
  writePackageJSON
88
- } from "./chunk-7CKA5IOI.js";
88
+ } from "./chunk-DLSEULVM.js";
89
89
  import {
90
90
  AbortController as AbortController2,
91
91
  AbortError,
@@ -192,6 +192,7 @@ import {
192
192
  readFile,
193
193
  readFileSync,
194
194
  removeFile,
195
+ removeFileSync,
195
196
  render,
196
197
  renderAutocompletePrompt,
197
198
  renderConcurrent,
@@ -282,7 +283,7 @@ import {
282
283
  username,
283
284
  writeFile,
284
285
  writeFileSync
285
- } from "./chunk-DVEXWVPW.js";
286
+ } from "./chunk-PIO22A2A.js";
286
287
  import {
287
288
  require_brace_expansion,
288
289
  require_lib as require_lib2
@@ -183637,17 +183638,18 @@ var WebConfigurationAuthCallbackPathSchema = z.preprocess(ensurePathStartsWithSl
183637
183638
  this.realExtensions = this.realExtensions.filter((ext) => ext.uid !== extensionUid);
183638
183639
  }
183639
183640
  async generateExtensionTypes() {
183640
- let typeFilePath = joinPath(this.directory, "shopify.d.ts"), firstImport = "", sharedTypes = await Promise.all(this.allExtensions.map((extension) => extension.contributeToSharedTypeFile(typeFilePath))), combinedDefinitions = /* @__PURE__ */ new Set();
183641
- if (sharedTypes.forEach((shared) => {
183642
- shared.forEach(({ libraryRoot, definition }) => {
183643
- firstImport || (firstImport = `import './${relativePath(this.directory, libraryRoot)}';
183644
- `), combinedDefinitions.add(definition);
183645
- });
183646
- }), combinedDefinitions.size === 0)
183647
- return;
183648
- let originalContent = fileExistsSync(typeFilePath) ? readFileSync(typeFilePath).toString() : "", typeContent = [firstImport, ...Array.from(combinedDefinitions)].join(`
183641
+ let typeDefinitionsByFile = /* @__PURE__ */ new Map();
183642
+ await Promise.all(this.allExtensions.map((extension) => extension.contributeToSharedTypeFile(typeDefinitionsByFile))), typeDefinitionsByFile.forEach((types, typeFilePath) => {
183643
+ let exists2 = fileExistsSync(typeFilePath);
183644
+ if (types.size === 0) {
183645
+ exists2 && removeFileSync(typeFilePath);
183646
+ return;
183647
+ }
183648
+ let originalContent = exists2 ? readFileSync(typeFilePath).toString() : "", typeContent = [`import '@shopify/ui-extension';
183649
+ `, ...Array.from(types)].join(`
183649
183650
  `);
183650
- originalContent !== typeContent && writeFileSync(typeFilePath, typeContent);
183651
+ originalContent !== typeContent && writeFileSync(typeFilePath, typeContent);
183652
+ });
183651
183653
  }
183652
183654
  get includeConfigOnDeploy() {
183653
183655
  return isLegacyAppSchema(this.configuration) ? !1 : this.appManagementApiEnabled ? !0 : this.configuration.build?.include_config_on_deploy;
@@ -184510,8 +184512,8 @@ var CONFIG_EXTENSION_IDS = [
184510
184512
  patchWithAppDevURLs(urls) {
184511
184513
  this.specification.patchWithAppDevURLs && this.specification.patchWithAppDevURLs(this.configuration, urls);
184512
184514
  }
184513
- async contributeToSharedTypeFile(typeFilePath) {
184514
- return this.specification.contributeToSharedTypeFile?.(this, typeFilePath) ?? [];
184515
+ async contributeToSharedTypeFile(typeDefinitionsByFile) {
184516
+ await this.specification.contributeToSharedTypeFile?.(this, typeDefinitionsByFile);
184515
184517
  }
184516
184518
  buildHandle() {
184517
184519
  switch (this.specification.uidStrategy) {
@@ -186064,22 +186066,33 @@ var require2 = createRequire(import.meta.url), dependency5 = "@shopify/checkout-
186064
186066
  };
186065
186067
  },
186066
186068
  hasExtensionPointTarget: (config2, requestedTarget) => config2.extension_points.find((extensionPoint) => extensionPoint.target === requestedTarget) !== void 0,
186067
- contributeToSharedTypeFile: async (extension, typeFilePath) => {
186068
- let sharedTypes = [];
186069
+ contributeToSharedTypeFile: async (extension, typeDefinitionsByFile) => {
186069
186070
  if (!isRemoteDomExtension(extension.configuration))
186070
- return sharedTypes;
186071
+ return;
186071
186072
  let { configuration } = extension;
186072
186073
  for await (let extensionPoint of configuration.extension_points) {
186073
- let fullPath = joinPath(extension.directory, extensionPoint.module), fileExtension = fullPath.split(".").pop(), exists2 = await fileExists(fullPath);
186074
- if (!fileExtension || !exists2)
186074
+ let fullPath = joinPath(extension.directory, extensionPoint.module);
186075
+ if (!await fileExists(fullPath))
186076
+ continue;
186077
+ let mainTsConfigDir = await findNearestTsConfigDir(fullPath, extension.directory);
186078
+ if (!mainTsConfigDir)
186075
186079
  continue;
186076
- let mainTypes = getSharedTypeDefinition(fullPath, typeFilePath, extensionPoint.target, configuration.api_version);
186077
- if (mainTypes && sharedTypes.push(mainTypes), extensionPoint.build_manifest.assets[AssetIdentifier.ShouldRender]?.module) {
186078
- let shouldRenderTypes = getSharedTypeDefinition(joinPath(extension.directory, extensionPoint.build_manifest.assets[AssetIdentifier.ShouldRender].module), typeFilePath, getShouldRenderTarget(extensionPoint.target), configuration.api_version);
186079
- shouldRenderTypes && sharedTypes.push(shouldRenderTypes);
186080
+ let mainTypeFilePath = joinPath(mainTsConfigDir, "shopify.d.ts"), mainTypes = getSharedTypeDefinition(fullPath, mainTypeFilePath, extensionPoint.target, configuration.api_version);
186081
+ if (mainTypes) {
186082
+ let currentTypes = typeDefinitionsByFile.get(mainTypeFilePath) ?? /* @__PURE__ */ new Set();
186083
+ currentTypes.add(mainTypes), typeDefinitionsByFile.set(mainTypeFilePath, currentTypes);
186084
+ }
186085
+ if (extensionPoint.build_manifest.assets[AssetIdentifier.ShouldRender]?.module) {
186086
+ let shouldRenderTsConfigDir = await findNearestTsConfigDir(joinPath(extension.directory, extensionPoint.build_manifest.assets[AssetIdentifier.ShouldRender].module), extension.directory);
186087
+ if (!shouldRenderTsConfigDir)
186088
+ continue;
186089
+ let shouldRenderTypeFilePath = joinPath(shouldRenderTsConfigDir, "shopify.d.ts"), shouldRenderTypes = getSharedTypeDefinition(joinPath(extension.directory, extensionPoint.build_manifest.assets[AssetIdentifier.ShouldRender].module), shouldRenderTypeFilePath, getShouldRenderTarget(extensionPoint.target), configuration.api_version);
186090
+ if (shouldRenderTypes) {
186091
+ let currentTypes = typeDefinitionsByFile.get(shouldRenderTypeFilePath) ?? /* @__PURE__ */ new Set();
186092
+ currentTypes.add(shouldRenderTypes), typeDefinitionsByFile.set(shouldRenderTypeFilePath, currentTypes);
186093
+ }
186080
186094
  }
186081
186095
  }
186082
- return sharedTypes;
186083
186096
  }
186084
186097
  });
186085
186098
  function addDistPathToAssets(extP) {
@@ -186119,34 +186132,25 @@ function isRemoteDomExtension(config2) {
186119
186132
  let apiVersion = config2.api_version, [year, month] = apiVersion?.split("-").map((part) => parseInt(part, 10)) ?? [];
186120
186133
  return !year || !month ? !1 : year > 2025 || year === 2025 && month >= 7;
186121
186134
  }
186122
- var TYPE_REF_REGEX = /^\/\/\/ <reference types="(?:[.\/]*)shopify\.d\.ts" \/>\n/;
186123
- function updateTypeReference({ fullPath, template, shouldAddTypeReference }) {
186124
- let originalContent = readFileSync(fullPath).toString(), fileContent = originalContent, match2;
186125
- for (; match2 = TYPE_REF_REGEX.exec(fileContent); )
186126
- fileContent = fileContent.replace(match2[0], "");
186127
- shouldAddTypeReference && (fileContent = template.concat(fileContent)), originalContent !== fileContent && writeFileSync(fullPath, fileContent);
186128
- }
186129
186135
  function getShouldRenderTarget(target) {
186130
186136
  return target.replace(/\.render$/, ".should-render");
186131
186137
  }
186132
186138
  function getSharedTypeDefinition(fullPath, typeFilePath, target, apiVersion) {
186133
- let template = `/// <reference types="${relativePath(dirname(fullPath), typeFilePath)}" />
186134
- `, types;
186135
186139
  try {
186136
- let fullTypePath = require2.resolve(`@shopify/ui-extensions/${target}`, { paths: [fullPath, typeFilePath] }), libraryRoot = require2.resolve("@shopify/ui-extensions", { paths: [fullPath, typeFilePath] }), importPath = `./${relativizePath(fullTypePath, dirname(typeFilePath))}`;
186137
- types = {
186138
- libraryRoot,
186139
- definition: `//@ts-ignore
186140
+ return require2.resolve(`@shopify/ui-extensions/${target}`, { paths: [fullPath, typeFilePath] }), `//@ts-ignore
186140
186141
  declare module './${relativizePath(fullPath, dirname(typeFilePath))}' {
186141
- const shopify: import('${importPath}').Api;
186142
+ const shopify: import('@shopify/ui-extensions/${target}').Api;
186142
186143
  const globalThis: { shopify: typeof shopify };
186143
186144
  }
186144
- `
186145
- };
186145
+ `;
186146
186146
  } catch {
186147
- throw updateTypeReference({ fullPath, template, shouldAddTypeReference: !1 }), new Error(`Type reference for ${target} could not be found. You might be using the wrong @shopify/ui-extensions version. Fix the error by ensuring you install @shopify/ui-extensions@${apiVersion} in your dependencies.`);
186147
+ throw new Error(`Type reference for ${target} could not be found. You might be using the wrong @shopify/ui-extensions version. Fix the error by ensuring you install @shopify/ui-extensions@${apiVersion} in your dependencies.`);
186148
186148
  }
186149
- return updateTypeReference({ fullPath, template, shouldAddTypeReference: !0 }), types;
186149
+ }
186150
+ async function findNearestTsConfigDir(fromFile, extensionDirectory) {
186151
+ let fromDirectory = dirname(fromFile), tsconfigPath = await findPathUp("tsconfig.json", { cwd: fromDirectory, type: "file", stopAt: extensionDirectory });
186152
+ if (tsconfigPath)
186153
+ return dirname(tsconfigPath);
186150
186154
  }
186151
186155
  var ui_extension_default = uiExtensionSpec;
186152
186156
 
@@ -196151,7 +196155,7 @@ init_cjs_shims();
196151
196155
  init_cjs_shims();
196152
196156
  import { fileURLToPath as fileURLToPath2 } from "node:url";
196153
196157
  async function launchCLI(options2) {
196154
- let { errorHandler: errorHandler3 } = await import("./error-handler-UP2PHFP4.js"), { isDevelopment: isDevelopment2 } = await import("./local-2YS3KZEM.js"), oclif = await import("./lib-GSZAN7VA.js"), { ShopifyConfig } = await import("./custom-oclif-loader-NSO2JRGJ.js");
196158
+ let { errorHandler: errorHandler3 } = await import("./error-handler-EUINVIQB.js"), { isDevelopment: isDevelopment2 } = await import("./local-27FRXTZP.js"), oclif = await import("./lib-GSZAN7VA.js"), { ShopifyConfig } = await import("./custom-oclif-loader-RG432YHP.js");
196155
196159
  isDevelopment2() && (oclif.default.settings.debug = !0);
196156
196160
  try {
196157
196161
  let config2 = new ShopifyConfig({ root: fileURLToPath2(options2.moduleURL) });
@@ -196166,7 +196170,7 @@ var import_core3 = __toESM(require_lib2());
196166
196170
  async function exitIfOldNodeVersion(versions2 = process.versions) {
196167
196171
  let nodeVersion = versions2.node, nodeMajorVersion = Number(nodeVersion.split(".")[0]);
196168
196172
  if (nodeMajorVersion < 18) {
196169
- let { renderError: renderError2 } = await import("./ui-LVZZ2CSX.js");
196173
+ let { renderError: renderError2 } = await import("./ui-VPNTET27.js");
196170
196174
  renderError2({
196171
196175
  headline: "Upgrade to a supported Node version now.",
196172
196176
  body: [
@@ -196193,7 +196197,7 @@ async function runCLI(options2, launchCLI2 = launchCLI, argv = process.argv, env
196193
196197
  return setupEnvironmentVariables(options2, argv, env), options2.runInCreateMode && await addInitToArgvWhenRunningCreateCLI(options2, argv), forceNoColor(argv, env), await exitIfOldNodeVersion(versions2), launchCLI2({ moduleURL: options2.moduleURL });
196194
196198
  }
196195
196199
  async function addInitToArgvWhenRunningCreateCLI(options2, argv = process.argv) {
196196
- let { findUpAndReadPackageJson: findUpAndReadPackageJson2 } = await import("./node-package-manager-B5D744OB.js"), { moduleDirectory: moduleDirectory2 } = await import("./path-GWAZZN2N.js"), name = (await findUpAndReadPackageJson2(moduleDirectory2(options2.moduleURL))).content.name.replace("@shopify/create-", "");
196200
+ let { findUpAndReadPackageJson: findUpAndReadPackageJson2 } = await import("./node-package-manager-C5QIQFCM.js"), { moduleDirectory: moduleDirectory2 } = await import("./path-GWAZZN2N.js"), name = (await findUpAndReadPackageJson2(moduleDirectory2(options2.moduleURL))).content.name.replace("@shopify/create-", "");
196197
196201
  if (argv.findIndex((arg) => arg.includes("init")) === -1) {
196198
196202
  let initIndex2 = argv.findIndex((arg) => arg.match(new RegExp(`bin(\\/|\\\\)+(create-${name}|dev|run)`))) + 1;
196199
196203
  argv.splice(initIndex2, 0, "init");
@@ -23,7 +23,7 @@ import {
23
23
  themeToken,
24
24
  useEmbeddedThemeCLI,
25
25
  useThemebundling
26
- } from "./chunk-DVEXWVPW.js";
26
+ } from "./chunk-PIO22A2A.js";
27
27
  import "./chunk-S3QEOIDU.js";
28
28
  import "./chunk-3I3GQNEW.js";
29
29
  import "./chunk-ZUCWDIGE.js";
@@ -60,4 +60,4 @@ export {
60
60
  useEmbeddedThemeCLI,
61
61
  useThemebundling
62
62
  };
63
- //# sourceMappingURL=local-2YS3KZEM.js.map
63
+ //# sourceMappingURL=local-27FRXTZP.js.map
@@ -29,8 +29,8 @@ import {
29
29
  versionSatisfies,
30
30
  writePackageJSON,
31
31
  yarnLockfile
32
- } from "./chunk-7CKA5IOI.js";
33
- import "./chunk-DVEXWVPW.js";
32
+ } from "./chunk-DLSEULVM.js";
33
+ import "./chunk-PIO22A2A.js";
34
34
  import "./chunk-S3QEOIDU.js";
35
35
  import "./chunk-3I3GQNEW.js";
36
36
  import "./chunk-ZUCWDIGE.js";
@@ -73,4 +73,4 @@ export {
73
73
  writePackageJSON,
74
74
  yarnLockfile
75
75
  };
76
- //# sourceMappingURL=node-package-manager-B5D744OB.js.map
76
+ //# sourceMappingURL=node-package-manager-C5QIQFCM.js.map