@shopify/create-app 3.86.1 → 3.87.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/README.md +2 -1
- package/dist/{chunk-D3N5EZME.js → chunk-CLEVJX2N.js} +6 -6
- package/dist/{chunk-U5F5ZHHV.js → chunk-FOOHTU3J.js} +76 -205
- package/dist/{chunk-SB7IE2QN.js → chunk-QOMUAXM4.js} +5 -5
- package/dist/{chunk-MGT4QKYB.js → chunk-TIUOQMGA.js} +4 -4
- package/dist/{chunk-JXJ33RQ2.js → chunk-V7OWCSFT.js} +4 -4
- package/dist/{chunk-ZPIPJKU4.js → chunk-VGBZIFUM.js} +17 -5
- package/dist/chunk-XHY5JSSI.js +80 -0
- package/dist/{chunk-ASZTU5FY.js → chunk-XMF47BUQ.js} +46 -21
- package/dist/{chunk-T3CH4FSA.js → chunk-YEOHIQB3.js} +5 -5
- package/dist/{custom-oclif-loader-BWUSWZN5.js → custom-oclif-loader-V35G4RBJ.js} +15 -9
- package/dist/{del-M36IQP37.js → del-OKZSX2EU.js} +2 -2
- package/dist/{error-handler-3FRDLG2Y.js → error-handler-CXM4DA3F.js} +9 -7
- package/dist/hooks/postrun.js +9 -68
- package/dist/hooks/prerun.js +7 -5
- package/dist/{http-proxy-node16-K5X7BUK5.js → http-proxy-node16-VGGP6PLA.js} +5 -5
- package/dist/index.js +958 -707
- package/dist/index.test.js +1 -1
- package/dist/{lib-JIKIO4JO.js → lib-IF6LVQLE.js} +2 -2
- package/dist/{local-SYOM7NMW.js → local-AGDNM4MO.js} +5 -3
- package/dist/{magic-string.es-UZAAPNRE.js → magic-string.es-S5HKFBJX.js} +5 -6
- package/dist/{node-package-manager-Q4WSQVPY.js → node-package-manager-K56JEGHV.js} +6 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-7G4EJJ66.js → ui-LLFIPNPT.js} +5 -3
- package/oclif.manifest.json +1 -1
- package/package.json +5 -5
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
CLI_KIT_VERSION,
|
|
3
3
|
jsonOutputEnabled,
|
|
4
4
|
z
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-XMF47BUQ.js";
|
|
6
6
|
import {
|
|
7
7
|
cacheRetrieve,
|
|
8
8
|
cacheStore,
|
|
9
9
|
versionSatisfies
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VGBZIFUM.js";
|
|
11
11
|
import {
|
|
12
12
|
AbortSilentError,
|
|
13
13
|
exec,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
renderError,
|
|
17
17
|
renderInfo,
|
|
18
18
|
renderWarning
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-FOOHTU3J.js";
|
|
20
20
|
import {
|
|
21
21
|
init_cjs_shims
|
|
22
22
|
} from "./chunk-PKR7KJ6P.js";
|
|
@@ -84,7 +84,7 @@ async function showNotificationsIfNeeded(currentSurfaces, environment = process.
|
|
|
84
84
|
throw new AbortSilentError();
|
|
85
85
|
let errorMessage = `Error showing notifications: ${error.message}`;
|
|
86
86
|
outputDebug(errorMessage);
|
|
87
|
-
let { sendErrorToBugsnag } = await import("./error-handler-
|
|
87
|
+
let { sendErrorToBugsnag } = await import("./error-handler-CXM4DA3F.js");
|
|
88
88
|
await sendErrorToBugsnag(errorMessage, "unexpected_error");
|
|
89
89
|
}
|
|
90
90
|
}
|
|
@@ -174,4 +174,4 @@ export {
|
|
|
174
174
|
showNotificationsIfNeeded,
|
|
175
175
|
fetchNotificationsInBackground
|
|
176
176
|
};
|
|
177
|
-
//# sourceMappingURL=chunk-
|
|
177
|
+
//# sourceMappingURL=chunk-QOMUAXM4.js.map
|
|
@@ -185,9 +185,9 @@ var require_concat_map = __commonJS({
|
|
|
185
185
|
}
|
|
186
186
|
});
|
|
187
187
|
|
|
188
|
-
// ../../node_modules/.pnpm/brace-expansion@1.1.
|
|
188
|
+
// ../../node_modules/.pnpm/brace-expansion@1.1.12/node_modules/brace-expansion/index.js
|
|
189
189
|
var require_brace_expansion = __commonJS({
|
|
190
|
-
"../../node_modules/.pnpm/brace-expansion@1.1.
|
|
190
|
+
"../../node_modules/.pnpm/brace-expansion@1.1.12/node_modules/brace-expansion/index.js"(exports, module) {
|
|
191
191
|
init_cjs_shims();
|
|
192
192
|
var concatMap = require_concat_map(), balanced = require_balanced_match();
|
|
193
193
|
module.exports = expandTop;
|
|
@@ -232,7 +232,7 @@ var require_brace_expansion = __commonJS({
|
|
|
232
232
|
if (!m || /\$$/.test(m.pre)) return [str];
|
|
233
233
|
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body), isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body), isSequence = isNumericSequence || isAlphaSequence, isOptions = m.body.indexOf(",") >= 0;
|
|
234
234
|
if (!isSequence && !isOptions)
|
|
235
|
-
return m.post.match(
|
|
235
|
+
return m.post.match(/,(?!,).*\}/) ? (str = m.pre + "{" + m.body + escClose + m.post, expand(str)) : [str];
|
|
236
236
|
var n;
|
|
237
237
|
if (isSequence)
|
|
238
238
|
n = m.body.split(/\.\./);
|
|
@@ -1458,4 +1458,4 @@ export {
|
|
|
1458
1458
|
require_inflight,
|
|
1459
1459
|
require_glob
|
|
1460
1460
|
};
|
|
1461
|
-
//# sourceMappingURL=chunk-
|
|
1461
|
+
//# sourceMappingURL=chunk-TIUOQMGA.js.map
|
|
@@ -166929,9 +166929,9 @@ var require_os = __commonJS({
|
|
|
166929
166929
|
}
|
|
166930
166930
|
});
|
|
166931
166931
|
|
|
166932
|
-
// ../../node_modules/.pnpm/brace-expansion@2.0.
|
|
166932
|
+
// ../../node_modules/.pnpm/brace-expansion@2.0.2/node_modules/brace-expansion/index.js
|
|
166933
166933
|
var require_brace_expansion = __commonJS({
|
|
166934
|
-
"../../node_modules/.pnpm/brace-expansion@2.0.
|
|
166934
|
+
"../../node_modules/.pnpm/brace-expansion@2.0.2/node_modules/brace-expansion/index.js"(exports, module) {
|
|
166935
166935
|
init_cjs_shims();
|
|
166936
166936
|
var balanced = require_balanced_match();
|
|
166937
166937
|
module.exports = expandTop;
|
|
@@ -166983,7 +166983,7 @@ var require_brace_expansion = __commonJS({
|
|
|
166983
166983
|
else {
|
|
166984
166984
|
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body), isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body), isSequence = isNumericSequence || isAlphaSequence, isOptions = m.body.indexOf(",") >= 0;
|
|
166985
166985
|
if (!isSequence && !isOptions)
|
|
166986
|
-
return m.post.match(
|
|
166986
|
+
return m.post.match(/,(?!,).*\}/) ? (str = m.pre + "{" + m.body + escClose + m.post, expand(str)) : [str];
|
|
166987
166987
|
var n;
|
|
166988
166988
|
if (isSequence)
|
|
166989
166989
|
n = m.body.split(/\.\./);
|
|
@@ -172310,4 +172310,4 @@ typescript/lib/typescript.js:
|
|
|
172310
172310
|
and limitations under the License.
|
|
172311
172311
|
***************************************************************************** *)
|
|
172312
172312
|
*/
|
|
172313
|
-
//# sourceMappingURL=chunk-
|
|
172313
|
+
//# sourceMappingURL=chunk-V7OWCSFT.js.map
|
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
runWithTimer,
|
|
21
21
|
unixFileIsOwnedByCurrentUser,
|
|
22
22
|
writeFile
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-FOOHTU3J.js";
|
|
24
24
|
import {
|
|
25
25
|
require_semver
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-V7OWCSFT.js";
|
|
27
27
|
import {
|
|
28
28
|
dirname,
|
|
29
29
|
joinPath
|
|
@@ -9927,6 +9927,18 @@ async function runWithRateLimit(options, config = cliKitStore()) {
|
|
|
9927
9927
|
return config.set("cache", cache), !0;
|
|
9928
9928
|
}
|
|
9929
9929
|
|
|
9930
|
+
// ../cli-kit/dist/public/common/json.js
|
|
9931
|
+
init_cjs_shims();
|
|
9932
|
+
function parseJSON(jsonString, context) {
|
|
9933
|
+
try {
|
|
9934
|
+
return JSON.parse(jsonString);
|
|
9935
|
+
} catch (error) {
|
|
9936
|
+
let errorMessage = error instanceof Error ? error.message : String(error), contextMessage = context ? ` from ${context}` : "";
|
|
9937
|
+
throw new AbortError(`Failed to parse JSON${contextMessage}.
|
|
9938
|
+
${errorMessage}`);
|
|
9939
|
+
}
|
|
9940
|
+
}
|
|
9941
|
+
|
|
9930
9942
|
// ../../node_modules/.pnpm/latest-version@7.0.0/node_modules/latest-version/index.js
|
|
9931
9943
|
init_cjs_shims();
|
|
9932
9944
|
|
|
@@ -13774,7 +13786,7 @@ function versionSatisfies(version, requirements) {
|
|
|
13774
13786
|
async function readAndParsePackageJson(packageJsonPath) {
|
|
13775
13787
|
if (!await fileExists(packageJsonPath))
|
|
13776
13788
|
throw new PackageJsonNotFoundError(dirname(packageJsonPath));
|
|
13777
|
-
return
|
|
13789
|
+
return parseJSON(await readFile(packageJsonPath), packageJsonPath);
|
|
13778
13790
|
}
|
|
13779
13791
|
async function addNPMDependenciesIfNeeded(dependencies, options) {
|
|
13780
13792
|
outputDebug(outputContent`Adding the following dependencies if needed:
|
|
@@ -13881,7 +13893,7 @@ function argumentsToAddDependenciesWithBun(dependencies, type) {
|
|
|
13881
13893
|
async function findUpAndReadPackageJson(fromDirectory) {
|
|
13882
13894
|
let packageJsonPath = await findPathUp("package.json", { cwd: fromDirectory, type: "file" });
|
|
13883
13895
|
if (packageJsonPath) {
|
|
13884
|
-
let packageJson2 =
|
|
13896
|
+
let packageJson2 = parseJSON(await readFile(packageJsonPath), packageJsonPath);
|
|
13885
13897
|
return { path: packageJsonPath, content: packageJson2 };
|
|
13886
13898
|
} else
|
|
13887
13899
|
throw new FindUpAndReadPackageJsonNotFoundError(fromDirectory);
|
|
@@ -13984,4 +13996,4 @@ deep-extend/lib/deep-extend.js:
|
|
|
13984
13996
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
13985
13997
|
*)
|
|
13986
13998
|
*/
|
|
13987
|
-
//# sourceMappingURL=chunk-
|
|
13999
|
+
//# sourceMappingURL=chunk-VGBZIFUM.js.map
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import {
|
|
2
|
+
reportAnalyticsEvent
|
|
3
|
+
} from "./chunk-YEOHIQB3.js";
|
|
4
|
+
import {
|
|
5
|
+
getNextDeprecationDate
|
|
6
|
+
} from "./chunk-XMF47BUQ.js";
|
|
7
|
+
import {
|
|
8
|
+
addSensitiveMetadata,
|
|
9
|
+
getAllSensitiveMetadata,
|
|
10
|
+
outputDebug,
|
|
11
|
+
renderWarning
|
|
12
|
+
} from "./chunk-FOOHTU3J.js";
|
|
13
|
+
import {
|
|
14
|
+
init_cjs_shims
|
|
15
|
+
} from "./chunk-PKR7KJ6P.js";
|
|
16
|
+
|
|
17
|
+
// ../cli-kit/dist/public/node/hooks/postrun.js
|
|
18
|
+
init_cjs_shims();
|
|
19
|
+
|
|
20
|
+
// ../cli-kit/dist/public/node/hooks/deprecations.js
|
|
21
|
+
init_cjs_shims();
|
|
22
|
+
var postrun = (Command) => {
|
|
23
|
+
let nextDeprecationDate = getNextDeprecationDate();
|
|
24
|
+
if (nextDeprecationDate) {
|
|
25
|
+
let forThemes = Command.id.includes("theme");
|
|
26
|
+
renderUpgradeWarning(nextDeprecationDate, forThemes);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
function renderUpgradeWarning(upgradeByDate, forThemes) {
|
|
30
|
+
let headline = `Upgrade to the latest CLI version by ${new Intl.DateTimeFormat("default", {
|
|
31
|
+
year: "numeric",
|
|
32
|
+
month: "long",
|
|
33
|
+
day: "numeric"
|
|
34
|
+
}).format(upgradeByDate)}.`;
|
|
35
|
+
renderWarning({
|
|
36
|
+
headline,
|
|
37
|
+
body: "This command requires an upgrade to continue working as intended.",
|
|
38
|
+
nextSteps: [["Run", { command: "upgrade" }, "to", {
|
|
39
|
+
link: {
|
|
40
|
+
label: "upgrade Shopify CLI",
|
|
41
|
+
url: forThemes ? "https://shopify.dev/docs/themes/tools/cli#upgrade-shopify-cli" : "https://shopify.dev/docs/apps/tools/cli#upgrade-shopify-cli"
|
|
42
|
+
}
|
|
43
|
+
}]]
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// ../cli-kit/dist/public/node/hooks/postrun.js
|
|
48
|
+
var postRunHookCompleted = !1;
|
|
49
|
+
function postRunHookHasCompleted() {
|
|
50
|
+
return postRunHookCompleted;
|
|
51
|
+
}
|
|
52
|
+
var hook = async ({ config, Command }) => {
|
|
53
|
+
await detectStopCommand(Command), await reportAnalyticsEvent({ config, exitMode: "ok" }), postrun(Command);
|
|
54
|
+
let command = Command.id.replace(/:/g, " ");
|
|
55
|
+
outputDebug(`Completed command ${command}`), postRunHookCompleted = !0;
|
|
56
|
+
};
|
|
57
|
+
async function detectStopCommand(commandClass) {
|
|
58
|
+
let currentTime = (/* @__PURE__ */ new Date()).getTime();
|
|
59
|
+
if (commandClass && Object.prototype.hasOwnProperty.call(commandClass, "analyticsStopCommand")) {
|
|
60
|
+
let stopCommand = commandClass.analyticsStopCommand();
|
|
61
|
+
if (stopCommand) {
|
|
62
|
+
let { commandStartOptions } = getAllSensitiveMetadata();
|
|
63
|
+
if (!commandStartOptions)
|
|
64
|
+
return;
|
|
65
|
+
await addSensitiveMetadata(() => ({
|
|
66
|
+
commandStartOptions: {
|
|
67
|
+
...commandStartOptions,
|
|
68
|
+
startTime: currentTime,
|
|
69
|
+
startCommand: stopCommand
|
|
70
|
+
}
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export {
|
|
77
|
+
postRunHookHasCompleted,
|
|
78
|
+
hook
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=chunk-XHY5JSSI.js.map
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
setCurrentSessionId,
|
|
15
15
|
setSessions,
|
|
16
16
|
timeIntervalToMilliseconds
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-VGBZIFUM.js";
|
|
18
18
|
import {
|
|
19
19
|
AbortError,
|
|
20
20
|
BugError,
|
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
stringifyMessage,
|
|
81
81
|
systemEnvironmentVariables,
|
|
82
82
|
themeToken
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-FOOHTU3J.js";
|
|
84
84
|
import {
|
|
85
85
|
cwd,
|
|
86
86
|
sniffForJson
|
|
@@ -30580,7 +30580,7 @@ var require_lib3 = __commonJS({
|
|
|
30580
30580
|
|
|
30581
30581
|
// ../cli-kit/dist/public/common/version.js
|
|
30582
30582
|
init_cjs_shims();
|
|
30583
|
-
var CLI_KIT_VERSION = "3.
|
|
30583
|
+
var CLI_KIT_VERSION = "3.87.1";
|
|
30584
30584
|
|
|
30585
30585
|
// ../cli-kit/dist/private/node/context/service.js
|
|
30586
30586
|
init_cjs_shims();
|
|
@@ -34089,9 +34089,9 @@ var allAPIs = ["admin", "storefront-renderer", "partners", "business-platform",
|
|
|
34089
34089
|
function responseHeaderIsInteresting(header) {
|
|
34090
34090
|
return interestingResponseHeaders.has(header);
|
|
34091
34091
|
}
|
|
34092
|
-
function
|
|
34092
|
+
function isTransientNetworkError(error) {
|
|
34093
34093
|
if (error instanceof Error) {
|
|
34094
|
-
let
|
|
34094
|
+
let transientErrorMessages = [
|
|
34095
34095
|
"socket hang up",
|
|
34096
34096
|
"econnreset",
|
|
34097
34097
|
"econnaborted",
|
|
@@ -34102,12 +34102,24 @@ function isARetryableNetworkError(error) {
|
|
|
34102
34102
|
"econnrefused",
|
|
34103
34103
|
"eai_again",
|
|
34104
34104
|
"epipe",
|
|
34105
|
-
"the operation was aborted"
|
|
34106
|
-
|
|
34105
|
+
"the operation was aborted",
|
|
34106
|
+
"timeout",
|
|
34107
|
+
"premature close",
|
|
34108
|
+
"getaddrinfo"
|
|
34109
|
+
], errorMessage = error.message.toLowerCase(), anyMatches = transientErrorMessages.some((issueMessage) => errorMessage.includes(issueMessage)), missingReason = /^request to .* failed, reason:\s*$/.test(errorMessage);
|
|
34107
34110
|
return anyMatches || missingReason;
|
|
34108
34111
|
}
|
|
34109
34112
|
return !1;
|
|
34110
34113
|
}
|
|
34114
|
+
function isNetworkError(error) {
|
|
34115
|
+
if (isTransientNetworkError(error))
|
|
34116
|
+
return !0;
|
|
34117
|
+
if (error instanceof Error) {
|
|
34118
|
+
let permanentNetworkErrorMessages = ["certificate", "cert", "tls", "ssl", "altnames"], errorMessage = error.message.toLowerCase();
|
|
34119
|
+
return permanentNetworkErrorMessages.some((issueMessage) => errorMessage.includes(issueMessage));
|
|
34120
|
+
}
|
|
34121
|
+
return !1;
|
|
34122
|
+
}
|
|
34111
34123
|
async function runRequestWithNetworkLevelRetry(requestOptions) {
|
|
34112
34124
|
if (!requestOptions.useNetworkLevelRetry)
|
|
34113
34125
|
return requestOptions.request();
|
|
@@ -34116,7 +34128,7 @@ async function runRequestWithNetworkLevelRetry(requestOptions) {
|
|
|
34116
34128
|
try {
|
|
34117
34129
|
return await requestOptions.request();
|
|
34118
34130
|
} catch (err2) {
|
|
34119
|
-
if (lastSeenError = err2, !
|
|
34131
|
+
if (lastSeenError = err2, !isTransientNetworkError(err2))
|
|
34120
34132
|
throw err2;
|
|
34121
34133
|
outputDebug(`Retrying request to ${requestOptions.url} due to network error ${err2}`);
|
|
34122
34134
|
}
|
|
@@ -35848,7 +35860,7 @@ function tokenRequestErrorHandler({ error, store: store2 }) {
|
|
|
35848
35860
|
let invalidTargetErrorMessage = `You are not authorized to use the CLI to develop in the provided store${store2 ? `: ${store2}` : "."}`;
|
|
35849
35861
|
return error === "invalid_grant" ? new InvalidGrantError() : error === "invalid_request" ? new InvalidRequestError() : error === "invalid_target" ? new InvalidTargetError(invalidTargetErrorMessage, "", [
|
|
35850
35862
|
"Ensure you have logged in to the store using the Shopify admin at least once.",
|
|
35851
|
-
"Ensure you are the store owner, or have a staff account if you are attempting to log in to a
|
|
35863
|
+
"Ensure you are the store owner, or have a staff account if you are attempting to log in to a dev store.",
|
|
35852
35864
|
"Ensure you are using the permanent store domain, not a vanity domain."
|
|
35853
35865
|
]) : new AbortError(error);
|
|
35854
35866
|
}
|
|
@@ -35905,11 +35917,18 @@ async function requestDeviceAuthorization(scopes) {
|
|
|
35905
35917
|
method: "POST",
|
|
35906
35918
|
headers: { "Content-type": "application/x-www-form-urlencoded" },
|
|
35907
35919
|
body: convertRequestToParams(queryParams)
|
|
35908
|
-
}),
|
|
35920
|
+
}), responseText;
|
|
35921
|
+
try {
|
|
35922
|
+
responseText = await response.text();
|
|
35923
|
+
} catch {
|
|
35924
|
+
throw new BugError(`Failed to read response from authorization service (HTTP ${response.status}). Network or streaming error occurred.`, "Check your network connection and try again.");
|
|
35925
|
+
}
|
|
35926
|
+
let jsonResult;
|
|
35909
35927
|
try {
|
|
35910
|
-
jsonResult =
|
|
35928
|
+
jsonResult = JSON.parse(responseText);
|
|
35911
35929
|
} catch {
|
|
35912
|
-
|
|
35930
|
+
let errorMessage = buildAuthorizationParseErrorMessage(response, responseText);
|
|
35931
|
+
throw new BugError(errorMessage);
|
|
35913
35932
|
}
|
|
35914
35933
|
if (outputDebug(outputContent`Received device authorization code: ${outputToken.json(jsonResult)}`), !jsonResult.device_code || !jsonResult.verification_uri_complete)
|
|
35915
35934
|
throw new BugError("Failed to start authorization process");
|
|
@@ -35945,15 +35964,12 @@ async function pollForDeviceAuthorization(code, interval = 5) {
|
|
|
35945
35964
|
return;
|
|
35946
35965
|
}
|
|
35947
35966
|
case "slow_down":
|
|
35948
|
-
currentIntervalInSeconds += 5;
|
|
35949
|
-
|
|
35950
|
-
startPolling();
|
|
35951
|
-
return;
|
|
35952
|
-
}
|
|
35967
|
+
currentIntervalInSeconds += 5, startPolling();
|
|
35968
|
+
return;
|
|
35953
35969
|
case "access_denied":
|
|
35954
35970
|
case "expired_token":
|
|
35955
35971
|
case "unknown_failure":
|
|
35956
|
-
reject(
|
|
35972
|
+
reject(new Error(`Device authorization failed: ${error}`));
|
|
35957
35973
|
}
|
|
35958
35974
|
}, startPolling = () => {
|
|
35959
35975
|
setTimeout(onPoll, currentIntervalInSeconds * 1e3);
|
|
@@ -35964,6 +35980,10 @@ async function pollForDeviceAuthorization(code, interval = 5) {
|
|
|
35964
35980
|
function convertRequestToParams(queryParams) {
|
|
35965
35981
|
return Object.entries(queryParams).map(([key, value]) => value && `${key}=${value}`).filter((hasValue) => !!hasValue).join("&");
|
|
35966
35982
|
}
|
|
35983
|
+
function buildAuthorizationParseErrorMessage(response, responseText) {
|
|
35984
|
+
let errorMessage = `Received invalid response from authorization service (HTTP ${response.status}).`;
|
|
35985
|
+
return response.status >= 500 ? errorMessage += " The service may be experiencing issues." : response.status >= 400 && (errorMessage += " The request may be malformed or unauthorized."), responseText.trim().startsWith("<!DOCTYPE") || responseText.trim().startsWith("<html") ? errorMessage += " Received HTML instead of JSON - the service endpoint may have changed." : responseText.trim() === "" ? errorMessage += " Received empty response body." : errorMessage += " Response could not be parsed as valid JSON.", `${errorMessage} If this issue persists, please contact support at https://help.shopify.com`;
|
|
35986
|
+
}
|
|
35967
35987
|
|
|
35968
35988
|
// ../cli-kit/dist/private/node/api/rest.js
|
|
35969
35989
|
init_cjs_shims();
|
|
@@ -36072,7 +36092,7 @@ function unionArrayStrategy(destinationArray, sourceArray) {
|
|
|
36072
36092
|
}
|
|
36073
36093
|
|
|
36074
36094
|
// ../cli-kit/dist/public/common/object.js
|
|
36075
|
-
var import_deepmerge = __toESM(require_cjs()
|
|
36095
|
+
var import_deepmerge = __toESM(require_cjs()), import_pickBy = __toESM(require_pickBy()), import_mapValues = __toESM(require_mapValues()), import_isEqual = __toESM(require_isEqual()), import_differenceWith = __toESM(require_differenceWith()), import_fromPairs = __toESM(require_fromPairs()), import_toPairs = __toESM(require_toPairs()), import_get = __toESM(require_get()), import_set = __toESM(require_set()), import_unset = __toESM(require_unset()), import_isEmpty = __toESM(require_isEmpty());
|
|
36076
36096
|
function deepMergeObjects(lhs, rhs, arrayMergeStrategy = unionArrayStrategy) {
|
|
36077
36097
|
return (0, import_deepmerge.default)(lhs, rhs, { arrayMerge: arrayMergeStrategy });
|
|
36078
36098
|
}
|
|
@@ -36616,9 +36636,13 @@ async function getEnvironmentData(config) {
|
|
|
36616
36636
|
}
|
|
36617
36637
|
async function getSensitiveEnvironmentData(config) {
|
|
36618
36638
|
return {
|
|
36619
|
-
env_plugin_installed_all: JSON.stringify(getPluginNames(config))
|
|
36639
|
+
env_plugin_installed_all: JSON.stringify(getPluginNames(config)),
|
|
36640
|
+
env_shopify_variables: JSON.stringify(getShopifyEnvironmentVariables())
|
|
36620
36641
|
};
|
|
36621
36642
|
}
|
|
36643
|
+
function getShopifyEnvironmentVariables() {
|
|
36644
|
+
return Object.fromEntries(Object.entries(process.env).filter(([key]) => key.startsWith("SHOPIFY_")));
|
|
36645
|
+
}
|
|
36622
36646
|
function getPluginNames(config) {
|
|
36623
36647
|
return [...config.plugins.keys()].sort().filter((plugin) => !plugin.startsWith("@oclif/"));
|
|
36624
36648
|
}
|
|
@@ -36647,6 +36671,7 @@ export {
|
|
|
36647
36671
|
ClientError,
|
|
36648
36672
|
require_lib2 as require_lib,
|
|
36649
36673
|
gql,
|
|
36674
|
+
isNetworkError,
|
|
36650
36675
|
require_mime_types,
|
|
36651
36676
|
require_type2 as require_type,
|
|
36652
36677
|
require_call_bind_apply_helpers,
|
|
@@ -36724,4 +36749,4 @@ mime-types/index.js:
|
|
|
36724
36749
|
* MIT Licensed
|
|
36725
36750
|
*)
|
|
36726
36751
|
*/
|
|
36727
|
-
//# sourceMappingURL=chunk-
|
|
36752
|
+
//# sourceMappingURL=chunk-XMF47BUQ.js.map
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
getLastSeenUserIdAfterAuth,
|
|
6
6
|
getSensitiveEnvironmentData,
|
|
7
7
|
requestIdsCollection
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XMF47BUQ.js";
|
|
9
9
|
import {
|
|
10
10
|
runWithRateLimit
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-VGBZIFUM.js";
|
|
12
12
|
import {
|
|
13
13
|
alwaysLogAnalytics,
|
|
14
14
|
alwaysLogMetrics,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
outputDebug,
|
|
25
25
|
outputToken,
|
|
26
26
|
reportingRateLimit
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-FOOHTU3J.js";
|
|
28
28
|
import {
|
|
29
29
|
__commonJS,
|
|
30
30
|
__esm,
|
|
@@ -15473,7 +15473,7 @@ init_cjs_shims();
|
|
|
15473
15473
|
|
|
15474
15474
|
// ../cli-kit/dist/public/node/monorail.js
|
|
15475
15475
|
init_cjs_shims();
|
|
15476
|
-
var url = "https://monorail-edge.shopifysvc.com/v1/produce", MONORAIL_COMMAND_TOPIC = "app_cli3_command/1.
|
|
15476
|
+
var url = "https://monorail-edge.shopifysvc.com/v1/produce", MONORAIL_COMMAND_TOPIC = "app_cli3_command/1.20", publishedCommandNames = /* @__PURE__ */ new Set();
|
|
15477
15477
|
async function publishMonorailEvent(schemaId, publicData, sensitiveData) {
|
|
15478
15478
|
let commandName = publicData.command;
|
|
15479
15479
|
if (commandName && typeof commandName == "string") {
|
|
@@ -16093,4 +16093,4 @@ export {
|
|
|
16093
16093
|
recordEvent2 as recordEvent,
|
|
16094
16094
|
compileData2 as compileData
|
|
16095
16095
|
};
|
|
16096
|
-
//# sourceMappingURL=chunk-
|
|
16096
|
+
//# sourceMappingURL=chunk-YEOHIQB3.js.map
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
execaSync,
|
|
3
|
-
fileExistsSync
|
|
4
|
-
|
|
3
|
+
fileExistsSync,
|
|
4
|
+
isDevelopment
|
|
5
|
+
} from "./chunk-FOOHTU3J.js";
|
|
5
6
|
import {
|
|
6
7
|
require_lib
|
|
7
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-V7OWCSFT.js";
|
|
8
9
|
import "./chunk-UMUTXITN.js";
|
|
9
10
|
import {
|
|
10
11
|
cwd,
|
|
@@ -13,6 +14,8 @@ import {
|
|
|
13
14
|
} from "./chunk-Y2JP6WFP.js";
|
|
14
15
|
import "./chunk-6ONJEX7Y.js";
|
|
15
16
|
import "./chunk-LABBARNJ.js";
|
|
17
|
+
import "./chunk-CTFDRWUN.js";
|
|
18
|
+
import "./chunk-7IK72W75.js";
|
|
16
19
|
import "./chunk-G2ZZKGSV.js";
|
|
17
20
|
import {
|
|
18
21
|
__toESM,
|
|
@@ -23,11 +26,14 @@ import {
|
|
|
23
26
|
init_cjs_shims();
|
|
24
27
|
var import_core = __toESM(require_lib(), 1), ShopifyConfig = class extends import_core.Config {
|
|
25
28
|
constructor(options) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
if (isDevelopment()) {
|
|
30
|
+
let currentPath = cwd(), path = sniffForPath() ?? currentPath, currentPathMightBeHydrogenMonorepo = /(shopify|hydrogen)\/hydrogen/i.test(currentPath), ignoreHydrogenMonorepo = process.env.IGNORE_HYDROGEN_MONOREPO;
|
|
31
|
+
currentPathMightBeHydrogenMonorepo && !ignoreHydrogenMonorepo && (path = execaSync("npm", ["prefix"]).stdout.trim()), fileExistsSync(joinPath(path, "package.json")) && (options.pluginAdditions = {
|
|
32
|
+
core: ["@shopify/cli-hydrogen"],
|
|
33
|
+
path
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
super(options), isDevelopment() && (this.determinePriority = this.customPriority);
|
|
31
37
|
}
|
|
32
38
|
customPriority(commands) {
|
|
33
39
|
let oclifPlugins = this.pjson.oclif.plugins ?? [];
|
|
@@ -40,4 +46,4 @@ var import_core = __toESM(require_lib(), 1), ShopifyConfig = class extends impor
|
|
|
40
46
|
export {
|
|
41
47
|
ShopifyConfig
|
|
42
48
|
};
|
|
43
|
-
//# sourceMappingURL=custom-oclif-loader-
|
|
49
|
+
//# sourceMappingURL=custom-oclif-loader-V35G4RBJ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
require_glob
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TIUOQMGA.js";
|
|
4
4
|
import "./chunk-SHWOPMLQ.js";
|
|
5
5
|
import {
|
|
6
6
|
require_graceful_fs
|
|
@@ -958,4 +958,4 @@ var require_del = __commonJS({
|
|
|
958
958
|
}
|
|
959
959
|
});
|
|
960
960
|
export default require_del();
|
|
961
|
-
//# sourceMappingURL=del-
|
|
961
|
+
//# sourceMappingURL=del-OKZSX2EU.js.map
|
|
@@ -4,18 +4,20 @@ import {
|
|
|
4
4
|
errorHandler,
|
|
5
5
|
registerCleanBugsnagErrorsFromWithinPlugins,
|
|
6
6
|
sendErrorToBugsnag
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-CLEVJX2N.js";
|
|
8
|
+
import "./chunk-YEOHIQB3.js";
|
|
9
|
+
import "./chunk-XMF47BUQ.js";
|
|
10
10
|
import "./chunk-XD3LXUGW.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-VGBZIFUM.js";
|
|
12
|
+
import "./chunk-FOOHTU3J.js";
|
|
13
|
+
import "./chunk-V7OWCSFT.js";
|
|
14
14
|
import "./chunk-UMUTXITN.js";
|
|
15
15
|
import "./chunk-Y2JP6WFP.js";
|
|
16
16
|
import "./chunk-SHWOPMLQ.js";
|
|
17
17
|
import "./chunk-6ONJEX7Y.js";
|
|
18
18
|
import "./chunk-LABBARNJ.js";
|
|
19
|
+
import "./chunk-CTFDRWUN.js";
|
|
20
|
+
import "./chunk-7IK72W75.js";
|
|
19
21
|
import "./chunk-G2ZZKGSV.js";
|
|
20
22
|
import "./chunk-PKR7KJ6P.js";
|
|
21
23
|
export {
|
|
@@ -25,4 +27,4 @@ export {
|
|
|
25
27
|
registerCleanBugsnagErrorsFromWithinPlugins,
|
|
26
28
|
sendErrorToBugsnag
|
|
27
29
|
};
|
|
28
|
-
//# sourceMappingURL=error-handler-
|
|
30
|
+
//# sourceMappingURL=error-handler-CXM4DA3F.js.map
|
package/dist/hooks/postrun.js
CHANGED
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
} from "../chunk-ASZTU5FY.js";
|
|
2
|
+
hook
|
|
3
|
+
} from "../chunk-XHY5JSSI.js";
|
|
4
|
+
import "../chunk-YEOHIQB3.js";
|
|
5
|
+
import "../chunk-XMF47BUQ.js";
|
|
7
6
|
import "../chunk-XD3LXUGW.js";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
getAllSensitiveMetadata,
|
|
12
|
-
outputDebug,
|
|
13
|
-
renderWarning
|
|
14
|
-
} from "../chunk-U5F5ZHHV.js";
|
|
15
|
-
import "../chunk-JXJ33RQ2.js";
|
|
7
|
+
import "../chunk-VGBZIFUM.js";
|
|
8
|
+
import "../chunk-FOOHTU3J.js";
|
|
9
|
+
import "../chunk-V7OWCSFT.js";
|
|
16
10
|
import "../chunk-UMUTXITN.js";
|
|
17
11
|
import "../chunk-Y2JP6WFP.js";
|
|
18
12
|
import "../chunk-6ONJEX7Y.js";
|
|
19
13
|
import "../chunk-LABBARNJ.js";
|
|
14
|
+
import "../chunk-CTFDRWUN.js";
|
|
15
|
+
import "../chunk-7IK72W75.js";
|
|
20
16
|
import "../chunk-G2ZZKGSV.js";
|
|
21
17
|
import {
|
|
22
18
|
init_cjs_shims
|
|
@@ -24,61 +20,6 @@ import {
|
|
|
24
20
|
|
|
25
21
|
// src/hooks/postrun.ts
|
|
26
22
|
init_cjs_shims();
|
|
27
|
-
|
|
28
|
-
// ../cli-kit/dist/public/node/hooks/postrun.js
|
|
29
|
-
init_cjs_shims();
|
|
30
|
-
|
|
31
|
-
// ../cli-kit/dist/public/node/hooks/deprecations.js
|
|
32
|
-
init_cjs_shims();
|
|
33
|
-
var postrun = (Command) => {
|
|
34
|
-
let nextDeprecationDate = getNextDeprecationDate();
|
|
35
|
-
if (nextDeprecationDate) {
|
|
36
|
-
let forThemes = Command.id.includes("theme");
|
|
37
|
-
renderUpgradeWarning(nextDeprecationDate, forThemes);
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
function renderUpgradeWarning(upgradeByDate, forThemes) {
|
|
41
|
-
let headline = `Upgrade to the latest CLI version by ${new Intl.DateTimeFormat("default", {
|
|
42
|
-
year: "numeric",
|
|
43
|
-
month: "long",
|
|
44
|
-
day: "numeric"
|
|
45
|
-
}).format(upgradeByDate)}.`;
|
|
46
|
-
renderWarning({
|
|
47
|
-
headline,
|
|
48
|
-
body: "This command requires an upgrade to continue working as intended.",
|
|
49
|
-
nextSteps: [["Run", { command: "upgrade" }, "to", {
|
|
50
|
-
link: {
|
|
51
|
-
label: "upgrade Shopify CLI",
|
|
52
|
-
url: forThemes ? "https://shopify.dev/docs/themes/tools/cli#upgrade-shopify-cli" : "https://shopify.dev/docs/apps/tools/cli#upgrade-shopify-cli"
|
|
53
|
-
}
|
|
54
|
-
}]]
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// ../cli-kit/dist/public/node/hooks/postrun.js
|
|
59
|
-
var hook = async ({ config, Command }) => {
|
|
60
|
-
await detectStopCommand(Command), await reportAnalyticsEvent({ config, exitMode: "ok" }), postrun(Command);
|
|
61
|
-
let command = Command.id.replace(/:/g, " ");
|
|
62
|
-
outputDebug(`Completed command ${command}`);
|
|
63
|
-
};
|
|
64
|
-
async function detectStopCommand(commandClass) {
|
|
65
|
-
let currentTime = (/* @__PURE__ */ new Date()).getTime();
|
|
66
|
-
if (commandClass && Object.prototype.hasOwnProperty.call(commandClass, "analyticsStopCommand")) {
|
|
67
|
-
let stopCommand = commandClass.analyticsStopCommand();
|
|
68
|
-
if (stopCommand) {
|
|
69
|
-
let { commandStartOptions } = getAllSensitiveMetadata();
|
|
70
|
-
if (!commandStartOptions)
|
|
71
|
-
return;
|
|
72
|
-
await addSensitiveMetadata(() => ({
|
|
73
|
-
commandStartOptions: {
|
|
74
|
-
...commandStartOptions,
|
|
75
|
-
startTime: currentTime,
|
|
76
|
-
startCommand: stopCommand
|
|
77
|
-
}
|
|
78
|
-
}));
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
23
|
export {
|
|
83
24
|
hook as default
|
|
84
25
|
};
|
package/dist/hooks/prerun.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetchNotificationsInBackground
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-QOMUAXM4.js";
|
|
4
4
|
import {
|
|
5
5
|
CLI_KIT_VERSION,
|
|
6
6
|
startAnalytics
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-XMF47BUQ.js";
|
|
8
8
|
import "../chunk-XD3LXUGW.js";
|
|
9
9
|
import {
|
|
10
10
|
checkForCachedNewVersion,
|
|
11
11
|
checkForNewVersion,
|
|
12
12
|
packageManagerFromUserAgent,
|
|
13
13
|
runAtMinimumInterval
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-VGBZIFUM.js";
|
|
15
15
|
import {
|
|
16
16
|
currentProcessIsGlobal,
|
|
17
17
|
inferPackageManagerForGlobalCLI,
|
|
@@ -20,12 +20,14 @@ import {
|
|
|
20
20
|
outputDebug,
|
|
21
21
|
outputToken,
|
|
22
22
|
outputWarn
|
|
23
|
-
} from "../chunk-
|
|
24
|
-
import "../chunk-
|
|
23
|
+
} from "../chunk-FOOHTU3J.js";
|
|
24
|
+
import "../chunk-V7OWCSFT.js";
|
|
25
25
|
import "../chunk-UMUTXITN.js";
|
|
26
26
|
import "../chunk-Y2JP6WFP.js";
|
|
27
27
|
import "../chunk-6ONJEX7Y.js";
|
|
28
28
|
import "../chunk-LABBARNJ.js";
|
|
29
|
+
import "../chunk-CTFDRWUN.js";
|
|
30
|
+
import "../chunk-7IK72W75.js";
|
|
29
31
|
import "../chunk-G2ZZKGSV.js";
|
|
30
32
|
import {
|
|
31
33
|
init_cjs_shims
|