@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,179 @@
1
+ import {
2
+ require_lib
3
+ } from "./chunk-E43EDJOG.js";
4
+ import {
5
+ TokenizedString,
6
+ stringifyMessage,
7
+ tokenItemToString
8
+ } from "./chunk-PK2M5CKS.js";
9
+ import {
10
+ normalizePath
11
+ } from "./chunk-C3J4HVUN.js";
12
+ import {
13
+ __toESM,
14
+ init_cjs_shims
15
+ } from "./chunk-3XNI6LP4.js";
16
+
17
+ // ../cli-kit/dist/public/node/error.js
18
+ init_cjs_shims();
19
+
20
+ // ../cli-kit/dist/private/node/analytics/graphql-error-codes.js
21
+ init_cjs_shims();
22
+ var RATE_LIMIT_CODES = /* @__PURE__ */ new Set(["THROTTLED", "429"]), PERMISSION_CODES = /* @__PURE__ */ new Set(["ACCESS_DENIED", "access_denied"]);
23
+ function graphQLErrorCodes(errors) {
24
+ return Array.isArray(errors) ? errors.flatMap((entry) => {
25
+ let found = [], error = entry, code = error?.extensions?.code;
26
+ typeof code == "string" && found.push(code);
27
+ let appErrors = error?.extensions?.app_errors?.errors;
28
+ if (Array.isArray(appErrors))
29
+ for (let appError of appErrors) {
30
+ let category = appError?.category;
31
+ typeof category == "string" && found.push(category);
32
+ }
33
+ return found;
34
+ }) : [];
35
+ }
36
+ function isRateLimitCode(code) {
37
+ return code !== void 0 && RATE_LIMIT_CODES.has(code);
38
+ }
39
+ function isPermissionCode(code) {
40
+ return code !== void 0 && PERMISSION_CODES.has(code);
41
+ }
42
+ function hasRateLimitCode(errors) {
43
+ return graphQLErrorCodes(errors).some(isRateLimitCode);
44
+ }
45
+
46
+ // ../cli-kit/dist/public/node/error.js
47
+ var import_core = __toESM(require_lib(), 1), FatalErrorType;
48
+ (function(FatalErrorType2) {
49
+ FatalErrorType2[FatalErrorType2.Abort = 0] = "Abort", FatalErrorType2[FatalErrorType2.AbortSilent = 1] = "AbortSilent", FatalErrorType2[FatalErrorType2.Bug = 2] = "Bug";
50
+ })(FatalErrorType || (FatalErrorType = {}));
51
+ var CancelExecution = class extends Error {
52
+ }, FatalError = class extends Error {
53
+ tryMessage;
54
+ type;
55
+ nextSteps;
56
+ formattedMessage;
57
+ customSections;
58
+ skipOclifErrorHandling;
59
+ /**
60
+ * Creates a new FatalError error.
61
+ *
62
+ * @param message - The error message.
63
+ * @param type - The type of fatal error.
64
+ * @param tryMessage - The message that recommends next steps to the user.
65
+ * You can pass a string a {@link TokenizedString} or a {@link TokenItem}
66
+ * if you need to style the message inside the error Banner component.
67
+ * @param nextSteps - Message to show as "next steps" with suggestions to solve the issue.
68
+ * @param customSections - Custom sections to show in the error banner. To be used if nextSteps is not enough.
69
+ */
70
+ constructor(message, type, tryMessage = null, nextSteps, customSections) {
71
+ let messageIsOutputMessage = typeof message == "string" || "value" in message;
72
+ super(messageIsOutputMessage ? stringifyMessage(message) : tokenItemToString(message)), tryMessage ? tryMessage instanceof TokenizedString ? this.tryMessage = stringifyMessage(tryMessage) : this.tryMessage = tryMessage : this.tryMessage = null, this.type = type, this.nextSteps = nextSteps, this.customSections = customSections, this.skipOclifErrorHandling = !0, messageIsOutputMessage || (this.formattedMessage = message);
73
+ }
74
+ }, AbortError = class extends FatalError {
75
+ constructor(message, tryMessage = null, nextSteps, customSections) {
76
+ super(message, FatalErrorType.Abort, tryMessage, nextSteps, customSections);
77
+ }
78
+ }, ExternalError = class extends FatalError {
79
+ command;
80
+ args;
81
+ constructor(message, command, args, tryMessage = null) {
82
+ super(message, FatalErrorType.Abort, tryMessage), this.command = command, this.args = args;
83
+ }
84
+ }, AbortSilentError = class extends FatalError {
85
+ constructor() {
86
+ super("", FatalErrorType.AbortSilent);
87
+ }
88
+ }, BugError = class extends FatalError {
89
+ constructor(message, tryMessage = null) {
90
+ super(message, FatalErrorType.Bug, tryMessage);
91
+ }
92
+ };
93
+ async function handler(error) {
94
+ let fatal;
95
+ if (isFatal(error))
96
+ fatal = error;
97
+ else if (typeof error == "string")
98
+ fatal = new BugError(error);
99
+ else if (error instanceof Error)
100
+ fatal = new BugError(error.message), fatal.stack = error.stack;
101
+ else {
102
+ let maybeError = error;
103
+ fatal = new BugError(maybeError?.message ?? "Unknown error"), maybeError?.stack && (fatal.stack = maybeError?.stack);
104
+ }
105
+ let { renderFatalError } = await import("./ui-UAVSRCJ7.js");
106
+ return renderFatalError(fatal), Promise.resolve(error);
107
+ }
108
+ function errorMapper(error) {
109
+ if (error instanceof import_core.Errors.CLIError) {
110
+ let mappedError = new AbortError(error.message);
111
+ return mappedError.stack = error.stack, Promise.resolve(mappedError);
112
+ } else
113
+ return Promise.resolve(error);
114
+ }
115
+ function isFatal(error) {
116
+ try {
117
+ return Object.prototype.hasOwnProperty.call(error, "type");
118
+ } catch {
119
+ return !1;
120
+ }
121
+ }
122
+ function shouldReportErrorAsUnexpected(error) {
123
+ if (!isFatal(error)) {
124
+ if (error instanceof Error) {
125
+ if (isExpectedApiError(error))
126
+ return !1;
127
+ let message = error.message;
128
+ return !errorMessageImpliesEnvironmentIssue(message);
129
+ }
130
+ return !0;
131
+ }
132
+ return error.type === FatalErrorType.Bug;
133
+ }
134
+ function isExpectedApiError(error) {
135
+ let candidate = error;
136
+ if (typeof candidate.response != "object" || candidate.response === null || candidate.request === void 0)
137
+ return !1;
138
+ let status = candidate.response.status;
139
+ return status === 401 || status === 429 ? !0 : hasRateLimitCode(candidate.response.errors);
140
+ }
141
+ function cleanSingleStackTracePath(filePath) {
142
+ return normalizePath(filePath).replace("file:/", "/").replace(/^\/?[A-Z]:/, "");
143
+ }
144
+ function errorMessageImpliesEnvironmentIssue(message) {
145
+ return [
146
+ "EPERM: operation not permitted, scandir",
147
+ "EPERM: operation not permitted, rename",
148
+ "EACCES: permission denied",
149
+ "EPERM: operation not permitted, symlink",
150
+ "This version of npm supports the following node versions",
151
+ "EBUSY: resource busy or locked",
152
+ "ENOTEMPTY: directory not empty",
153
+ "getaddrinfo ENOTFOUND",
154
+ "Client network socket disconnected before secure TLS connection was established",
155
+ "spawn EPERM",
156
+ "socket hang up",
157
+ "The user aborted a request.",
158
+ "write EPIPE",
159
+ "Unsupported platform"
160
+ ].some((issueMessage) => message.includes(issueMessage));
161
+ }
162
+
163
+ export {
164
+ graphQLErrorCodes,
165
+ isRateLimitCode,
166
+ isPermissionCode,
167
+ hasRateLimitCode,
168
+ CancelExecution,
169
+ FatalError,
170
+ AbortError,
171
+ ExternalError,
172
+ AbortSilentError,
173
+ BugError,
174
+ handler,
175
+ errorMapper,
176
+ shouldReportErrorAsUnexpected,
177
+ cleanSingleStackTracePath
178
+ };
179
+ //# sourceMappingURL=chunk-LEQAULOW.js.map