@shopify/create-app 3.93.2 → 3.94.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.
- package/dist/{chunk-EUW2PDD4.js → chunk-3P2CWI75.js} +26 -20
- package/dist/{chunk-TYJR2NOA.js → chunk-4IXPA7MG.js} +1061 -1198
- package/dist/{chunk-XTF32XZH.js → chunk-77I3TRE2.js} +54 -14
- package/dist/{chunk-NHV222KP.js → chunk-7PXEGPG5.js} +5 -5
- package/dist/{chunk-SR2M4BGN.js → chunk-CXPWSYGC.js} +11 -11
- package/dist/{chunk-PYOLGWV3.js → chunk-GUVQJPFV.js} +41 -22
- package/dist/{chunk-TM5S3XKJ.js → chunk-IFG7N3S2.js} +288 -140
- package/dist/{chunk-HK42PKRF.js → chunk-NIYBO6HO.js} +10 -29
- package/dist/{error-handler-GLXGGAYC.js → error-handler-W2U33HYT.js} +7 -7
- package/dist/hooks/postrun.js +7 -7
- package/dist/hooks/prerun.js +7 -7
- package/dist/{http-proxy-node16-RJKHWVRW.js → http-proxy-node16-U5VBDLS3.js} +2 -2
- package/dist/index.js +107453 -102774
- package/dist/index.test.js +7 -7
- package/dist/{lib-GUBXVVG4.js → lib-PPI2FZOR.js} +3 -3
- package/dist/{local-756DLLHZ.js → local-5M7UJBSV.js} +5 -5
- package/dist/{node-package-manager-5XAS44KX.js → node-package-manager-FU2YTSQE.js} +8 -6
- package/dist/{path-TAO6YSB2.js → path-NQ6GZ2WO.js} +4 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-RRP6VHLP.js → ui-YR2APRRS.js} +5 -5
- package/oclif.manifest.json +1 -1
- package/package.json +3 -3
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
CLI_KIT_VERSION,
|
|
3
3
|
getNextDeprecationDate,
|
|
4
4
|
reportAnalyticsEvent
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-GUVQJPFV.js";
|
|
6
6
|
import {
|
|
7
7
|
addNPMDependencies,
|
|
8
8
|
checkForCachedNewVersion,
|
|
@@ -12,8 +12,9 @@ import {
|
|
|
12
12
|
getPackageManager,
|
|
13
13
|
runAtMinimumInterval,
|
|
14
14
|
usesWorkspaces
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-77I3TRE2.js";
|
|
16
16
|
import {
|
|
17
|
+
addPublicMetadata,
|
|
17
18
|
addSensitiveMetadata,
|
|
18
19
|
currentProcessIsGlobal,
|
|
19
20
|
exec,
|
|
@@ -30,12 +31,12 @@ import {
|
|
|
30
31
|
outputToken,
|
|
31
32
|
outputWarn,
|
|
32
33
|
renderWarning
|
|
33
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-4IXPA7MG.js";
|
|
34
35
|
import {
|
|
35
36
|
cwd,
|
|
36
37
|
moduleDirectory,
|
|
37
38
|
sniffForPath
|
|
38
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-NIYBO6HO.js";
|
|
39
40
|
import {
|
|
40
41
|
init_cjs_shims
|
|
41
42
|
} from "./chunk-PKR7KJ6P.js";
|
|
@@ -79,7 +80,7 @@ function cliInstallCommand() {
|
|
|
79
80
|
}
|
|
80
81
|
async function runCLIUpgrade() {
|
|
81
82
|
let path = sniffForPath() ?? cwd(), projectDir = getProjectDir(path), isGlobal = currentProcessIsGlobal();
|
|
82
|
-
if (
|
|
83
|
+
if (isDevelopment()) {
|
|
83
84
|
outputInfo("Skipping upgrade in development mode.");
|
|
84
85
|
return;
|
|
85
86
|
}
|
|
@@ -126,9 +127,15 @@ async function warnIfUpgradeAvailable() {
|
|
|
126
127
|
outputWarn(getOutputUpdateCLIReminder(newerVersion));
|
|
127
128
|
});
|
|
128
129
|
}
|
|
129
|
-
function getOutputUpdateCLIReminder(version) {
|
|
130
|
-
let installCommand = cliInstallCommand();
|
|
131
|
-
|
|
130
|
+
function getOutputUpdateCLIReminder(version, isMajor = !1) {
|
|
131
|
+
let installCommand = cliInstallCommand(), base = installCommand ? outputContent`💡 Version ${version} available! Run ${outputToken.genericShellCommand(installCommand)}`.value : outputContent`💡 Version ${version} available!`.value;
|
|
132
|
+
if (isMajor) {
|
|
133
|
+
let releaseUrl = `https://github.com/Shopify/cli/releases/tag/${version}`, majorNotice = outputContent`⚠️ This is a major version — review breaking changes before upgrading:\n ${outputToken.link(releaseUrl, releaseUrl)}`.value;
|
|
134
|
+
return `${base}
|
|
135
|
+
|
|
136
|
+
${majorNotice}`;
|
|
137
|
+
}
|
|
138
|
+
return base;
|
|
132
139
|
}
|
|
133
140
|
async function upgradeLocalShopify(projectDir, currentVersion) {
|
|
134
141
|
let packageJson = (await findUpAndReadPackageJson(projectDir)).content, packageJsonDependencies = packageJson.dependencies ?? {}, packageJsonDevDependencies = packageJson.devDependencies ?? {}, resolvedCLIVersion = { ...packageJsonDependencies, ...packageJsonDevDependencies }[await cliDependency()];
|
|
@@ -180,12 +187,7 @@ function postRunHookHasCompleted() {
|
|
|
180
187
|
var hook = async ({ config, Command }) => {
|
|
181
188
|
await detectStopCommand(Command), await reportAnalyticsEvent({ config, exitMode: "ok" }), postrun(Command);
|
|
182
189
|
let command = Command.id.replace(/:/g, " ");
|
|
183
|
-
|
|
184
|
-
try {
|
|
185
|
-
await autoUpgradeIfNeeded();
|
|
186
|
-
} catch (error) {
|
|
187
|
-
outputDebug(`Auto-upgrade check failed: ${error}`);
|
|
188
|
-
}
|
|
190
|
+
outputDebug(`Completed command ${command}`), postRunHookCompleted = !0, !command.includes("notifications") && !command.includes("upgrade") && await autoUpgradeIfNeeded();
|
|
189
191
|
};
|
|
190
192
|
async function autoUpgradeIfNeeded() {
|
|
191
193
|
let newerVersion = versionToAutoUpgrade();
|
|
@@ -198,14 +200,18 @@ async function autoUpgradeIfNeeded() {
|
|
|
198
200
|
});
|
|
199
201
|
}
|
|
200
202
|
async function performAutoUpgrade(newerVersion) {
|
|
201
|
-
if (isMajorVersionChange(CLI_KIT_VERSION, newerVersion))
|
|
202
|
-
|
|
203
|
+
if (isMajorVersionChange(CLI_KIT_VERSION, newerVersion)) {
|
|
204
|
+
outputWarn(getOutputUpdateCLIReminder(newerVersion, !0)), await addPublicMetadata(() => ({
|
|
205
|
+
env_auto_upgrade_skipped_reason: "major_version"
|
|
206
|
+
}));
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
203
209
|
try {
|
|
204
|
-
await runCLIUpgrade();
|
|
210
|
+
await runCLIUpgrade(), await addPublicMetadata(() => ({ env_auto_upgrade_success: !0 }));
|
|
205
211
|
} catch (error) {
|
|
206
212
|
let errorMessage = `Auto-upgrade failed: ${error}`;
|
|
207
|
-
outputDebug(errorMessage), outputWarn(getOutputUpdateCLIReminder(newerVersion));
|
|
208
|
-
let { sendErrorToBugsnag } = await import("./error-handler-
|
|
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), {
|
|
209
215
|
packageManager: inferPackageManagerForGlobalCLI(),
|
|
210
216
|
platform: process.platform,
|
|
211
217
|
cliVersion: CLI_KIT_VERSION
|
|
@@ -236,4 +242,4 @@ export {
|
|
|
236
242
|
postRunHookHasCompleted,
|
|
237
243
|
hook
|
|
238
244
|
};
|
|
239
|
-
//# sourceMappingURL=chunk-
|
|
245
|
+
//# sourceMappingURL=chunk-3P2CWI75.js.map
|