@shopify/create-app 4.9.4 → 5.0.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/{analytics-7RLRFLCQ.js → analytics-NVXLO3J4.js} +19 -18
- package/dist/analytics-WSNO62UE.js +41 -0
- package/dist/{chunk-75IKCZVA.js → chunk-3S4LYDKB.js} +7 -7
- package/dist/{chunk-L6MEGCFP.js → chunk-77MCGVDL.js} +2 -2
- package/dist/{chunk-C3P3BBJI.js → chunk-C7SNAAK3.js} +3 -2
- package/dist/{chunk-NN45GPHA.js → chunk-CXCQOKSC.js} +5 -5
- package/dist/{chunk-7EY7VZVX.js → chunk-D7A5DYKK.js} +10 -4
- package/dist/{chunk-RRQPXOTA.js → chunk-DIOGWWS3.js} +2 -2
- package/dist/{json-error-XFVCG7UX.js → chunk-DIYGDUU2.js} +9 -39
- package/dist/{chunk-PUN2NAT5.js → chunk-DKAJC4S3.js} +104 -1407
- package/dist/{chunk-A33KVF5C.js → chunk-E4XG6SVI.js} +1 -1
- package/dist/{chunk-TLGD6UXP.js → chunk-F5VM2BG4.js} +202 -79
- package/dist/chunk-GLO2DI4E.js +3036 -0
- package/dist/{chunk-ATS65VTD.js → chunk-J53FSF5Q.js} +3 -3
- package/dist/{chunk-IIDLK3B2.js → chunk-J6OB5R2E.js} +2 -2
- package/dist/{chunk-57VCTLOQ.js → chunk-JZFZ3JYG.js} +7 -2
- package/dist/{chunk-6BEAY6DV.js → chunk-L6U3W2XC.js} +8 -9
- package/dist/{chunk-52LPDF46.js → chunk-LQDG3VBX.js} +15 -12
- package/dist/{chunk-IG7O7GU7.js → chunk-MRUYZVYJ.js} +5 -3
- package/dist/{chunk-TJDRI2KO.js → chunk-S3XZMGTD.js} +13 -13
- package/dist/{chunk-IYZRNCTE.js → chunk-TES7JZAA.js} +13 -11
- package/dist/chunk-UJ5OJF5L.js +47 -0
- package/dist/{chunk-DXHBESFY.js → chunk-VHVI7YNQ.js} +43 -4
- package/dist/{chunk-QLLL4VIM.js → chunk-VKOB4EDC.js} +17 -3040
- package/dist/{chunk-VDSENONW.js → chunk-XP6ZAZM3.js} +7 -7
- package/dist/{chunk-53A2QBFH.js → chunk-YCTA633Q.js} +16 -16
- package/dist/{chunk-EJEHENXO.js → chunk-YYP4UTTA.js} +1 -2
- package/dist/{chunk-MNUDC2IF.js → chunk-ZNGF52JY.js} +2 -2
- package/dist/command-event-context-I6WEUQYW.js +12 -0
- package/dist/{command-json-schema-LA7ZVL4O.js → command-json-schema-NFKBCUYJ.js} +15 -12
- package/dist/{conf-store-NRFTTQPX.js → conf-store-F5RVQXAB.js} +9 -8
- package/dist/{custom-oclif-loader-WGQ253VO.js → custom-oclif-loader-JCV5BKJY.js} +10 -9
- package/dist/{deprecations-WHQU454D.js → deprecations-D6NF6OMP.js} +15 -14
- package/dist/{environment-5XBFWY2A.js → environment-3MKMYTQQ.js} +4 -4
- package/dist/environments-RFS64LOU.js +33 -0
- package/dist/{error-handler-MENPWWOI.js → error-handler-JY4HXOW5.js} +19 -18
- package/dist/{fs-SDWO6JOY.js → fs-7KG7OY2Z.js} +7 -6
- package/dist/hooks/postrun.js +8 -7
- package/dist/hooks/prerun.js +6 -6
- package/dist/index.js +11718 -8172
- package/dist/{is-global-JQIYTGBN.js → is-global-3E5IDVMO.js} +7 -6
- package/dist/json-error-NQH2L57S.js +48 -0
- package/dist/{lib-NYDMHWZM.js → lib-7M7VJIRB.js} +2 -2
- package/dist/{local-G2BSQFFH.js → local-ZKE22RLD.js} +5 -5
- package/dist/{metadata-XWHS3SDJ.js → metadata-EACJ44OR.js} +6 -6
- package/dist/{node-package-manager-QET5FYFY.js → node-package-manager-NFYSJBUI.js} +17 -16
- package/dist/{notifications-system-TAHUXXGQ.js → notifications-system-ZDDGD7AS.js} +20 -19
- package/dist/{os-JHHBXO2N.js → os-VAWLBHBF.js} +8 -7
- package/dist/{output-2B3LJAUM.js → output-MFN7MN4X.js} +7 -6
- package/dist/{path-RDYZ7Q5T.js → path-NBWFOGJ4.js} +2 -2
- package/dist/{prettier-BNZDRHR4.js → prettier-XM547TFN.js} +2 -2
- package/dist/{system-EHWOZQCE.js → system-SDCJN2UD.js} +15 -14
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-ZXHKYLCS.js → ui-HZTN2YF4.js} +15 -14
- package/dist/upgrade-NSRTWSK6.js +295 -0
- package/dist/version-5LTDAJ3Z.js +37 -0
- package/dist/{version-IJ2X574N.js → version-XXTHXVKK.js} +2 -2
- package/oclif.manifest.json +11 -1
- package/package.json +3 -3
- package/dist/analytics-WZ4U5RJZ.js +0 -40
- package/dist/environments-II3QYMU3.js +0 -32
- package/dist/upgrade-H2IEKPCC.js +0 -218
- package/dist/version-QY5L7H5O.js +0 -36
package/dist/upgrade-H2IEKPCC.js
DELETED
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
fetchNotifications,
|
|
3
|
-
filterNotifications
|
|
4
|
-
} from "./chunk-IYZRNCTE.js";
|
|
5
|
-
import "./chunk-TLGD6UXP.js";
|
|
6
|
-
import "./chunk-MSED5ZFM.js";
|
|
7
|
-
import {
|
|
8
|
-
addNPMDependencies,
|
|
9
|
-
checkForCachedNewVersion,
|
|
10
|
-
checkForNewVersion,
|
|
11
|
-
findUpAndReadPackageJson,
|
|
12
|
-
getPackageManager,
|
|
13
|
-
usesWorkspaces
|
|
14
|
-
} from "./chunk-75IKCZVA.js";
|
|
15
|
-
import "./chunk-FKZ3NFHZ.js";
|
|
16
|
-
import {
|
|
17
|
-
CLI_KIT_VERSION
|
|
18
|
-
} from "./chunk-MNUDC2IF.js";
|
|
19
|
-
import "./chunk-G53O4PDO.js";
|
|
20
|
-
import {
|
|
21
|
-
getAutoUpgradeEnabled,
|
|
22
|
-
runAtMinimumInterval,
|
|
23
|
-
setAutoUpgradeEnabled
|
|
24
|
-
} from "./chunk-TJDRI2KO.js";
|
|
25
|
-
import {
|
|
26
|
-
globalCLIVersion,
|
|
27
|
-
isPreReleaseVersion
|
|
28
|
-
} from "./chunk-IIDLK3B2.js";
|
|
29
|
-
import {
|
|
30
|
-
exec,
|
|
31
|
-
isCI,
|
|
32
|
-
renderSuccess
|
|
33
|
-
} from "./chunk-PUN2NAT5.js";
|
|
34
|
-
import "./chunk-52LPDF46.js";
|
|
35
|
-
import "./chunk-RRQPXOTA.js";
|
|
36
|
-
import "./chunk-JGGOQOPO.js";
|
|
37
|
-
import "./chunk-ATS65VTD.js";
|
|
38
|
-
import "./chunk-DXHBESFY.js";
|
|
39
|
-
import "./chunk-L6MEGCFP.js";
|
|
40
|
-
import "./chunk-CM6ALOD7.js";
|
|
41
|
-
import {
|
|
42
|
-
AbortError
|
|
43
|
-
} from "./chunk-6BEAY6DV.js";
|
|
44
|
-
import "./chunk-7EY7VZVX.js";
|
|
45
|
-
import {
|
|
46
|
-
currentProcessIsGlobal,
|
|
47
|
-
getProjectDir,
|
|
48
|
-
inferPackageManagerForGlobalCLI,
|
|
49
|
-
outputContent,
|
|
50
|
-
outputDebug,
|
|
51
|
-
outputInfo,
|
|
52
|
-
outputToken,
|
|
53
|
-
outputWarn
|
|
54
|
-
} from "./chunk-QLLL4VIM.js";
|
|
55
|
-
import {
|
|
56
|
-
isDevelopment
|
|
57
|
-
} from "./chunk-NN45GPHA.js";
|
|
58
|
-
import "./chunk-C3P3BBJI.js";
|
|
59
|
-
import "./chunk-HNIAZN6U.js";
|
|
60
|
-
import "./chunk-EJEHENXO.js";
|
|
61
|
-
import "./chunk-23UTCSPZ.js";
|
|
62
|
-
import "./chunk-LBXDGVFS.js";
|
|
63
|
-
import {
|
|
64
|
-
require_semver
|
|
65
|
-
} from "./chunk-OQ3KXXGH.js";
|
|
66
|
-
import "./chunk-D6NYWNY2.js";
|
|
67
|
-
import {
|
|
68
|
-
cwd,
|
|
69
|
-
moduleDirectory,
|
|
70
|
-
sniffForPath
|
|
71
|
-
} from "./chunk-57VCTLOQ.js";
|
|
72
|
-
import "./chunk-UFLX7QDP.js";
|
|
73
|
-
import "./chunk-SI4LHZYW.js";
|
|
74
|
-
import {
|
|
75
|
-
__toESM,
|
|
76
|
-
init_cjs_shims
|
|
77
|
-
} from "./chunk-3XNI6LP4.js";
|
|
78
|
-
|
|
79
|
-
// ../cli-kit/dist/public/node/upgrade.js
|
|
80
|
-
init_cjs_shims();
|
|
81
|
-
var import_semver = __toESM(require_semver(), 1);
|
|
82
|
-
function cliInstallCommand() {
|
|
83
|
-
let packageManager = inferPackageManagerForGlobalCLI();
|
|
84
|
-
if (!(!packageManager || packageManager === "unknown"))
|
|
85
|
-
return packageManager === "homebrew" ? "brew upgrade shopify-cli" : packageManager === "yarn" ? `${packageManager} global add @shopify/cli@latest` : `${packageManager} ${packageManager === "pnpm" ? "add" : "install"} -g @shopify/cli@latest`;
|
|
86
|
-
}
|
|
87
|
-
async function runCLIUpgrade(options = {}) {
|
|
88
|
-
let path = sniffForPath() ?? cwd(), projectDir = getProjectDir(path), isGlobal = currentProcessIsGlobal();
|
|
89
|
-
if (isDevelopment()) {
|
|
90
|
-
outputInfo("Skipping upgrade in development mode.");
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
if (!(options.autoupgrade && !isGlobal))
|
|
94
|
-
if (isGlobal) {
|
|
95
|
-
let installCommand = cliInstallCommand();
|
|
96
|
-
if (!installCommand)
|
|
97
|
-
throw new Error("Could not determine the package manager");
|
|
98
|
-
let [command, ...args] = installCommand.split(" ");
|
|
99
|
-
if (!command)
|
|
100
|
-
throw new Error("Could not determine the command to run");
|
|
101
|
-
let newerVersion = checkForCachedNewVersion("@shopify/cli", CLI_KIT_VERSION), headline = newerVersion ? `\u2728 New version of Shopify CLI available! (${CLI_KIT_VERSION} \u2192 ${newerVersion})` : "\u2728 New version of Shopify CLI available!";
|
|
102
|
-
outputInfo(outputContent`${headline}
|
|
103
|
-
Now upgrading by running: ${outputToken.genericShellCommand(installCommand)}...`), await exec(command, args, { stdio: "inherit" });
|
|
104
|
-
let installedVersion = await globalCLIVersion();
|
|
105
|
-
if (!installedVersion)
|
|
106
|
-
throw new AbortError("Couldn't verify the Shopify CLI version after upgrading.", outputContent`Check the installed version by running ${outputToken.genericShellCommand("shopify version")}.`);
|
|
107
|
-
let expectedVersion = newerVersion ?? CLI_KIT_VERSION;
|
|
108
|
-
if ((0, import_semver.lt)(installedVersion, expectedVersion))
|
|
109
|
-
throw new AbortError(`Failed to upgrade Shopify CLI. Expected to be on version ${expectedVersion}, but version ${installedVersion} is now installed.`, "Your package manager may be resolving @shopify/cli from a registry with outdated versions. Check your npm registry configuration and try again.");
|
|
110
|
-
renderSuccess({
|
|
111
|
-
headline: "Shopify CLI upgraded.",
|
|
112
|
-
body: `You're now on version ${installedVersion}.`
|
|
113
|
-
});
|
|
114
|
-
} else if (projectDir)
|
|
115
|
-
await upgradeLocalShopify(projectDir, CLI_KIT_VERSION);
|
|
116
|
-
else
|
|
117
|
-
throw new Error("Could not determine the local project directory");
|
|
118
|
-
}
|
|
119
|
-
function versionToAutoUpgrade() {
|
|
120
|
-
let currentVersion = CLI_KIT_VERSION, newerVersion = checkForCachedNewVersion("@shopify/cli", currentVersion);
|
|
121
|
-
if (!newerVersion) {
|
|
122
|
-
outputDebug("Auto-upgrade: No newer version available.");
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
if (process.env.SHOPIFY_CLI_FORCE_AUTO_UPGRADE === "1")
|
|
126
|
-
return outputDebug("Auto-upgrade: Forcing auto-upgrade because of SHOPIFY_CLI_FORCE_AUTO_UPGRADE."), newerVersion;
|
|
127
|
-
if (!getAutoUpgradeEnabled()) {
|
|
128
|
-
outputDebug("Auto-upgrade: Skipping because auto-upgrade is not enabled.");
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
if (isCI()) {
|
|
132
|
-
outputDebug("Auto-upgrade: Skipping auto-upgrade in CI.");
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
if (isPreReleaseVersion(currentVersion)) {
|
|
136
|
-
outputDebug("Auto-upgrade: Skipping auto-upgrade for pre-release version.");
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
139
|
-
return newerVersion;
|
|
140
|
-
}
|
|
141
|
-
async function hasBlockingAutoUpgradeNotification() {
|
|
142
|
-
try {
|
|
143
|
-
let { notifications } = await fetchNotifications();
|
|
144
|
-
return filterNotifications(notifications, "", ["autoupgrade"]).some((notification) => notification.type === "error");
|
|
145
|
-
} catch {
|
|
146
|
-
return !1;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
async function warnIfUpgradeAvailable() {
|
|
150
|
-
if (isCI() || isPreReleaseVersion(CLI_KIT_VERSION) || getAutoUpgradeEnabled())
|
|
151
|
-
return;
|
|
152
|
-
let newerVersion = checkForCachedNewVersion("@shopify/cli", CLI_KIT_VERSION);
|
|
153
|
-
newerVersion && await runAtMinimumInterval("warn-on-available-upgrade", { days: 1 }, async () => {
|
|
154
|
-
outputWarn(getOutputUpdateCLIReminder(newerVersion));
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
function getOutputUpdateCLIReminder(version, isMajor = !1) {
|
|
158
|
-
let installCommand = cliInstallCommand(), base = installCommand ? outputContent`💡 Version ${version} available! Run ${outputToken.genericShellCommand(installCommand)}`.value : outputContent`💡 Version ${version} available!`.value;
|
|
159
|
-
if (isMajor) {
|
|
160
|
-
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;
|
|
161
|
-
return `${base}
|
|
162
|
-
|
|
163
|
-
${majorNotice}`;
|
|
164
|
-
}
|
|
165
|
-
return base;
|
|
166
|
-
}
|
|
167
|
-
async function upgradeLocalShopify(projectDir, currentVersion) {
|
|
168
|
-
let packageJson = (await findUpAndReadPackageJson(projectDir)).content, packageJsonDependencies = packageJson.dependencies ?? {}, packageJsonDevDependencies = packageJson.devDependencies ?? {}, resolvedCLIVersion = { ...packageJsonDependencies, ...packageJsonDevDependencies }[await cliDependency()];
|
|
169
|
-
if (!resolvedCLIVersion) {
|
|
170
|
-
outputDebug("Auto-upgrade: CLI dependency not found in project dependencies, skipping local upgrade.");
|
|
171
|
-
return;
|
|
172
|
-
}
|
|
173
|
-
resolvedCLIVersion.slice(0, 1).match(/[\^~]/) && (resolvedCLIVersion = currentVersion);
|
|
174
|
-
let newestCLIVersion = await checkForNewVersion(await cliDependency(), resolvedCLIVersion);
|
|
175
|
-
newestCLIVersion ? outputUpgradeMessage(resolvedCLIVersion, newestCLIVersion) : outputWontInstallMessage(resolvedCLIVersion), await installJsonDependencies("prod", packageJsonDependencies, projectDir), await installJsonDependencies("dev", packageJsonDevDependencies, projectDir);
|
|
176
|
-
}
|
|
177
|
-
async function installJsonDependencies(depsEnv, deps, directory) {
|
|
178
|
-
let packagesToUpdate = [await cliDependency(), ...await oclifPlugins()].filter((pkg) => !!deps[pkg]).map((pkg) => ({ name: pkg, version: "latest" })), appUsesWorkspaces = await usesWorkspaces(directory);
|
|
179
|
-
packagesToUpdate.length > 0 && await addNPMDependencies(packagesToUpdate, {
|
|
180
|
-
packageManager: await getPackageManager(directory),
|
|
181
|
-
type: depsEnv,
|
|
182
|
-
directory,
|
|
183
|
-
stdout: process.stdout,
|
|
184
|
-
stderr: process.stderr,
|
|
185
|
-
addToRootDirectory: appUsesWorkspaces
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
async function cliDependency() {
|
|
189
|
-
return (await packageJsonContents()).name;
|
|
190
|
-
}
|
|
191
|
-
async function oclifPlugins() {
|
|
192
|
-
return (await packageJsonContents())?.oclif?.plugins ?? [];
|
|
193
|
-
}
|
|
194
|
-
var _packageJsonContents;
|
|
195
|
-
async function packageJsonContents() {
|
|
196
|
-
if (!_packageJsonContents) {
|
|
197
|
-
let packageJson = await findUpAndReadPackageJson(moduleDirectory(import.meta.url));
|
|
198
|
-
_packageJsonContents = _packageJsonContents ?? packageJson.content;
|
|
199
|
-
}
|
|
200
|
-
return _packageJsonContents;
|
|
201
|
-
}
|
|
202
|
-
function outputWontInstallMessage(currentVersion) {
|
|
203
|
-
outputInfo(outputContent`You're on the latest version, ${outputToken.yellow(currentVersion)}, no need to upgrade!`);
|
|
204
|
-
}
|
|
205
|
-
function outputUpgradeMessage(currentVersion, newestVersion) {
|
|
206
|
-
outputInfo(outputContent`Upgrading CLI from ${outputToken.yellow(currentVersion)} to ${outputToken.yellow(newestVersion)}...`);
|
|
207
|
-
}
|
|
208
|
-
export {
|
|
209
|
-
cliInstallCommand,
|
|
210
|
-
getAutoUpgradeEnabled,
|
|
211
|
-
getOutputUpdateCLIReminder,
|
|
212
|
-
hasBlockingAutoUpgradeNotification,
|
|
213
|
-
runCLIUpgrade,
|
|
214
|
-
setAutoUpgradeEnabled,
|
|
215
|
-
versionToAutoUpgrade,
|
|
216
|
-
warnIfUpgradeAvailable
|
|
217
|
-
};
|
|
218
|
-
//# sourceMappingURL=upgrade-H2IEKPCC.js.map
|
package/dist/version-QY5L7H5O.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
globalCLIVersion,
|
|
3
|
-
isMajorVersionChange,
|
|
4
|
-
isPreReleaseVersion,
|
|
5
|
-
localCLIVersion
|
|
6
|
-
} from "./chunk-IIDLK3B2.js";
|
|
7
|
-
import "./chunk-PUN2NAT5.js";
|
|
8
|
-
import "./chunk-52LPDF46.js";
|
|
9
|
-
import "./chunk-RRQPXOTA.js";
|
|
10
|
-
import "./chunk-JGGOQOPO.js";
|
|
11
|
-
import "./chunk-ATS65VTD.js";
|
|
12
|
-
import "./chunk-DXHBESFY.js";
|
|
13
|
-
import "./chunk-L6MEGCFP.js";
|
|
14
|
-
import "./chunk-CM6ALOD7.js";
|
|
15
|
-
import "./chunk-6BEAY6DV.js";
|
|
16
|
-
import "./chunk-7EY7VZVX.js";
|
|
17
|
-
import "./chunk-QLLL4VIM.js";
|
|
18
|
-
import "./chunk-NN45GPHA.js";
|
|
19
|
-
import "./chunk-C3P3BBJI.js";
|
|
20
|
-
import "./chunk-HNIAZN6U.js";
|
|
21
|
-
import "./chunk-EJEHENXO.js";
|
|
22
|
-
import "./chunk-23UTCSPZ.js";
|
|
23
|
-
import "./chunk-LBXDGVFS.js";
|
|
24
|
-
import "./chunk-OQ3KXXGH.js";
|
|
25
|
-
import "./chunk-D6NYWNY2.js";
|
|
26
|
-
import "./chunk-57VCTLOQ.js";
|
|
27
|
-
import "./chunk-UFLX7QDP.js";
|
|
28
|
-
import "./chunk-SI4LHZYW.js";
|
|
29
|
-
import "./chunk-3XNI6LP4.js";
|
|
30
|
-
export {
|
|
31
|
-
globalCLIVersion,
|
|
32
|
-
isMajorVersionChange,
|
|
33
|
-
isPreReleaseVersion,
|
|
34
|
-
localCLIVersion
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=version-QY5L7H5O.js.map
|