@shopify/create-app 4.6.0 → 4.7.0

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.
Files changed (51) hide show
  1. package/dist/{analytics-PQQTY5ME.js → analytics-A7XUM3DE.js} +16 -13
  2. package/dist/analytics-CVOS4X5D.js +44 -0
  3. package/dist/{chunk-WP465C6S.js → chunk-5LLHAM5N.js} +9 -6
  4. package/dist/{chunk-H5PKPIMG.js → chunk-A67PO4UO.js} +17 -17
  5. package/dist/{chunk-FACLWQ7N.js → chunk-AOCVCJS6.js} +17 -14
  6. package/dist/{chunk-74EXPUYI.js → chunk-B7LXQVGX.js} +21810 -347
  7. package/dist/chunk-CM6ALOD7.js +32 -0
  8. package/dist/{chunk-K5NLRHZR.js → chunk-E43EDJOG.js} +4 -4
  9. package/dist/{chunk-FZECX65P.js → chunk-FU4STSWX.js} +27 -18
  10. package/dist/{chunk-REKC23EA.js → chunk-HHKEZAAX.js} +2 -2
  11. package/dist/chunk-HNIAZN6U.js +14 -0
  12. package/dist/chunk-JMC4PKOZ.js +1391 -0
  13. package/dist/chunk-LEQAULOW.js +179 -0
  14. package/dist/chunk-PK2M5CKS.js +7350 -0
  15. package/dist/{chunk-4PYTNDQV.js → chunk-TGZSJFOF.js} +4509 -7671
  16. package/dist/{chunk-6OPDNYDK.js → chunk-VJHCFG5K.js} +2 -2
  17. package/dist/chunk-X2X377NR.js +301 -0
  18. package/dist/{chunk-HLLMTZ5K.js → chunk-XYNOPL42.js} +2 -2
  19. package/dist/{chunk-ICRN3QWA.js → chunk-YYJ6EVI6.js} +3 -3
  20. package/dist/{chunk-RQLHLRL7.js → chunk-ZPNNBR5Z.js} +33 -58
  21. package/dist/{conf-store-3CEUJODJ.js → conf-store-NT7HUXZL.js} +9 -7
  22. package/dist/{custom-oclif-loader-MNCB3QFM.js → custom-oclif-loader-HTLL62HO.js} +15 -15
  23. package/dist/{deprecations-IRDS6EBX.js → deprecations-37ZUNG4Z.js} +12 -9
  24. package/dist/{environments-M2APKG2S.js → environments-ISQBBMTF.js} +13 -10
  25. package/dist/{error-handler-KHJ2WGBH.js → error-handler-GGBOXL7F.js} +16 -13
  26. package/dist/{fs-4DAJNN2N.js → fs-ZG73KWF7.js} +4 -3
  27. package/dist/hooks/postrun.js +5 -4
  28. package/dist/hooks/prerun.js +26 -8
  29. package/dist/index.js +2022 -1822
  30. package/dist/index.test.js +8 -8
  31. package/dist/{is-global-4PAQ722P.js → is-global-DL3ZQWOO.js} +4 -3
  32. package/dist/{lib-SEAHPNPA.js → lib-XCYUJYSO.js} +3 -3
  33. package/dist/{local-UPSZCOOL.js → local-XAHKS4F6.js} +3 -2
  34. package/dist/{metadata-R5WZESAQ.js → metadata-4WOIDT2F.js} +4 -3
  35. package/dist/{node-package-manager-ZGOPCA42.js → node-package-manager-JO3BBXYZ.js} +14 -11
  36. package/dist/{notifications-system-SVQ6LB65.js → notifications-system-ZK44GBNG.js} +17 -14
  37. package/dist/os-XDQECFDE.js +19 -0
  38. package/dist/{output-3XHG2ZX2.js → output-2RGSJNA6.js} +4 -3
  39. package/dist/{system-6AUYCFL4.js → system-KQM7CSD6.js} +14 -9
  40. package/dist/tsconfig.tsbuildinfo +1 -1
  41. package/dist/{ui-BZFIOKVT.js → ui-UAVSRCJ7.js} +12 -9
  42. package/dist/{upgrade-AYYDG5HX.js → upgrade-QE6OI6PW.js} +23 -20
  43. package/dist/{version-2UJ37EL3.js → version-6CVFB4SF.js} +13 -10
  44. package/dist/{version-NKNIJ276.js → version-AALUTWIR.js} +2 -2
  45. package/oclif.manifest.json +11 -7
  46. package/package.json +3 -3
  47. package/dist/analytics-ZRZM2AYT.js +0 -39
  48. package/dist/chunk-3WICPDUO.js +0 -21746
  49. package/dist/chunk-MXBSTTRA.js +0 -655
  50. package/dist/chunk-OGTZPCND.js +0 -5632
  51. package/dist/is-wsl-63MHD6QC.js +0 -65
@@ -0,0 +1,32 @@
1
+ import {
2
+ init_cjs_shims
3
+ } from "./chunk-3XNI6LP4.js";
4
+
5
+ // ../../node_modules/.pnpm/mimic-fn@4.0.0/node_modules/mimic-fn/index.js
6
+ init_cjs_shims();
7
+ var copyProperty = (to, from, property, ignoreNonConfigurable) => {
8
+ if (property === "length" || property === "prototype" || property === "arguments" || property === "caller")
9
+ return;
10
+ let toDescriptor = Object.getOwnPropertyDescriptor(to, property), fromDescriptor = Object.getOwnPropertyDescriptor(from, property);
11
+ !canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable || Object.defineProperty(to, property, fromDescriptor);
12
+ }, canCopyProperty = function(toDescriptor, fromDescriptor) {
13
+ return toDescriptor === void 0 || toDescriptor.configurable || toDescriptor.writable === fromDescriptor.writable && toDescriptor.enumerable === fromDescriptor.enumerable && toDescriptor.configurable === fromDescriptor.configurable && (toDescriptor.writable || toDescriptor.value === fromDescriptor.value);
14
+ }, changePrototype = (to, from) => {
15
+ let fromPrototype = Object.getPrototypeOf(from);
16
+ fromPrototype !== Object.getPrototypeOf(to) && Object.setPrototypeOf(to, fromPrototype);
17
+ }, wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/
18
+ ${fromBody}`, toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, "toString"), toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, "name"), changeToString = (to, from, name) => {
19
+ let withName = name === "" ? "" : `with ${name.trim()}() `, newToString = wrappedToString.bind(null, withName, from.toString());
20
+ Object.defineProperty(newToString, "name", toStringName), Object.defineProperty(to, "toString", { ...toStringDescriptor, value: newToString });
21
+ };
22
+ function mimicFunction(to, from, { ignoreNonConfigurable = !1 } = {}) {
23
+ let { name } = to;
24
+ for (let property of Reflect.ownKeys(from))
25
+ copyProperty(to, from, property, ignoreNonConfigurable);
26
+ return changePrototype(to, from), changeToString(to, from, name), to;
27
+ }
28
+
29
+ export {
30
+ mimicFunction
31
+ };
32
+ //# sourceMappingURL=chunk-CM6ALOD7.js.map
@@ -5,12 +5,12 @@ import {
5
5
  import {
6
6
  require_is_wsl
7
7
  } from "./chunk-LBXDGVFS.js";
8
- import {
9
- require_typescript
10
- } from "./chunk-D6NYWNY2.js";
11
8
  import {
12
9
  require_semver
13
10
  } from "./chunk-OQ3KXXGH.js";
11
+ import {
12
+ require_typescript
13
+ } from "./chunk-D6NYWNY2.js";
14
14
  import {
15
15
  __commonJS,
16
16
  __require,
@@ -11802,4 +11802,4 @@ ejs/lib/ejs.js:
11802
11802
  * @license {@link http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0}
11803
11803
  *)
11804
11804
  */
11805
- //# sourceMappingURL=chunk-K5NLRHZR.js.map
11805
+ //# sourceMappingURL=chunk-E43EDJOG.js.map
@@ -2,32 +2,32 @@ import {
2
2
  external_exports,
3
3
  fetch,
4
4
  jsonOutputEnabled
5
- } from "./chunk-74EXPUYI.js";
6
- import {
7
- versionSatisfies
8
- } from "./chunk-RQLHLRL7.js";
5
+ } from "./chunk-B7LXQVGX.js";
9
6
  import {
10
7
  CLI_KIT_VERSION
11
- } from "./chunk-REKC23EA.js";
8
+ } from "./chunk-HHKEZAAX.js";
9
+ import {
10
+ versionSatisfies
11
+ } from "./chunk-ZPNNBR5Z.js";
12
12
  import {
13
13
  cacheRetrieve,
14
14
  cacheStore
15
- } from "./chunk-WP465C6S.js";
15
+ } from "./chunk-5LLHAM5N.js";
16
16
  import {
17
17
  exec,
18
18
  renderError,
19
19
  renderInfo,
20
20
  renderWarning
21
- } from "./chunk-OGTZPCND.js";
21
+ } from "./chunk-TGZSJFOF.js";
22
22
  import {
23
23
  AbortSilentError
24
- } from "./chunk-3WICPDUO.js";
24
+ } from "./chunk-LEQAULOW.js";
25
25
  import {
26
26
  outputDebug
27
- } from "./chunk-4PYTNDQV.js";
27
+ } from "./chunk-PK2M5CKS.js";
28
28
  import {
29
29
  isTruthy
30
- } from "./chunk-MXBSTTRA.js";
30
+ } from "./chunk-HNIAZN6U.js";
31
31
  import {
32
32
  init_cjs_shims
33
33
  } from "./chunk-3XNI6LP4.js";
@@ -39,7 +39,7 @@ init_cjs_shims();
39
39
  init_cjs_shims();
40
40
  var _globalContext;
41
41
  function getGlobalContext() {
42
- return _globalContext ?? (_globalContext = { currentCommandId: "" }), _globalContext;
42
+ return _globalContext ??= { currentCommandId: "" }, _globalContext;
43
43
  }
44
44
  function getCurrentCommandId() {
45
45
  return getGlobalContext().currentCommandId;
@@ -56,10 +56,20 @@ var URL = "https://cdn.shopify.com/static/cli/notifications.json", EMPTY_CACHE_M
56
56
  "app:init",
57
57
  "theme:init",
58
58
  "hydrogen:init",
59
- "cache:clear"
59
+ "cache:clear",
60
+ "send-analytics"
60
61
  ];
61
62
  function url() {
62
- return process.env.SHOPIFY_CLI_NOTIFICATIONS_URL ?? URL;
63
+ let envUrl = process.env.SHOPIFY_CLI_NOTIFICATIONS_URL;
64
+ if (envUrl)
65
+ try {
66
+ if (new globalThis.URL(envUrl).protocol === "https:")
67
+ return envUrl;
68
+ outputDebug(`The notifications URL provided via SHOPIFY_CLI_NOTIFICATIONS_URL (${envUrl}) is not secure (https). Falling back to default.`);
69
+ } catch {
70
+ outputDebug(`The notifications URL provided via SHOPIFY_CLI_NOTIFICATIONS_URL (${envUrl}) is not a valid URL. Falling back to default.`);
71
+ }
72
+ return URL;
63
73
  }
64
74
  var NotificationSchema = external_exports.object({
65
75
  id: external_exports.string(),
@@ -95,7 +105,7 @@ async function showNotificationsIfNeeded(currentSurfaces, environment = process.
95
105
  throw new AbortSilentError();
96
106
  let errorMessage = `Error showing notifications: ${error.message}`;
97
107
  outputDebug(errorMessage);
98
- let { sendErrorToBugsnag } = await import("./error-handler-KHJ2WGBH.js");
108
+ let { sendErrorToBugsnag } = await import("./error-handler-GGBOXL7F.js");
99
109
  await sendErrorToBugsnag(errorMessage, "unexpected_error");
100
110
  }
101
111
  }
@@ -148,9 +158,9 @@ async function cacheNotifications(notifications) {
148
158
  cacheStore(`notifications-${url()}`, notifications), outputDebug(`Notifications from ${url()} stored in the cache`);
149
159
  }
150
160
  function fetchNotificationsInBackground(currentCommand, argv = process.argv, environment = process.env) {
151
- if (skipNotifications(currentCommand, environment) || !argv[0] || !argv[1])
161
+ if (skipNotifications(currentCommand, environment) || !argv[1])
152
162
  return;
153
- let nodeBinary = argv[0], args = [argv[1], "notifications", "list", "--ignore-errors"];
163
+ let nodeBinary = process.execPath, args = [argv[1], "notifications", "list", "--ignore-errors"];
154
164
  exec(nodeBinary, args, {
155
165
  background: !0,
156
166
  env: { ...process.env, SHOPIFY_CLI_NO_ANALYTICS: "1" },
@@ -201,7 +211,6 @@ function stringifyFilters(notification) {
201
211
  }
202
212
 
203
213
  export {
204
- getCurrentCommandId,
205
214
  setCurrentCommandId,
206
215
  showNotificationsIfNeeded,
207
216
  getNotifications,
@@ -210,4 +219,4 @@ export {
210
219
  filterNotifications,
211
220
  stringifyFilters
212
221
  };
213
- //# sourceMappingURL=chunk-FZECX65P.js.map
222
+ //# sourceMappingURL=chunk-FU4STSWX.js.map
@@ -4,9 +4,9 @@ import {
4
4
 
5
5
  // ../cli-kit/dist/public/common/version.js
6
6
  init_cjs_shims();
7
- var CLI_KIT_VERSION = "4.6.0";
7
+ var CLI_KIT_VERSION = "4.7.0";
8
8
 
9
9
  export {
10
10
  CLI_KIT_VERSION
11
11
  };
12
- //# sourceMappingURL=chunk-REKC23EA.js.map
12
+ //# sourceMappingURL=chunk-HHKEZAAX.js.map
@@ -0,0 +1,14 @@
1
+ import {
2
+ init_cjs_shims
3
+ } from "./chunk-3XNI6LP4.js";
4
+
5
+ // ../cli-kit/dist/public/node/context/utilities.js
6
+ init_cjs_shims();
7
+ function isTruthy(variable) {
8
+ return variable ? ["1", "true", "TRUE", "yes", "YES"].includes(variable) : !1;
9
+ }
10
+
11
+ export {
12
+ isTruthy
13
+ };
14
+ //# sourceMappingURL=chunk-HNIAZN6U.js.map