@shopify/create-app 3.76.1 → 3.77.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.
- package/dist/{chunk-UMKUGEPL.js → chunk-5AOXX545.js} +2 -2
- package/dist/{chunk-2SXZ4HIN.js → chunk-7H4256T3.js} +22 -9
- package/dist/{chunk-O2TTT575.js → chunk-KMKKRU6U.js} +5 -5
- package/dist/{chunk-6DVPWDT2.js → chunk-MS4SVFZ7.js} +27 -15
- package/dist/{chunk-TYR4LFUO.js → chunk-PBKRSTUJ.js} +5 -5
- package/dist/{chunk-U4CNJTWH.js → chunk-XTDLUGSL.js} +447 -238
- package/dist/{custom-oclif-loader-JBKR6NDU.js → custom-oclif-loader-GLLEHGXZ.js} +2 -2
- package/dist/{error-handler-RBKB2PK5.js → error-handler-BJPOL26F.js} +6 -6
- package/dist/hooks/postrun.js +4 -4
- package/dist/hooks/prerun.js +5 -5
- package/dist/index.js +5452 -2312
- package/dist/{local-QVUBWVWK.js → local-N5NULVAC.js} +2 -2
- package/dist/{node-package-manager-VBNHQ22K.js → node-package-manager-T2VXCA3C.js} +3 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-K6YXU54E.js → ui-AA4MERX2.js} +2 -2
- package/oclif.manifest.json +1 -1
- package/package.json +3 -3
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
require_get_stream,
|
|
19
19
|
runWithTimer,
|
|
20
20
|
writeFile
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-7H4256T3.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-
|
|
14834
|
+
//# sourceMappingURL=chunk-5AOXX545.js.map
|
|
@@ -2174,10 +2174,10 @@ var require_ci_info = __commonJS({
|
|
|
2174
2174
|
exports.name = null;
|
|
2175
2175
|
exports.isPR = null;
|
|
2176
2176
|
vendors.forEach(function(vendor) {
|
|
2177
|
-
let
|
|
2177
|
+
let isCI2 = (Array.isArray(vendor.env) ? vendor.env : [vendor.env]).every(function(obj) {
|
|
2178
2178
|
return checkEnv(obj);
|
|
2179
2179
|
});
|
|
2180
|
-
if (exports[vendor.constant] =
|
|
2180
|
+
if (exports[vendor.constant] = isCI2, !!isCI2)
|
|
2181
2181
|
switch (exports.name = vendor.name, typeof vendor.pr) {
|
|
2182
2182
|
case "string":
|
|
2183
2183
|
exports.isPR = !!env3[vendor.pr];
|
|
@@ -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-
|
|
22458
|
+
let { sendErrorToBugsnag } = await import("./error-handler-BJPOL26F.js");
|
|
22459
22459
|
await sendErrorToBugsnag(error, "unexpected_error");
|
|
22460
22460
|
}
|
|
22461
22461
|
}, durationStack = [];
|
|
@@ -29258,8 +29258,7 @@ function buildExec(command, args, options) {
|
|
|
29258
29258
|
detached: options?.background,
|
|
29259
29259
|
cleanup: !options?.background
|
|
29260
29260
|
});
|
|
29261
|
-
return outputDebug(`
|
|
29262
|
-
Running system process${options?.background ? " in background" : ""}:
|
|
29261
|
+
return outputDebug(`Running system process${options?.background ? " in background" : ""}:
|
|
29263
29262
|
\xB7 Command: ${command} ${args.join(" ")}
|
|
29264
29263
|
\xB7 Working directory: ${executionCwd}
|
|
29265
29264
|
`), commandProcess;
|
|
@@ -29282,6 +29281,9 @@ async function sleep(seconds) {
|
|
|
29282
29281
|
function terminalSupportsPrompting() {
|
|
29283
29282
|
return isTruthy(process.env.CI) ? !1 : !!(process.stdin.isTTY && process.stdout.isTTY);
|
|
29284
29283
|
}
|
|
29284
|
+
function isCI() {
|
|
29285
|
+
return isTruthy(process.env.CI);
|
|
29286
|
+
}
|
|
29285
29287
|
|
|
29286
29288
|
// ../cli-kit/dist/public/node/is-global.js
|
|
29287
29289
|
var _isGlobal;
|
|
@@ -31052,7 +31054,9 @@ var identifier = "shopify-cli", cacheFolder = () => process.env.XDG_CACHE_HOME ?
|
|
|
31052
31054
|
otelURL: "SHOPIFY_CLI_OTEL_EXPORTER_OTLP_ENDPOINT",
|
|
31053
31055
|
themeKitAccessDomain: "SHOPIFY_CLI_THEME_KIT_ACCESS_DOMAIN",
|
|
31054
31056
|
json: "SHOPIFY_FLAG_JSON",
|
|
31055
|
-
neverUsePartnersApi: "SHOPIFY_CLI_NEVER_USE_PARTNERS_API"
|
|
31057
|
+
neverUsePartnersApi: "SHOPIFY_CLI_NEVER_USE_PARTNERS_API",
|
|
31058
|
+
skipNetworkLevelRetry: "SHOPIFY_CLI_SKIP_NETWORK_LEVEL_RETRY",
|
|
31059
|
+
maxRequestTimeForNetworkCalls: "SHOPIFY_CLI_MAX_REQUEST_TIME_FOR_NETWORK_CALLS"
|
|
31056
31060
|
}, defaultThemeKitAccessDomain = "theme-kit-access.shopifyapps.com", systemEnvironmentVariables = {
|
|
31057
31061
|
backendPort: "BACKEND_PORT"
|
|
31058
31062
|
}, pathConstants = {
|
|
@@ -31269,6 +31273,13 @@ function jsonOutputEnabled(environment = getEnvironmentVariables()) {
|
|
|
31269
31273
|
function blockPartnersAccess() {
|
|
31270
31274
|
return isTruthy(getEnvironmentVariables()[environmentVariables.neverUsePartnersApi]);
|
|
31271
31275
|
}
|
|
31276
|
+
function skipNetworkLevelRetry(environment = getEnvironmentVariables()) {
|
|
31277
|
+
return isTruthy(environment[environmentVariables.skipNetworkLevelRetry]);
|
|
31278
|
+
}
|
|
31279
|
+
function maxRequestTimeForNetworkCallsMs(environment = getEnvironmentVariables()) {
|
|
31280
|
+
let maxRequestTime = environment[environmentVariables.maxRequestTimeForNetworkCalls];
|
|
31281
|
+
return maxRequestTime && !isNaN(Number(maxRequestTime)) ? Number(maxRequestTime) : 15 * 1e3;
|
|
31282
|
+
}
|
|
31272
31283
|
|
|
31273
31284
|
// ../../node_modules/.pnpm/is-interactive@2.0.0/node_modules/is-interactive/index.js
|
|
31274
31285
|
init_cjs_shims();
|
|
@@ -31420,8 +31431,6 @@ export {
|
|
|
31420
31431
|
uniq,
|
|
31421
31432
|
uniqBy,
|
|
31422
31433
|
difference,
|
|
31423
|
-
tslib_es6_exports,
|
|
31424
|
-
init_tslib_es6,
|
|
31425
31434
|
getRandomName,
|
|
31426
31435
|
capitalize,
|
|
31427
31436
|
pluralize,
|
|
@@ -31480,11 +31489,13 @@ export {
|
|
|
31480
31489
|
execaSync,
|
|
31481
31490
|
username,
|
|
31482
31491
|
platformAndArch,
|
|
31492
|
+
require_lib2 as require_lib,
|
|
31483
31493
|
openURL,
|
|
31484
31494
|
captureOutput,
|
|
31485
31495
|
exec3 as exec,
|
|
31486
31496
|
sleep,
|
|
31487
31497
|
terminalSupportsPrompting,
|
|
31498
|
+
isCI,
|
|
31488
31499
|
Environment,
|
|
31489
31500
|
serviceEnvironment,
|
|
31490
31501
|
spinFqdn,
|
|
@@ -31504,6 +31515,8 @@ export {
|
|
|
31504
31515
|
getIdentityTokenInformation,
|
|
31505
31516
|
jsonOutputEnabled,
|
|
31506
31517
|
blockPartnersAccess,
|
|
31518
|
+
skipNetworkLevelRetry,
|
|
31519
|
+
maxRequestTimeForNetworkCallsMs,
|
|
31507
31520
|
isTerminalInteractive,
|
|
31508
31521
|
homeDirectory,
|
|
31509
31522
|
isDevelopment,
|
|
@@ -31692,4 +31705,4 @@ react-reconciler/cjs/react-reconciler-constants.development.js:
|
|
|
31692
31705
|
* LICENSE file in the root directory of this source tree.
|
|
31693
31706
|
*)
|
|
31694
31707
|
*/
|
|
31695
|
-
//# sourceMappingURL=chunk-
|
|
31708
|
+
//# sourceMappingURL=chunk-7H4256T3.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fanoutHooks,
|
|
3
3
|
reportAnalyticsEvent
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PBKRSTUJ.js";
|
|
5
5
|
import {
|
|
6
6
|
CLI_KIT_VERSION,
|
|
7
7
|
getEnvironmentData
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XTDLUGSL.js";
|
|
9
9
|
import {
|
|
10
10
|
runWithRateLimit
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-5AOXX545.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-
|
|
26
|
+
} from "./chunk-7H4256T3.js";
|
|
27
27
|
import {
|
|
28
28
|
require_lib
|
|
29
29
|
} from "./chunk-S3QEOIDU.js";
|
|
@@ -2129,4 +2129,4 @@ export {
|
|
|
2129
2129
|
registerCleanBugsnagErrorsFromWithinPlugins,
|
|
2130
2130
|
addBugsnagMetadata
|
|
2131
2131
|
};
|
|
2132
|
-
//# sourceMappingURL=chunk-
|
|
2132
|
+
//# sourceMappingURL=chunk-KMKKRU6U.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CLI_KIT_VERSION,
|
|
3
3
|
z
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-XTDLUGSL.js";
|
|
5
5
|
import {
|
|
6
6
|
cacheRetrieve,
|
|
7
7
|
cacheStore,
|
|
8
8
|
versionSatisfies
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5AOXX545.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-
|
|
19
|
+
} from "./chunk-7H4256T3.js";
|
|
20
20
|
import {
|
|
21
21
|
init_cjs_shims
|
|
22
22
|
} from "./chunk-PKR7KJ6P.js";
|
|
@@ -38,7 +38,15 @@ function setCurrentCommandId(commandId) {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
// ../cli-kit/dist/public/node/notifications-system.js
|
|
41
|
-
var URL = "https://cdn.shopify.com/static/cli/notifications.json", EMPTY_CACHE_MESSAGE = "Cache is empty"
|
|
41
|
+
var URL = "https://cdn.shopify.com/static/cli/notifications.json", EMPTY_CACHE_MESSAGE = "Cache is empty", COMMANDS_TO_SKIP = [
|
|
42
|
+
"notifications:list",
|
|
43
|
+
"notifications:generate",
|
|
44
|
+
"init",
|
|
45
|
+
"app:init",
|
|
46
|
+
"theme:init",
|
|
47
|
+
"hydrogen:init",
|
|
48
|
+
"cache:clear"
|
|
49
|
+
];
|
|
42
50
|
function url() {
|
|
43
51
|
return process.env.SHOPIFY_CLI_NOTIFICATIONS_URL ?? URL;
|
|
44
52
|
}
|
|
@@ -62,22 +70,26 @@ var NotificationSchema = z.object({
|
|
|
62
70
|
}), NotificationsSchema = z.object({ notifications: z.array(NotificationSchema) });
|
|
63
71
|
async function showNotificationsIfNeeded(currentSurfaces, environment = process.env) {
|
|
64
72
|
try {
|
|
65
|
-
|
|
73
|
+
let commandId = getCurrentCommandId();
|
|
74
|
+
if (skipNotifications(commandId, environment) || jsonOutputEnabled(environment))
|
|
66
75
|
return;
|
|
67
|
-
let notifications = await getNotifications(),
|
|
76
|
+
let notifications = await getNotifications(), notificationsToShow = filterNotifications(notifications.notifications, commandId, currentSurfaces);
|
|
68
77
|
outputDebug(`Notifications to show: ${notificationsToShow.length}`), await renderNotifications(notificationsToShow);
|
|
69
78
|
} catch (error) {
|
|
79
|
+
if (error.message === EMPTY_CACHE_MESSAGE) {
|
|
80
|
+
outputDebug("Notifications to show: 0 (Cache is empty)");
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
70
83
|
if (error.message === "abort")
|
|
71
84
|
throw new AbortSilentError();
|
|
72
|
-
let errorMessage = `Error
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
let { sendErrorToBugsnag } = await import("./error-handler-RBKB2PK5.js");
|
|
85
|
+
let errorMessage = `Error showing notifications: ${error.message}`;
|
|
86
|
+
outputDebug(errorMessage);
|
|
87
|
+
let { sendErrorToBugsnag } = await import("./error-handler-BJPOL26F.js");
|
|
76
88
|
await sendErrorToBugsnag(errorMessage, "unexpected_error");
|
|
77
89
|
}
|
|
78
90
|
}
|
|
79
|
-
function skipNotifications(environment = process.env) {
|
|
80
|
-
return isTruthy(environment.CI) || isTruthy(environment.SHOPIFY_UNIT_TEST);
|
|
91
|
+
function skipNotifications(currentCommand, environment = process.env) {
|
|
92
|
+
return isTruthy(environment.CI) || isTruthy(environment.SHOPIFY_UNIT_TEST) || COMMANDS_TO_SKIP.includes(currentCommand);
|
|
81
93
|
}
|
|
82
94
|
async function renderNotifications(notifications) {
|
|
83
95
|
notifications.slice(0, 2).forEach((notification) => {
|
|
@@ -110,9 +122,9 @@ async function getNotifications() {
|
|
|
110
122
|
return NotificationsSchema.parse(notifications);
|
|
111
123
|
}
|
|
112
124
|
function fetchNotificationsInBackground(currentCommand, argv = process.argv, environment = process.env) {
|
|
113
|
-
if (skipNotifications(environment))
|
|
125
|
+
if (skipNotifications(currentCommand, environment))
|
|
114
126
|
return;
|
|
115
|
-
let command = "shopify", args = ["notifications", "list"];
|
|
127
|
+
let command = "shopify", args = ["notifications", "list", "--ignore-errors"];
|
|
116
128
|
if (argv[0] && argv[0] !== "shopify") {
|
|
117
129
|
command = argv[0];
|
|
118
130
|
let indexValue = currentCommand.split(":")[0] ?? "", index = argv.indexOf(indexValue);
|
|
@@ -161,4 +173,4 @@ export {
|
|
|
161
173
|
showNotificationsIfNeeded,
|
|
162
174
|
fetchNotificationsInBackground
|
|
163
175
|
};
|
|
164
|
-
//# sourceMappingURL=chunk-
|
|
176
|
+
//# sourceMappingURL=chunk-MS4SVFZ7.js.map
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
getEnvironmentData,
|
|
5
5
|
getLastSeenUserIdAfterAuth,
|
|
6
6
|
getSensitiveEnvironmentData
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XTDLUGSL.js";
|
|
8
8
|
import {
|
|
9
9
|
runWithRateLimit
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5AOXX545.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-
|
|
27
|
+
} from "./chunk-7H4256T3.js";
|
|
28
28
|
import {
|
|
29
29
|
__commonJS,
|
|
30
30
|
__esm,
|
|
@@ -15482,7 +15482,7 @@ async function publishMonorailEvent(schemaId, publicData, sensitiveData) {
|
|
|
15482
15482
|
publishedCommandNames.add(commandName);
|
|
15483
15483
|
}
|
|
15484
15484
|
try {
|
|
15485
|
-
let currentTime = (/* @__PURE__ */ new Date()).getTime(), payload = { ...publicData, ...sensitiveData }, body = JSON.stringify({ schema_id: schemaId, payload }), headers = buildHeaders(currentTime), response = await fetch(url, { method: "POST", body, headers });
|
|
15485
|
+
let currentTime = (/* @__PURE__ */ new Date()).getTime(), payload = { ...publicData, ...sensitiveData }, body = JSON.stringify({ schema_id: schemaId, payload }), headers = buildHeaders(currentTime), response = await fetch(url, { method: "POST", body, headers }, "non-blocking");
|
|
15486
15486
|
return response.status === 200 ? (outputDebug(outputContent`Analytics event sent: ${outputToken.json(sanitizePayload(payload))}`), { type: "ok" }) : (outputDebug(`Failed to report usage analytics: ${response.statusText}`), { type: "error", message: response.statusText });
|
|
15487
15487
|
} catch (error) {
|
|
15488
15488
|
let message = "Failed to report usage analytics";
|
|
@@ -15926,4 +15926,4 @@ export {
|
|
|
15926
15926
|
requestIdsCollection,
|
|
15927
15927
|
reportAnalyticsEvent
|
|
15928
15928
|
};
|
|
15929
|
-
//# sourceMappingURL=chunk-
|
|
15929
|
+
//# sourceMappingURL=chunk-PBKRSTUJ.js.map
|