@shopify/create-app 3.94.1 → 3.94.3

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.
@@ -15,6 +15,7 @@ import {
15
15
  joinPath,
16
16
  normalizePath,
17
17
  relativizePath,
18
+ resolvePath,
18
19
  sniffForPath
19
20
  } from "./chunk-NIYBO6HO.js";
20
21
  import {
@@ -28530,7 +28531,7 @@ function createRuntimeMetadataContainer(defaultPublicMetadata = {}) {
28530
28531
  try {
28531
28532
  await getAndSet();
28532
28533
  } catch (error) {
28533
- let { sendErrorToBugsnag } = await import("./error-handler-W2U33HYT.js");
28534
+ let { sendErrorToBugsnag } = await import("./error-handler-WFIT65SZ.js");
28534
28535
  await sendErrorToBugsnag(error, "unexpected_error");
28535
28536
  }
28536
28537
  }, durationStack = [];
@@ -39728,6 +39729,10 @@ async function fileRealPath(path7) {
39728
39729
  return fsRealPath(path7);
39729
39730
  }
39730
39731
  async function copyFile(from, to) {
39732
+ if (resolvePath(from) === resolvePath(to)) {
39733
+ outputDebug(outputContent`Skipping copy file step because source and destination is the same: ${outputToken.path(from)}`);
39734
+ return;
39735
+ }
39731
39736
  outputDebug(outputContent`Copying file from ${outputToken.path(from)} to ${outputToken.path(to)}...`), await copy(from, to);
39732
39737
  }
39733
39738
  async function touchFile(path7) {
@@ -40287,4 +40292,4 @@ react-reconciler/cjs/react-reconciler.development.js:
40287
40292
  * LICENSE file in the root directory of this source tree.
40288
40293
  *)
40289
40294
  */
40290
- //# sourceMappingURL=chunk-4IXPA7MG.js.map
40295
+ //# sourceMappingURL=chunk-BRNDLYPU.js.map
@@ -19,7 +19,7 @@ import {
19
19
  setCurrentSessionId,
20
20
  setSessions,
21
21
  timeIntervalToMilliseconds
22
- } from "./chunk-77I3TRE2.js";
22
+ } from "./chunk-HYOIEQ5O.js";
23
23
  import {
24
24
  AbortError,
25
25
  AbortSilentError,
@@ -105,7 +105,7 @@ import {
105
105
  stringifyMessage,
106
106
  systemEnvironmentVariables,
107
107
  themeToken
108
- } from "./chunk-4IXPA7MG.js";
108
+ } from "./chunk-BRNDLYPU.js";
109
109
  import {
110
110
  require_lib
111
111
  } from "./chunk-IFG7N3S2.js";
@@ -48161,7 +48161,7 @@ init_cjs_shims();
48161
48161
 
48162
48162
  // ../cli-kit/dist/public/common/version.js
48163
48163
  init_cjs_shims();
48164
- var CLI_KIT_VERSION = "3.94.1";
48164
+ var CLI_KIT_VERSION = "3.94.3";
48165
48165
 
48166
48166
  // ../cli-kit/dist/private/node/api/headers.js
48167
48167
  import https from "https";
@@ -55079,4 +55079,4 @@ mime-types/index.js:
55079
55079
  * MIT Licensed
55080
55080
  *)
55081
55081
  */
55082
- //# sourceMappingURL=chunk-GUVQJPFV.js.map
55082
+ //# sourceMappingURL=chunk-HUNONZYG.js.map
@@ -21,7 +21,7 @@ import {
21
21
  runWithTimer,
22
22
  unixFileIsOwnedByCurrentUser,
23
23
  writeFile
24
- } from "./chunk-4IXPA7MG.js";
24
+ } from "./chunk-BRNDLYPU.js";
25
25
  import {
26
26
  require_semver
27
27
  } from "./chunk-IFG7N3S2.js";
@@ -14114,4 +14114,4 @@ deep-extend/lib/deep-extend.js:
14114
14114
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14115
14115
  *)
14116
14116
  */
14117
- //# sourceMappingURL=chunk-77I3TRE2.js.map
14117
+ //# sourceMappingURL=chunk-HYOIEQ5O.js.map
@@ -2,12 +2,12 @@ import {
2
2
  CLI_KIT_VERSION,
3
3
  jsonOutputEnabled,
4
4
  z
5
- } from "./chunk-GUVQJPFV.js";
5
+ } from "./chunk-HUNONZYG.js";
6
6
  import {
7
7
  cacheRetrieve,
8
8
  cacheStore,
9
9
  versionSatisfies
10
- } from "./chunk-77I3TRE2.js";
10
+ } from "./chunk-HYOIEQ5O.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-4IXPA7MG.js";
19
+ } from "./chunk-BRNDLYPU.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-W2U33HYT.js");
87
+ let { sendErrorToBugsnag } = await import("./error-handler-WFIT65SZ.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-7PXEGPG5.js.map
177
+ //# sourceMappingURL=chunk-KKIDWI27.js.map
@@ -2,7 +2,7 @@ import {
2
2
  CLI_KIT_VERSION,
3
3
  getNextDeprecationDate,
4
4
  reportAnalyticsEvent
5
- } from "./chunk-GUVQJPFV.js";
5
+ } from "./chunk-HUNONZYG.js";
6
6
  import {
7
7
  addNPMDependencies,
8
8
  checkForCachedNewVersion,
@@ -12,7 +12,7 @@ import {
12
12
  getPackageManager,
13
13
  runAtMinimumInterval,
14
14
  usesWorkspaces
15
- } from "./chunk-77I3TRE2.js";
15
+ } from "./chunk-HYOIEQ5O.js";
16
16
  import {
17
17
  addPublicMetadata,
18
18
  addSensitiveMetadata,
@@ -31,7 +31,7 @@ import {
31
31
  outputToken,
32
32
  outputWarn,
33
33
  renderWarning
34
- } from "./chunk-4IXPA7MG.js";
34
+ } from "./chunk-BRNDLYPU.js";
35
35
  import {
36
36
  cwd,
37
37
  moduleDirectory,
@@ -211,7 +211,7 @@ async function performAutoUpgrade(newerVersion) {
211
211
  } catch (error) {
212
212
  let errorMessage = `Auto-upgrade failed: ${error}`;
213
213
  outputDebug(errorMessage), outputWarn(getOutputUpdateCLIReminder(newerVersion)), await addPublicMetadata(() => ({ env_auto_upgrade_success: !1 }));
214
- let { sendErrorToBugsnag } = await import("./error-handler-W2U33HYT.js"), enrichedError = Object.assign(new Error(errorMessage), {
214
+ let { sendErrorToBugsnag } = await import("./error-handler-WFIT65SZ.js"), enrichedError = Object.assign(new Error(errorMessage), {
215
215
  packageManager: inferPackageManagerForGlobalCLI(),
216
216
  platform: process.platform,
217
217
  cliVersion: CLI_KIT_VERSION
@@ -242,4 +242,4 @@ export {
242
242
  postRunHookHasCompleted,
243
243
  hook
244
244
  };
245
- //# sourceMappingURL=chunk-3P2CWI75.js.map
245
+ //# sourceMappingURL=chunk-PWU6XFUQ.js.map
@@ -4,10 +4,10 @@ import {
4
4
  errorHandler,
5
5
  registerCleanBugsnagErrorsFromWithinPlugins,
6
6
  sendErrorToBugsnag
7
- } from "./chunk-GUVQJPFV.js";
7
+ } from "./chunk-HUNONZYG.js";
8
8
  import "./chunk-VBBBCVMH.js";
9
- import "./chunk-77I3TRE2.js";
10
- import "./chunk-4IXPA7MG.js";
9
+ import "./chunk-HYOIEQ5O.js";
10
+ import "./chunk-BRNDLYPU.js";
11
11
  import "./chunk-IFG7N3S2.js";
12
12
  import "./chunk-CXPWSYGC.js";
13
13
  import "./chunk-NIYBO6HO.js";
@@ -22,4 +22,4 @@ export {
22
22
  registerCleanBugsnagErrorsFromWithinPlugins,
23
23
  sendErrorToBugsnag
24
24
  };
25
- //# sourceMappingURL=error-handler-W2U33HYT.js.map
25
+ //# sourceMappingURL=error-handler-WFIT65SZ.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  hook
3
- } from "../chunk-3P2CWI75.js";
4
- import "../chunk-GUVQJPFV.js";
3
+ } from "../chunk-PWU6XFUQ.js";
4
+ import "../chunk-HUNONZYG.js";
5
5
  import "../chunk-VBBBCVMH.js";
6
- import "../chunk-77I3TRE2.js";
7
- import "../chunk-4IXPA7MG.js";
6
+ import "../chunk-HYOIEQ5O.js";
7
+ import "../chunk-BRNDLYPU.js";
8
8
  import "../chunk-IFG7N3S2.js";
9
9
  import "../chunk-CXPWSYGC.js";
10
10
  import "../chunk-NIYBO6HO.js";
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  fetchNotificationsInBackground
3
- } from "../chunk-7PXEGPG5.js";
3
+ } from "../chunk-KKIDWI27.js";
4
4
  import {
5
5
  CLI_KIT_VERSION,
6
6
  startAnalytics
7
- } from "../chunk-GUVQJPFV.js";
7
+ } from "../chunk-HUNONZYG.js";
8
8
  import "../chunk-VBBBCVMH.js";
9
9
  import {
10
10
  checkForNewVersion
11
- } from "../chunk-77I3TRE2.js";
11
+ } from "../chunk-HYOIEQ5O.js";
12
12
  import {
13
13
  isPreReleaseVersion,
14
14
  outputDebug
15
- } from "../chunk-4IXPA7MG.js";
15
+ } from "../chunk-BRNDLYPU.js";
16
16
  import "../chunk-IFG7N3S2.js";
17
17
  import "../chunk-CXPWSYGC.js";
18
18
  import "../chunk-NIYBO6HO.js";
package/dist/index.js CHANGED
@@ -10,11 +10,11 @@ import {
10
10
  } from "./chunk-CE4S2SGM.js";
11
11
  import {
12
12
  postRunHookHasCompleted
13
- } from "./chunk-3P2CWI75.js";
13
+ } from "./chunk-PWU6XFUQ.js";
14
14
  import {
15
15
  setCurrentCommandId,
16
16
  showNotificationsIfNeeded
17
- } from "./chunk-7PXEGPG5.js";
17
+ } from "./chunk-KKIDWI27.js";
18
18
  import {
19
19
  CLI_KIT_VERSION,
20
20
  ClientError,
@@ -94,7 +94,7 @@ import {
94
94
  shopifyFetch,
95
95
  storeAdminUrl,
96
96
  z
97
- } from "./chunk-GUVQJPFV.js";
97
+ } from "./chunk-HUNONZYG.js";
98
98
  import "./chunk-VBBBCVMH.js";
99
99
  import {
100
100
  LocalStorage,
@@ -118,7 +118,7 @@ import {
118
118
  usesWorkspaces,
119
119
  versionSatisfies,
120
120
  writePackageJSON
121
- } from "./chunk-77I3TRE2.js";
121
+ } from "./chunk-HYOIEQ5O.js";
122
122
  import {
123
123
  AbortController as AbortController2,
124
124
  AbortError,
@@ -290,7 +290,7 @@ import {
290
290
  username,
291
291
  writeFile,
292
292
  writeFileSync
293
- } from "./chunk-4IXPA7MG.js";
293
+ } from "./chunk-BRNDLYPU.js";
294
294
  import {
295
295
  require_commonjs,
296
296
  require_lib as require_lib2,
@@ -193963,7 +193963,7 @@ async function buildUIExtension(extension, options) {
193963
193963
  let errorMessage = extensionBundlingError.message ?? "Unknown error occurred", newError = new AbortError(`Failed to bundle extension ${extension.localIdentifier}. Please check the extension source code for errors.`, errorMessage);
193964
193964
  throw newError.errors = extensionBundlingError.errors, newError;
193965
193965
  }
193966
- await extension.buildValidation();
193966
+ await extension.buildValidation({ outputPath: localOutputPath });
193967
193967
  let duration = Math.round(performance.now() - startTime), sizeInfo = await formatBundleSize(localOutputPath);
193968
193968
  return options.stdout.write(`${extension.localIdentifier} successfully built in ${duration}ms${sizeInfo}`), localOutputPath;
193969
193969
  }
@@ -194390,7 +194390,7 @@ async function executeBundleUIStep(step, context) {
194390
194390
  let config2 = context.extension.configuration;
194391
194391
  context.options.buildDirectory = step.config?.bundleFolder ?? void 0;
194392
194392
  let localOutputPath = await buildUIExtension(context.extension, context.options), localOutputDir = dirname(localOutputPath), bundleOutputDir = step.config?.bundleFolder ? joinPath(dirname(context.extension.outputPath), step.config.bundleFolder) : dirname(context.extension.outputPath);
194393
- if (localOutputDir !== bundleOutputDir && await copyFile(localOutputDir, bundleOutputDir), !step.config?.generatesAssetsManifest || !Array.isArray(config2.extension_points))
194393
+ if (resolvePath(localOutputDir) === resolvePath(bundleOutputDir) || (await copyFile(localOutputDir, bundleOutputDir), !step.config?.generatesAssetsManifest) || !Array.isArray(config2.extension_points))
194394
194394
  return;
194395
194395
  let pointsWithManifest = config2.extension_points.filter((ep) => typeof ep == "object" && ep.build_manifest), entries = extractBuiltAssetEntries(pointsWithManifest, step.config?.bundleFolder);
194396
194396
  Object.keys(entries).length > 0 && await createOrUpdateManifestFile(context, entries);
@@ -194722,8 +194722,8 @@ var ExtensionInstance = class {
194722
194722
  preDeployValidation() {
194723
194723
  return this.specification.preDeployValidation ? this.specification.preDeployValidation(this) : Promise.resolve();
194724
194724
  }
194725
- buildValidation() {
194726
- return this.specification.buildValidation ? this.specification.buildValidation(this) : Promise.resolve();
194725
+ buildValidation({ outputPath }) {
194726
+ return this.specification.buildValidation ? this.specification.buildValidation(this, outputPath) : Promise.resolve();
194727
194727
  }
194728
194728
  async keepBuiltSourcemapsLocally(inputPath) {
194729
194729
  if (!this.isSourceMapGeneratingExtension)
@@ -204407,11 +204407,11 @@ var kilobytes2 = 1024, BUNDLE_SIZE_LIMIT_KB = 128, BUNDLE_SIZE_LIMIT2 = BUNDLE_S
204407
204407
  partnersWebIdentifier: "web_pixel",
204408
204408
  schema: WebPixelSchema,
204409
204409
  appModuleFeatures: (_2) => ["esbuild", "single_js_entry_path"],
204410
- getOutputRelativePath: (extension) => `${extension.handle}.js`,
204410
+ getOutputRelativePath: (extension) => `dist/${extension.handle}.js`,
204411
204411
  clientSteps: [
204412
204412
  {
204413
204413
  lifecycle: "deploy",
204414
- steps: [{ id: "bundle-ui", name: "Bundle UI Extension", type: "bundle_ui", config: { bundleFolder: "dist/" } }]
204414
+ steps: [{ id: "bundle-ui", name: "Bundle UI Extension", type: "bundle_ui", config: {} }]
204415
204415
  }
204416
204416
  ],
204417
204417
  deployConfig: async (config2, _2) => ({
@@ -204419,8 +204419,8 @@ var kilobytes2 = 1024, BUNDLE_SIZE_LIMIT_KB = 128, BUNDLE_SIZE_LIMIT2 = BUNDLE_S
204419
204419
  customer_privacy: config2.customer_privacy,
204420
204420
  runtime_configuration_definition: config2.settings
204421
204421
  }),
204422
- buildValidation: async (extension) => {
204423
- let bundleSize = await fileSize(extension.outputPath);
204422
+ buildValidation: async (_2, outputPath) => {
204423
+ let bundleSize = await fileSize(outputPath);
204424
204424
  if (bundleSize > BUNDLE_SIZE_LIMIT2) {
204425
204425
  let humanReadableBundleSize = `${(bundleSize / kilobytes2).toFixed(2)} kB`;
204426
204426
  throw new AbortError(`Your web pixel extension exceeds the total file size limit (${BUNDLE_SIZE_LIMIT_KB} kB). It's currently ${humanReadableBundleSize}.`, "Reduce your total file size and try again.");
@@ -205377,7 +205377,7 @@ init_cjs_shims();
205377
205377
  init_cjs_shims();
205378
205378
  import { fileURLToPath as fileURLToPath2 } from "node:url";
205379
205379
  async function launchCLI(options) {
205380
- let { errorHandler: errorHandler2 } = await import("./error-handler-W2U33HYT.js"), { isDevelopment: isDevelopment2 } = await import("./local-5M7UJBSV.js"), oclifModule = await import("./lib-PPI2FZOR.js"), { Config, run, flush, Errors: Errors2, settings } = oclifModule.default ?? oclifModule;
205380
+ let { errorHandler: errorHandler2 } = await import("./error-handler-WFIT65SZ.js"), { isDevelopment: isDevelopment2 } = await import("./local-6XZDLEBK.js"), oclifModule = await import("./lib-PPI2FZOR.js"), { Config, run, flush, Errors: Errors2, settings } = oclifModule.default ?? oclifModule;
205381
205381
  isDevelopment2() && (settings.debug = !0);
205382
205382
  try {
205383
205383
  let config2 = new Config({ root: fileURLToPath2(options.moduleURL) });
@@ -205392,7 +205392,7 @@ var import_core3 = __toESM(require_lib2());
205392
205392
  async function exitIfOldNodeVersion(versions2 = process.versions) {
205393
205393
  let nodeVersion = versions2.node, nodeMajorVersion = Number(nodeVersion.split(".")[0]);
205394
205394
  if (nodeMajorVersion < 18) {
205395
- let { renderError: renderError2 } = await import("./ui-YR2APRRS.js");
205395
+ let { renderError: renderError2 } = await import("./ui-7HBWZC7M.js");
205396
205396
  renderError2({
205397
205397
  headline: "Upgrade to a supported Node version now.",
205398
205398
  body: [
@@ -205419,7 +205419,7 @@ async function runCLI(options, launchCLI2 = launchCLI, argv = process.argv, env
205419
205419
  return setupEnvironmentVariables(options, argv, env), options.runInCreateMode && await addInitToArgvWhenRunningCreateCLI(options, argv), forceNoColor(argv, env), await exitIfOldNodeVersion(versions2), launchCLI2({ moduleURL: options.moduleURL });
205420
205420
  }
205421
205421
  async function addInitToArgvWhenRunningCreateCLI(options, argv = process.argv) {
205422
- let { findUpAndReadPackageJson: findUpAndReadPackageJson2 } = await import("./node-package-manager-FU2YTSQE.js"), { moduleDirectory: moduleDirectory2 } = await import("./path-NQ6GZ2WO.js"), name = (await findUpAndReadPackageJson2(moduleDirectory2(options.moduleURL))).content.name.replace("@shopify/create-", "");
205422
+ let { findUpAndReadPackageJson: findUpAndReadPackageJson2 } = await import("./node-package-manager-JVAQNYVX.js"), { moduleDirectory: moduleDirectory2 } = await import("./path-NQ6GZ2WO.js"), name = (await findUpAndReadPackageJson2(moduleDirectory2(options.moduleURL))).content.name.replace("@shopify/create-", "");
205423
205423
  if (argv.findIndex((arg) => arg.includes("init")) === -1) {
205424
205424
  let initIndex2 = argv.findIndex((arg) => arg.match(new RegExp(`bin(\\/|\\\\)+(create-${name}|dev|run)`))) + 1;
205425
205425
  argv.splice(initIndex2, 0, "init");
@@ -22,7 +22,7 @@ import {
22
22
  macAddress,
23
23
  opentelemetryDomain,
24
24
  themeToken
25
- } from "./chunk-4IXPA7MG.js";
25
+ } from "./chunk-BRNDLYPU.js";
26
26
  import "./chunk-IFG7N3S2.js";
27
27
  import "./chunk-CXPWSYGC.js";
28
28
  import "./chunk-NIYBO6HO.js";
@@ -55,4 +55,4 @@ export {
55
55
  opentelemetryDomain,
56
56
  themeToken
57
57
  };
58
- //# sourceMappingURL=local-5M7UJBSV.js.map
58
+ //# sourceMappingURL=local-6XZDLEBK.js.map
@@ -30,8 +30,8 @@ import {
30
30
  versionSatisfies,
31
31
  writePackageJSON,
32
32
  yarnLockfile
33
- } from "./chunk-77I3TRE2.js";
34
- import "./chunk-4IXPA7MG.js";
33
+ } from "./chunk-HYOIEQ5O.js";
34
+ import "./chunk-BRNDLYPU.js";
35
35
  import "./chunk-IFG7N3S2.js";
36
36
  import "./chunk-CXPWSYGC.js";
37
37
  import "./chunk-NIYBO6HO.js";
@@ -72,4 +72,4 @@ export {
72
72
  writePackageJSON,
73
73
  yarnLockfile
74
74
  };
75
- //# sourceMappingURL=node-package-manager-FU2YTSQE.js.map
75
+ //# sourceMappingURL=node-package-manager-JVAQNYVX.js.map