@shopify/create-app 4.3.0 → 4.4.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-3PMXYIP7.js → analytics-QHRELZLM.js} +11 -11
- package/dist/{analytics-UKSMSQBS.js → analytics-ZUNBGXYN.js} +11 -11
- package/dist/{chunk-ZTXAANY4.js → chunk-2QBCAA2H.js} +2 -2
- package/dist/{chunk-GYXZK243.js → chunk-4K6N4HPB.js} +2 -2
- package/dist/{chunk-WJSRZNB2.js → chunk-62QNHSYH.js} +6 -6
- package/dist/{chunk-BLEIVACU.js → chunk-6HSLT7CL.js} +2948 -535
- package/dist/{chunk-5UUZHSUY.js → chunk-BSWIPNAC.js} +3 -3
- package/dist/{chunk-76IXOUER.js → chunk-BURYKXEK.js} +3 -3
- package/dist/{chunk-BL35W5EH.js → chunk-IIKNZMZ3.js} +16 -16
- package/dist/{chunk-3HO4OGB2.js → chunk-J2RZURHV.js} +2 -2
- package/dist/{chunk-HIWQ3G6P.js → chunk-KIFOZKPG.js} +6 -6
- package/dist/{chunk-EBLNNEPP.js → chunk-LXXKYAVF.js} +14 -7
- package/dist/{chunk-OFTMFPMR.js → chunk-OEWJXNZ3.js} +3 -3
- package/dist/{chunk-ZNNK6ZF5.js → chunk-QIPOIRI3.js} +4 -4
- package/dist/{chunk-LQOISCOF.js → chunk-RU7WY226.js} +10 -10
- package/dist/{chunk-HJATSDRW.js → chunk-YPGFYTKI.js} +13 -10
- package/dist/{conf-store-HDH4Y2F3.js → conf-store-UHO3XWAB.js} +5 -5
- package/dist/{deprecations-AREYHAI7.js → deprecations-QW5VFBSX.js} +7 -7
- package/dist/{environments-C3Z4TCZS.js → environments-QH3M37S5.js} +8 -8
- package/dist/{error-handler-C3IHDYS6.js → error-handler-5PE7ZVHN.js} +11 -11
- package/dist/{fs-BANPZ2MD.js → fs-EMRZP532.js} +3 -3
- package/dist/hooks/postrun.js +4 -4
- package/dist/hooks/prerun.js +6 -6
- package/dist/index.js +1598 -1115
- package/dist/{is-global-G56KES2Y.js → is-global-KJG33UDT.js} +3 -3
- package/dist/{local-JBCA7C7D.js → local-ZYOWEOLU.js} +2 -2
- package/dist/{metadata-FSAZEGLO.js → metadata-CJ2MZGDF.js} +3 -3
- package/dist/{node-package-manager-MQEWWORU.js → node-package-manager-UMBL54DA.js} +9 -9
- package/dist/{notifications-system-LRNZSYSG.js → notifications-system-OQOH54WS.js} +12 -12
- package/dist/{output-SAJPYFUY.js → output-E6LGYDU7.js} +3 -3
- package/dist/{system-ERPUEL46.js → system-6NBRPH6N.js} +7 -7
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-SD2MSDNB.js → ui-6HWKB4U5.js} +7 -7
- package/dist/{upgrade-UCWZU5UX.js → upgrade-6SKUAGJM.js} +13 -13
- package/dist/{version-ZWXWXLYG.js → version-QEK7UUGF.js} +8 -8
- package/dist/{version-ODTNTG3P.js → version-ZQZJVZRD.js} +2 -2
- package/oclif.manifest.json +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -10,12 +10,12 @@ import {
|
|
|
10
10
|
TomlFileError,
|
|
11
11
|
loadEnvironment,
|
|
12
12
|
require_toml_patch
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KIFOZKPG.js";
|
|
14
14
|
import {
|
|
15
15
|
getCurrentCommandId,
|
|
16
16
|
setCurrentCommandId,
|
|
17
17
|
showNotificationsIfNeeded
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-RU7WY226.js";
|
|
19
19
|
import {
|
|
20
20
|
ClientError,
|
|
21
21
|
DevServerCore,
|
|
@@ -47,7 +47,6 @@ import {
|
|
|
47
47
|
fanoutHooks,
|
|
48
48
|
fetch as fetch2,
|
|
49
49
|
fileHash,
|
|
50
|
-
formData,
|
|
51
50
|
generateFetchAppLogUrl,
|
|
52
51
|
getAppAutomationToken,
|
|
53
52
|
getBackendPort,
|
|
@@ -89,10 +88,11 @@ import {
|
|
|
89
88
|
require_lib2 as require_lib4,
|
|
90
89
|
require_once,
|
|
91
90
|
require_wrappy,
|
|
91
|
+
setLastSeenUserId,
|
|
92
92
|
setPathValue,
|
|
93
93
|
shopifyFetch,
|
|
94
94
|
storeAdminUrl
|
|
95
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-6HSLT7CL.js";
|
|
96
96
|
import {
|
|
97
97
|
setNextDeprecationDate
|
|
98
98
|
} from "./chunk-MSED5ZFM.js";
|
|
@@ -114,22 +114,22 @@ import {
|
|
|
114
114
|
usesWorkspaces,
|
|
115
115
|
versionSatisfies,
|
|
116
116
|
writePackageJSON
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-62QNHSYH.js";
|
|
118
118
|
import {
|
|
119
119
|
CLI_KIT_VERSION
|
|
120
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-2QBCAA2H.js";
|
|
121
121
|
import "./chunk-G53O4PDO.js";
|
|
122
122
|
import {
|
|
123
123
|
LocalStorage,
|
|
124
124
|
require_ajv,
|
|
125
125
|
runAtMinimumInterval,
|
|
126
126
|
serviceEnvironment
|
|
127
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-QIPOIRI3.js";
|
|
128
128
|
import {
|
|
129
129
|
globalCLIVersion,
|
|
130
130
|
isPreReleaseVersion,
|
|
131
131
|
localCLIVersion
|
|
132
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-J2RZURHV.js";
|
|
133
133
|
import {
|
|
134
134
|
AbortController as AbortController2,
|
|
135
135
|
AbortSignal,
|
|
@@ -170,20 +170,20 @@ import {
|
|
|
170
170
|
useAbortSignal,
|
|
171
171
|
useConcurrentOutputContext,
|
|
172
172
|
username
|
|
173
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-LXXKYAVF.js";
|
|
174
174
|
import {
|
|
175
175
|
addPublicMetadata,
|
|
176
176
|
addSensitiveMetadata,
|
|
177
177
|
createRuntimeMetadataContainer,
|
|
178
178
|
runWithTimer
|
|
179
|
-
} from "./chunk-
|
|
179
|
+
} from "./chunk-BURYKXEK.js";
|
|
180
180
|
import {
|
|
181
181
|
AbortError,
|
|
182
182
|
AbortSilentError,
|
|
183
183
|
BugError,
|
|
184
184
|
CancelExecution,
|
|
185
185
|
import_ts_error
|
|
186
|
-
} from "./chunk-
|
|
186
|
+
} from "./chunk-OEWJXNZ3.js";
|
|
187
187
|
import {
|
|
188
188
|
require_commonjs,
|
|
189
189
|
require_lib
|
|
@@ -195,10 +195,10 @@ import "./chunk-JGGOQOPO.js";
|
|
|
195
195
|
import "./chunk-OQ3KXXGH.js";
|
|
196
196
|
import {
|
|
197
197
|
waitForPostRunHookAndExit
|
|
198
|
-
} from "./chunk-
|
|
198
|
+
} from "./chunk-IIKNZMZ3.js";
|
|
199
199
|
import {
|
|
200
200
|
treeKill
|
|
201
|
-
} from "./chunk-
|
|
201
|
+
} from "./chunk-4K6N4HPB.js";
|
|
202
202
|
import {
|
|
203
203
|
Box_default,
|
|
204
204
|
Link,
|
|
@@ -305,7 +305,7 @@ import {
|
|
|
305
305
|
use_stdout_default,
|
|
306
306
|
writeFile,
|
|
307
307
|
writeFileSync
|
|
308
|
-
} from "./chunk-
|
|
308
|
+
} from "./chunk-YPGFYTKI.js";
|
|
309
309
|
import {
|
|
310
310
|
codespacePortForwardingDomain,
|
|
311
311
|
codespaceURL,
|
|
@@ -321,7 +321,7 @@ import {
|
|
|
321
321
|
isUnitTest,
|
|
322
322
|
isVerbose,
|
|
323
323
|
themeKitAccessDomain
|
|
324
|
-
} from "./chunk-
|
|
324
|
+
} from "./chunk-BSWIPNAC.js";
|
|
325
325
|
import "./chunk-7OHJH7BF.js";
|
|
326
326
|
import {
|
|
327
327
|
basename,
|
|
@@ -2785,7 +2785,7 @@ NOTE: as of Ohm v16, there is no default action for iteration nodes \u2014 see `
|
|
|
2785
2785
|
));
|
|
2786
2786
|
});
|
|
2787
2787
|
}
|
|
2788
|
-
}, BALLOT_X = "\u2717", CHECK_MARK = "\u2713", DOT_OPERATOR = "\u22C5", RIGHTWARDS_DOUBLE_ARROW = "\u21D2", SYMBOL_FOR_HORIZONTAL_TABULATION = "\u2409", SYMBOL_FOR_LINE_FEED = "\u240A", SYMBOL_FOR_CARRIAGE_RETURN = "\u240D",
|
|
2788
|
+
}, BALLOT_X = "\u2717", CHECK_MARK = "\u2713", DOT_OPERATOR = "\u22C5", RIGHTWARDS_DOUBLE_ARROW = "\u21D2", SYMBOL_FOR_HORIZONTAL_TABULATION = "\u2409", SYMBOL_FOR_LINE_FEED = "\u240A", SYMBOL_FOR_CARRIAGE_RETURN = "\u240D", Flags42 = {
|
|
2789
2789
|
succeeded: 1,
|
|
2790
2790
|
isRootNode: 2,
|
|
2791
2791
|
isImplicitSpaces: 4,
|
|
@@ -2805,7 +2805,7 @@ NOTE: as of Ohm v16, there is no default action for iteration nodes \u2014 see `
|
|
|
2805
2805
|
}
|
|
2806
2806
|
var Trace = class _Trace {
|
|
2807
2807
|
constructor(input, pos1, pos2, expr, succeeded, bindings, optChildren) {
|
|
2808
|
-
this.input = input, this.pos = this.pos1 = pos1, this.pos2 = pos2, this.source = new Interval(input, pos1, pos2), this.expr = expr, this.bindings = bindings, this.children = optChildren || [], this.terminatingLREntry = null, this._flags = succeeded ?
|
|
2808
|
+
this.input = input, this.pos = this.pos1 = pos1, this.pos2 = pos2, this.source = new Interval(input, pos1, pos2), this.expr = expr, this.bindings = bindings, this.children = optChildren || [], this.terminatingLREntry = null, this._flags = succeeded ? Flags42.succeeded : 0;
|
|
2809
2809
|
}
|
|
2810
2810
|
get displayString() {
|
|
2811
2811
|
return this.expr.toDisplayString();
|
|
@@ -2881,8 +2881,8 @@ NOTE: as of Ohm v16, there is no default action for iteration nodes \u2014 see `
|
|
|
2881
2881
|
}
|
|
2882
2882
|
};
|
|
2883
2883
|
Trace.prototype.SKIP = {};
|
|
2884
|
-
Object.keys(
|
|
2885
|
-
let mask =
|
|
2884
|
+
Object.keys(Flags42).forEach((name) => {
|
|
2885
|
+
let mask = Flags42[name];
|
|
2886
2886
|
Object.defineProperty(Trace.prototype, name, {
|
|
2887
2887
|
get() {
|
|
2888
2888
|
return (this._flags & mask) !== 0;
|
|
@@ -6122,7 +6122,7 @@ NOTE: as of Ohm v16, there is no default action for iteration nodes \u2014 see `
|
|
|
6122
6122
|
));
|
|
6123
6123
|
});
|
|
6124
6124
|
}
|
|
6125
|
-
}, BALLOT_X = "\u2717", CHECK_MARK = "\u2713", DOT_OPERATOR = "\u22C5", RIGHTWARDS_DOUBLE_ARROW = "\u21D2", SYMBOL_FOR_HORIZONTAL_TABULATION = "\u2409", SYMBOL_FOR_LINE_FEED = "\u240A", SYMBOL_FOR_CARRIAGE_RETURN = "\u240D",
|
|
6125
|
+
}, BALLOT_X = "\u2717", CHECK_MARK = "\u2713", DOT_OPERATOR = "\u22C5", RIGHTWARDS_DOUBLE_ARROW = "\u21D2", SYMBOL_FOR_HORIZONTAL_TABULATION = "\u2409", SYMBOL_FOR_LINE_FEED = "\u240A", SYMBOL_FOR_CARRIAGE_RETURN = "\u240D", Flags42 = {
|
|
6126
6126
|
succeeded: 1,
|
|
6127
6127
|
isRootNode: 2,
|
|
6128
6128
|
isImplicitSpaces: 4,
|
|
@@ -6142,7 +6142,7 @@ NOTE: as of Ohm v16, there is no default action for iteration nodes \u2014 see `
|
|
|
6142
6142
|
}
|
|
6143
6143
|
var Trace = class _Trace {
|
|
6144
6144
|
constructor(input, pos1, pos2, expr, succeeded, bindings, optChildren) {
|
|
6145
|
-
this.input = input, this.pos = this.pos1 = pos1, this.pos2 = pos2, this.source = new Interval(input, pos1, pos2), this.expr = expr, this.bindings = bindings, this.children = optChildren || [], this.terminatingLREntry = null, this._flags = succeeded ?
|
|
6145
|
+
this.input = input, this.pos = this.pos1 = pos1, this.pos2 = pos2, this.source = new Interval(input, pos1, pos2), this.expr = expr, this.bindings = bindings, this.children = optChildren || [], this.terminatingLREntry = null, this._flags = succeeded ? Flags42.succeeded : 0;
|
|
6146
6146
|
}
|
|
6147
6147
|
get displayString() {
|
|
6148
6148
|
return this.expr.toDisplayString();
|
|
@@ -6218,8 +6218,8 @@ NOTE: as of Ohm v16, there is no default action for iteration nodes \u2014 see `
|
|
|
6218
6218
|
}
|
|
6219
6219
|
};
|
|
6220
6220
|
Trace.prototype.SKIP = {};
|
|
6221
|
-
Object.keys(
|
|
6222
|
-
let mask =
|
|
6221
|
+
Object.keys(Flags42).forEach((name) => {
|
|
6222
|
+
let mask = Flags42[name];
|
|
6223
6223
|
Object.defineProperty(Trace.prototype, name, {
|
|
6224
6224
|
get() {
|
|
6225
6225
|
return (this._flags & mask) !== 0;
|
|
@@ -9493,12 +9493,12 @@ var require_stage_1_cst = __commonJS({
|
|
|
9493
9493
|
whitespaceStart: (tokens) => tokens[0].children[1].sourceString,
|
|
9494
9494
|
whitespaceEnd: (tokens) => tokens[0].children[7].sourceString,
|
|
9495
9495
|
delimiterWhitespaceStart: (tokens) => {
|
|
9496
|
-
var
|
|
9497
|
-
return ((
|
|
9496
|
+
var _a50;
|
|
9497
|
+
return ((_a50 = tokens[2].children[1]) === null || _a50 === void 0 ? void 0 : _a50.sourceString) || "";
|
|
9498
9498
|
},
|
|
9499
9499
|
delimiterWhitespaceEnd: (tokens) => {
|
|
9500
|
-
var
|
|
9501
|
-
return ((
|
|
9500
|
+
var _a50;
|
|
9501
|
+
return ((_a50 = tokens[2].children[7]) === null || _a50 === void 0 ? void 0 : _a50.sourceString) || "";
|
|
9502
9502
|
},
|
|
9503
9503
|
locStart,
|
|
9504
9504
|
locEnd,
|
|
@@ -10310,7 +10310,7 @@ var require_stage_2_ast = __commonJS({
|
|
|
10310
10310
|
this.current.push(node);
|
|
10311
10311
|
}
|
|
10312
10312
|
close(node, nodeType) {
|
|
10313
|
-
var
|
|
10313
|
+
var _a50, _b;
|
|
10314
10314
|
if (isLiquidBranch(this.parent) && (this.parent.blockEndPosition = { start: node.locStart, end: node.locStart }, this.closeParentWith(node)), !this.parent)
|
|
10315
10315
|
throw new errors_1.LiquidHTMLASTParsingError(`Attempting to close ${nodeType} '${getName2(node)}' before it was opened`, this.source, node.locStart, node.locEnd);
|
|
10316
10316
|
if (getName2(this.parent) !== getName2(node) || this.parent.type !== nodeType) {
|
|
@@ -10321,7 +10321,7 @@ var require_stage_2_ast = __commonJS({
|
|
|
10321
10321
|
else
|
|
10322
10322
|
throw new errors_1.LiquidHTMLASTParsingError(`Attempting to close ${nodeType} '${getName2(node)}' before ${this.parent.type} '${getName2(this.parent)}' was closed`, this.source, this.parent.position.start, node.locEnd, getUnclosed(this.parent));
|
|
10323
10323
|
}
|
|
10324
|
-
this.parent.position.end = node.locEnd, this.parent.blockEndPosition = position(node), this.parent.type == types_1.NodeTypes.LiquidTag && node.type == stage_1_cst_1.ConcreteNodeTypes.LiquidTagClose && (this.parent.delimiterWhitespaceStart = (
|
|
10324
|
+
this.parent.position.end = node.locEnd, this.parent.blockEndPosition = position(node), this.parent.type == types_1.NodeTypes.LiquidTag && node.type == stage_1_cst_1.ConcreteNodeTypes.LiquidTagClose && (this.parent.delimiterWhitespaceStart = (_a50 = node.whitespaceStart) !== null && _a50 !== void 0 ? _a50 : "", this.parent.delimiterWhitespaceEnd = (_b = node.whitespaceEnd) !== null && _b !== void 0 ? _b : ""), this.cursor.pop(), this.cursor.pop();
|
|
10325
10325
|
}
|
|
10326
10326
|
// This function performs the following tasks:
|
|
10327
10327
|
// - Tries to find a parent branch to close when pushing a new branch.
|
|
@@ -10376,16 +10376,16 @@ var require_stage_2_ast = __commonJS({
|
|
|
10376
10376
|
}
|
|
10377
10377
|
}
|
|
10378
10378
|
function cstToAst(cst, options) {
|
|
10379
|
-
var
|
|
10379
|
+
var _a50;
|
|
10380
10380
|
if (cst.length === 0)
|
|
10381
10381
|
return [];
|
|
10382
10382
|
let builder = buildAst(cst, options);
|
|
10383
10383
|
if (!options.allowUnclosedDocumentNode && builder.cursor.length !== 0)
|
|
10384
|
-
throw new errors_1.LiquidHTMLASTParsingError(`Attempting to end parsing before ${(
|
|
10384
|
+
throw new errors_1.LiquidHTMLASTParsingError(`Attempting to end parsing before ${(_a50 = builder.parent) === null || _a50 === void 0 ? void 0 : _a50.type} '${getName2(builder.parent)}' was closed`, builder.source, builder.source.length - 1, builder.source.length, getUnclosed(builder.parent, builder.grandparent));
|
|
10385
10385
|
return builder.ast;
|
|
10386
10386
|
}
|
|
10387
10387
|
function buildAst(cst, options) {
|
|
10388
|
-
var
|
|
10388
|
+
var _a50, _b, _c, _d;
|
|
10389
10389
|
let builder = new ASTBuilder(cst[0].source);
|
|
10390
10390
|
for (let i = 0; i < cst.length; i++) {
|
|
10391
10391
|
let node = cst[i];
|
|
@@ -10416,7 +10416,7 @@ var require_stage_2_ast = __commonJS({
|
|
|
10416
10416
|
markup: markup(node.name, node.markup),
|
|
10417
10417
|
name: node.name,
|
|
10418
10418
|
body: toRawMarkup(node, options),
|
|
10419
|
-
whitespaceStart: (
|
|
10419
|
+
whitespaceStart: (_a50 = node.whitespaceStart) !== null && _a50 !== void 0 ? _a50 : "",
|
|
10420
10420
|
whitespaceEnd: (_b = node.whitespaceEnd) !== null && _b !== void 0 ? _b : "",
|
|
10421
10421
|
delimiterWhitespaceStart: (_c = node.delimiterWhitespaceStart) !== null && _c !== void 0 ? _c : "",
|
|
10422
10422
|
delimiterWhitespaceEnd: (_d = node.delimiterWhitespaceEnd) !== null && _d !== void 0 ? _d : "",
|
|
@@ -10599,23 +10599,23 @@ var require_stage_2_ast = __commonJS({
|
|
|
10599
10599
|
return cstToAst(attrList, options);
|
|
10600
10600
|
}
|
|
10601
10601
|
function liquidTagBaseAttributes(node) {
|
|
10602
|
-
var
|
|
10602
|
+
var _a50, _b;
|
|
10603
10603
|
return {
|
|
10604
10604
|
type: types_1.NodeTypes.LiquidTag,
|
|
10605
10605
|
position: position(node),
|
|
10606
|
-
whitespaceStart: (
|
|
10606
|
+
whitespaceStart: (_a50 = node.whitespaceStart) !== null && _a50 !== void 0 ? _a50 : "",
|
|
10607
10607
|
whitespaceEnd: (_b = node.whitespaceEnd) !== null && _b !== void 0 ? _b : "",
|
|
10608
10608
|
blockStartPosition: position(node),
|
|
10609
10609
|
source: node.source
|
|
10610
10610
|
};
|
|
10611
10611
|
}
|
|
10612
10612
|
function liquidBranchBaseAttributes(node) {
|
|
10613
|
-
var
|
|
10613
|
+
var _a50, _b;
|
|
10614
10614
|
return {
|
|
10615
10615
|
type: types_1.NodeTypes.LiquidBranch,
|
|
10616
10616
|
children: [],
|
|
10617
10617
|
position: position(node),
|
|
10618
|
-
whitespaceStart: (
|
|
10618
|
+
whitespaceStart: (_a50 = node.whitespaceStart) !== null && _a50 !== void 0 ? _a50 : "",
|
|
10619
10619
|
whitespaceEnd: (_b = node.whitespaceEnd) !== null && _b !== void 0 ? _b : "",
|
|
10620
10620
|
blockStartPosition: position(node),
|
|
10621
10621
|
blockEndPosition: { start: -1, end: -1 },
|
|
@@ -10755,7 +10755,7 @@ var require_stage_2_ast = __commonJS({
|
|
|
10755
10755
|
}
|
|
10756
10756
|
}
|
|
10757
10757
|
function toNamedLiquidBranchBaseCase(node) {
|
|
10758
|
-
var
|
|
10758
|
+
var _a50, _b;
|
|
10759
10759
|
return {
|
|
10760
10760
|
name: node.name,
|
|
10761
10761
|
type: types_1.NodeTypes.LiquidBranch,
|
|
@@ -10765,7 +10765,7 @@ var require_stage_2_ast = __commonJS({
|
|
|
10765
10765
|
children: [],
|
|
10766
10766
|
blockStartPosition: { start: node.locStart, end: node.locEnd },
|
|
10767
10767
|
blockEndPosition: { start: -1, end: -1 },
|
|
10768
|
-
whitespaceStart: (
|
|
10768
|
+
whitespaceStart: (_a50 = node.whitespaceStart) !== null && _a50 !== void 0 ? _a50 : "",
|
|
10769
10769
|
whitespaceEnd: (_b = node.whitespaceEnd) !== null && _b !== void 0 ? _b : "",
|
|
10770
10770
|
source: node.source
|
|
10771
10771
|
};
|
|
@@ -10848,10 +10848,10 @@ var require_stage_2_ast = __commonJS({
|
|
|
10848
10848
|
}
|
|
10849
10849
|
var liquidToken = /(\{%|\{\{)-?/g;
|
|
10850
10850
|
function toRawMarkupKindFromHtmlNode(node) {
|
|
10851
|
-
var
|
|
10851
|
+
var _a50;
|
|
10852
10852
|
switch (node.name) {
|
|
10853
10853
|
case "script": {
|
|
10854
|
-
let scriptAttr = (
|
|
10854
|
+
let scriptAttr = (_a50 = node.attrList) === null || _a50 === void 0 ? void 0 : _a50.find((attr) => "name" in attr && typeof attr.name != "string" && attr.name.length === 1 && attr.name[0].type === stage_1_cst_1.ConcreteNodeTypes.TextNode && attr.name[0].value === "type");
|
|
10855
10855
|
if (!scriptAttr || !("value" in scriptAttr) || scriptAttr.value.length === 0 || scriptAttr.value[0].type !== stage_1_cst_1.ConcreteNodeTypes.TextNode)
|
|
10856
10856
|
return RawMarkupKinds.javascript;
|
|
10857
10857
|
let type = scriptAttr.value[0].value;
|
|
@@ -10960,11 +10960,11 @@ var require_stage_2_ast = __commonJS({
|
|
|
10960
10960
|
};
|
|
10961
10961
|
}
|
|
10962
10962
|
function toLiquidVariableOutput(node) {
|
|
10963
|
-
var
|
|
10963
|
+
var _a50, _b;
|
|
10964
10964
|
return {
|
|
10965
10965
|
type: types_1.NodeTypes.LiquidVariableOutput,
|
|
10966
10966
|
markup: typeof node.markup == "string" ? node.markup : toLiquidVariable(node.markup),
|
|
10967
|
-
whitespaceStart: (
|
|
10967
|
+
whitespaceStart: (_a50 = node.whitespaceStart) !== null && _a50 !== void 0 ? _a50 : "",
|
|
10968
10968
|
whitespaceEnd: (_b = node.whitespaceEnd) !== null && _b !== void 0 ? _b : "",
|
|
10969
10969
|
position: position(node),
|
|
10970
10970
|
source: node.source
|
|
@@ -11139,11 +11139,11 @@ var require_stage_2_ast = __commonJS({
|
|
|
11139
11139
|
return value !== null && typeof value == "object" && "type" in value && types_1.NodeTypes.hasOwnProperty(value.type);
|
|
11140
11140
|
}
|
|
11141
11141
|
function getUnclosed(node, parentNode) {
|
|
11142
|
-
var
|
|
11142
|
+
var _a50;
|
|
11143
11143
|
if (node)
|
|
11144
11144
|
return getName2(node) === null && parentNode && (node = parentNode), {
|
|
11145
11145
|
type: node.type,
|
|
11146
|
-
name: (
|
|
11146
|
+
name: (_a50 = getName2(node)) !== null && _a50 !== void 0 ? _a50 : "",
|
|
11147
11147
|
blockStartPosition: "blockStartPosition" in node ? node.blockStartPosition : node.position
|
|
11148
11148
|
};
|
|
11149
11149
|
}
|
|
@@ -17284,8 +17284,8 @@ var require_guards = __commonJS({
|
|
|
17284
17284
|
exports.isRoot = isRoot;
|
|
17285
17285
|
var isSelector = isNodeType.bind(null, _types.SELECTOR);
|
|
17286
17286
|
exports.isSelector = isSelector;
|
|
17287
|
-
var
|
|
17288
|
-
exports.isString =
|
|
17287
|
+
var isString3 = isNodeType.bind(null, _types.STRING);
|
|
17288
|
+
exports.isString = isString3;
|
|
17289
17289
|
var isTag = isNodeType.bind(null, _types.TAG);
|
|
17290
17290
|
exports.isTag = isTag;
|
|
17291
17291
|
var isUniversal = isNodeType.bind(null, _types.UNIVERSAL);
|
|
@@ -19008,9 +19008,9 @@ var DocumentUri, URI, integer, uinteger, Position, Range, Location, LocationLink
|
|
|
19008
19008
|
}
|
|
19009
19009
|
Diagnostic3.create = create;
|
|
19010
19010
|
function is(value) {
|
|
19011
|
-
var
|
|
19011
|
+
var _a50;
|
|
19012
19012
|
let candidate = value;
|
|
19013
|
-
return Is.defined(candidate) && Range.is(candidate.range) && Is.string(candidate.message) && (Is.number(candidate.severity) || Is.undefined(candidate.severity)) && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code)) && (Is.undefined(candidate.codeDescription) || Is.string((
|
|
19013
|
+
return Is.defined(candidate) && Range.is(candidate.range) && Is.string(candidate.message) && (Is.number(candidate.severity) || Is.undefined(candidate.severity)) && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code)) && (Is.undefined(candidate.codeDescription) || Is.string((_a50 = candidate.codeDescription) === null || _a50 === void 0 ? void 0 : _a50.href)) && (Is.string(candidate.source) || Is.undefined(candidate.source)) && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
|
|
19014
19014
|
}
|
|
19015
19015
|
Diagnostic3.is = is;
|
|
19016
19016
|
})(Diagnostic || (Diagnostic = {}));
|
|
@@ -24872,7 +24872,7 @@ var require_asset_size_css = __commonJS({
|
|
|
24872
24872
|
function isLiquidVariable(node) {
|
|
24873
24873
|
return typeof node != "string" && node.type === liquid_html_parser_1.NodeTypes.LiquidVariable;
|
|
24874
24874
|
}
|
|
24875
|
-
function
|
|
24875
|
+
function isString3(node) {
|
|
24876
24876
|
return node.type === liquid_html_parser_1.NodeTypes.String;
|
|
24877
24877
|
}
|
|
24878
24878
|
exports.AssetSizeCSS = {
|
|
@@ -24918,7 +24918,7 @@ var require_asset_size_css = __commonJS({
|
|
|
24918
24918
|
let url = href.value[0].value;
|
|
24919
24919
|
await checkRemoteAssetSize(url, href.attributePosition);
|
|
24920
24920
|
}
|
|
24921
|
-
if (isLiquidVariableOutput(href.value[0]) && isLiquidVariable(href.value[0].markup) &&
|
|
24921
|
+
if (isLiquidVariableOutput(href.value[0]) && isLiquidVariable(href.value[0].markup) && isString3(href.value[0].markup.expression) && href.value[0].markup.filters.length === 1 && href.value[0].markup.filters[0].name === "asset_url") {
|
|
24922
24922
|
let assetName = href.value[0].markup.expression.value;
|
|
24923
24923
|
await checkThemeAssetSize(assetName, href.attributePosition);
|
|
24924
24924
|
}
|
|
@@ -24964,7 +24964,7 @@ var require_asset_size_javascript = __commonJS({
|
|
|
24964
24964
|
function isLiquidVariable(node) {
|
|
24965
24965
|
return typeof node != "string" && node.type === liquid_html_parser_1.NodeTypes.LiquidVariable;
|
|
24966
24966
|
}
|
|
24967
|
-
function
|
|
24967
|
+
function isString3(node) {
|
|
24968
24968
|
return node.type === liquid_html_parser_1.NodeTypes.String;
|
|
24969
24969
|
}
|
|
24970
24970
|
exports.AssetSizeJavaScript = {
|
|
@@ -25009,7 +25009,7 @@ var require_asset_size_javascript = __commonJS({
|
|
|
25009
25009
|
let url = src.value[0].value;
|
|
25010
25010
|
await checkRemoteAssetSize(url, src.attributePosition);
|
|
25011
25011
|
}
|
|
25012
|
-
if (isLiquidVariableOutput(src.value[0]) && isLiquidVariable(src.value[0].markup) &&
|
|
25012
|
+
if (isLiquidVariableOutput(src.value[0]) && isLiquidVariable(src.value[0].markup) && isString3(src.value[0].markup.expression) && src.value[0].markup.filters.length === 1 && src.value[0].markup.filters[0].name === "asset_url") {
|
|
25013
25013
|
let assetName = src.value[0].markup.expression.value;
|
|
25014
25014
|
await checkThemeAssetSize(assetName, src.attributePosition);
|
|
25015
25015
|
}
|
|
@@ -33882,7 +33882,7 @@ var require_lodash = __commonJS({
|
|
|
33882
33882
|
function includes2(collection, value, fromIndex, guard) {
|
|
33883
33883
|
collection = isArrayLike(collection) ? collection : values2(collection), fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0;
|
|
33884
33884
|
var length = collection.length;
|
|
33885
|
-
return fromIndex < 0 && (fromIndex = nativeMax(length + fromIndex, 0)),
|
|
33885
|
+
return fromIndex < 0 && (fromIndex = nativeMax(length + fromIndex, 0)), isString3(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
|
|
33886
33886
|
}
|
|
33887
33887
|
var invokeMap = baseRest(function(collection, path, args) {
|
|
33888
33888
|
var index = -1, isFunc = typeof path == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : [];
|
|
@@ -33933,7 +33933,7 @@ var require_lodash = __commonJS({
|
|
|
33933
33933
|
if (collection == null)
|
|
33934
33934
|
return 0;
|
|
33935
33935
|
if (isArrayLike(collection))
|
|
33936
|
-
return
|
|
33936
|
+
return isString3(collection) ? stringSize(collection) : collection.length;
|
|
33937
33937
|
var tag = getTag(collection);
|
|
33938
33938
|
return tag == mapTag || tag == setTag ? collection.size : baseKeys(collection).length;
|
|
33939
33939
|
}
|
|
@@ -34261,7 +34261,7 @@ var require_lodash = __commonJS({
|
|
|
34261
34261
|
return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
|
|
34262
34262
|
}
|
|
34263
34263
|
var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
|
|
34264
|
-
function
|
|
34264
|
+
function isString3(value) {
|
|
34265
34265
|
return typeof value == "string" || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
|
|
34266
34266
|
}
|
|
34267
34267
|
function isSymbol(value) {
|
|
@@ -34284,7 +34284,7 @@ var require_lodash = __commonJS({
|
|
|
34284
34284
|
if (!value)
|
|
34285
34285
|
return [];
|
|
34286
34286
|
if (isArrayLike(value))
|
|
34287
|
-
return
|
|
34287
|
+
return isString3(value) ? stringToArray(value) : copyArray(value);
|
|
34288
34288
|
if (symIterator && value[symIterator])
|
|
34289
34289
|
return iteratorToArray(value[symIterator]());
|
|
34290
34290
|
var tag = getTag(value), func = tag == mapTag ? mapToArray : tag == setTag ? setToArray : values2;
|
|
@@ -34850,7 +34850,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
34850
34850
|
function sumBy(array, iteratee2) {
|
|
34851
34851
|
return array && array.length ? baseSum(array, getIteratee(iteratee2, 2)) : 0;
|
|
34852
34852
|
}
|
|
34853
|
-
return lodash.after = after, lodash.ary = ary, lodash.assign = assign, lodash.assignIn = assignIn, lodash.assignInWith = assignInWith, lodash.assignWith = assignWith, lodash.at = at, lodash.before = before, lodash.bind = bind, lodash.bindAll = bindAll, lodash.bindKey = bindKey, lodash.castArray = castArray, lodash.chain = chain, lodash.chunk = chunk, lodash.compact = compact2, lodash.concat = concat, lodash.cond = cond, lodash.conforms = conforms, lodash.constant = constant, lodash.countBy = countBy, lodash.create = create, lodash.curry = curry, lodash.curryRight = curryRight, lodash.debounce = debounce2, lodash.defaults = defaults, lodash.defaultsDeep = defaultsDeep, lodash.defer = defer2, lodash.delay = delay, lodash.difference = difference3, lodash.differenceBy = differenceBy, lodash.differenceWith = differenceWith, lodash.drop = drop, lodash.dropRight = dropRight, lodash.dropRightWhile = dropRightWhile, lodash.dropWhile = dropWhile, lodash.fill = fill, lodash.filter = filter, lodash.flatMap = flatMap, lodash.flatMapDeep = flatMapDeep, lodash.flatMapDepth = flatMapDepth, lodash.flatten = flatten, lodash.flattenDeep = flattenDeep, lodash.flattenDepth = flattenDepth, lodash.flip = flip, lodash.flow = flow, lodash.flowRight = flowRight, lodash.fromPairs = fromPairs, lodash.functions = functions, lodash.functionsIn = functionsIn, lodash.groupBy = groupBy2, lodash.initial = initial, lodash.intersection = intersection, lodash.intersectionBy = intersectionBy, lodash.intersectionWith = intersectionWith, lodash.invert = invert, lodash.invertBy = invertBy, lodash.invokeMap = invokeMap, lodash.iteratee = iteratee, lodash.keyBy = keyBy, lodash.keys = keys, lodash.keysIn = keysIn, lodash.map = map, lodash.mapKeys = mapKeys, lodash.mapValues = mapValues, lodash.matches = matches2, lodash.matchesProperty = matchesProperty, lodash.memoize = memoize, lodash.merge = merge, lodash.mergeWith = mergeWith, lodash.method = method, lodash.methodOf = methodOf, lodash.mixin = mixin, lodash.negate = negate, lodash.nthArg = nthArg, lodash.omit = omit, lodash.omitBy = omitBy, lodash.once = once, lodash.orderBy = orderBy, lodash.over = over, lodash.overArgs = overArgs, lodash.overEvery = overEvery, lodash.overSome = overSome, lodash.partial = partial, lodash.partialRight = partialRight, lodash.partition = partition2, lodash.pick = pick, lodash.pickBy = pickBy2, lodash.property = property, lodash.propertyOf = propertyOf, lodash.pull = pull3, lodash.pullAll = pullAll, lodash.pullAllBy = pullAllBy, lodash.pullAllWith = pullAllWith, lodash.pullAt = pullAt, lodash.range = range, lodash.rangeRight = rangeRight, lodash.rearg = rearg, lodash.reject = reject, lodash.remove = remove2, lodash.rest = rest, lodash.reverse = reverse, lodash.sampleSize = sampleSize, lodash.set = set, lodash.setWith = setWith, lodash.shuffle = shuffle, lodash.slice = slice, lodash.sortBy = sortBy, lodash.sortedUniq = sortedUniq, lodash.sortedUniqBy = sortedUniqBy, lodash.split = split, lodash.spread = spread, lodash.tail = tail, lodash.take = take, lodash.takeRight = takeRight, lodash.takeRightWhile = takeRightWhile, lodash.takeWhile = takeWhile, lodash.tap = tap, lodash.throttle = throttle, lodash.thru = thru, lodash.toArray = toArray, lodash.toPairs = toPairs, lodash.toPairsIn = toPairsIn, lodash.toPath = toPath, lodash.toPlainObject = toPlainObject, lodash.transform = transform, lodash.unary = unary, lodash.union = union2, lodash.unionBy = unionBy, lodash.unionWith = unionWith, lodash.uniq = uniq2, lodash.uniqBy = uniqBy2, lodash.uniqWith = uniqWith, lodash.unset = unset, lodash.unzip = unzip, lodash.unzipWith = unzipWith, lodash.update = update, lodash.updateWith = updateWith, lodash.values = values2, lodash.valuesIn = valuesIn, lodash.without = without, lodash.words = words, lodash.wrap = wrap, lodash.xor = xor, lodash.xorBy = xorBy, lodash.xorWith = xorWith, lodash.zip = zip2, lodash.zipObject = zipObject, lodash.zipObjectDeep = zipObjectDeep, lodash.zipWith = zipWith, lodash.entries = toPairs, lodash.entriesIn = toPairsIn, lodash.extend = assignIn, lodash.extendWith = assignInWith, mixin(lodash, lodash), lodash.add = add, lodash.attempt = attempt, lodash.camelCase = camelCase, lodash.capitalize = capitalize2, lodash.ceil = ceil, lodash.clamp = clamp, lodash.clone = clone, lodash.cloneDeep = cloneDeep2, lodash.cloneDeepWith = cloneDeepWith, lodash.cloneWith = cloneWith, lodash.conformsTo = conformsTo, lodash.deburr = deburr, lodash.defaultTo = defaultTo, lodash.divide = divide, lodash.endsWith = endsWith3, lodash.eq = eq, lodash.escape = escape, lodash.escapeRegExp = escapeRegExp2, lodash.every = every, lodash.find = find, lodash.findIndex = findIndex, lodash.findKey = findKey, lodash.findLast = findLast, lodash.findLastIndex = findLastIndex, lodash.findLastKey = findLastKey, lodash.floor = floor, lodash.forEach = forEach, lodash.forEachRight = forEachRight, lodash.forIn = forIn, lodash.forInRight = forInRight, lodash.forOwn = forOwn, lodash.forOwnRight = forOwnRight, lodash.get = get, lodash.gt = gt, lodash.gte = gte, lodash.has = has, lodash.hasIn = hasIn, lodash.head = head, lodash.identity = identity, lodash.includes = includes2, lodash.indexOf = indexOf, lodash.inRange = inRange, lodash.invoke = invoke, lodash.isArguments = isArguments, lodash.isArray = isArray, lodash.isArrayBuffer = isArrayBuffer, lodash.isArrayLike = isArrayLike, lodash.isArrayLikeObject = isArrayLikeObject, lodash.isBoolean = isBoolean2, lodash.isBuffer = isBuffer, lodash.isDate = isDate, lodash.isElement = isElement, lodash.isEmpty = isEmpty2, lodash.isEqual = isEqual, lodash.isEqualWith = isEqualWith, lodash.isError = isError2, lodash.isFinite = isFinite2, lodash.isFunction = isFunction, lodash.isInteger = isInteger, lodash.isLength = isLength, lodash.isMap = isMap, lodash.isMatch = isMatch, lodash.isMatchWith = isMatchWith, lodash.isNaN = isNaN2, lodash.isNative = isNative, lodash.isNil = isNil, lodash.isNull = isNull, lodash.isNumber = isNumber2, lodash.isObject = isObject2, lodash.isObjectLike = isObjectLike, lodash.isPlainObject = isPlainObject3, lodash.isRegExp = isRegExp, lodash.isSafeInteger = isSafeInteger, lodash.isSet = isSet, lodash.isString =
|
|
34853
|
+
return lodash.after = after, lodash.ary = ary, lodash.assign = assign, lodash.assignIn = assignIn, lodash.assignInWith = assignInWith, lodash.assignWith = assignWith, lodash.at = at, lodash.before = before, lodash.bind = bind, lodash.bindAll = bindAll, lodash.bindKey = bindKey, lodash.castArray = castArray, lodash.chain = chain, lodash.chunk = chunk, lodash.compact = compact2, lodash.concat = concat, lodash.cond = cond, lodash.conforms = conforms, lodash.constant = constant, lodash.countBy = countBy, lodash.create = create, lodash.curry = curry, lodash.curryRight = curryRight, lodash.debounce = debounce2, lodash.defaults = defaults, lodash.defaultsDeep = defaultsDeep, lodash.defer = defer2, lodash.delay = delay, lodash.difference = difference3, lodash.differenceBy = differenceBy, lodash.differenceWith = differenceWith, lodash.drop = drop, lodash.dropRight = dropRight, lodash.dropRightWhile = dropRightWhile, lodash.dropWhile = dropWhile, lodash.fill = fill, lodash.filter = filter, lodash.flatMap = flatMap, lodash.flatMapDeep = flatMapDeep, lodash.flatMapDepth = flatMapDepth, lodash.flatten = flatten, lodash.flattenDeep = flattenDeep, lodash.flattenDepth = flattenDepth, lodash.flip = flip, lodash.flow = flow, lodash.flowRight = flowRight, lodash.fromPairs = fromPairs, lodash.functions = functions, lodash.functionsIn = functionsIn, lodash.groupBy = groupBy2, lodash.initial = initial, lodash.intersection = intersection, lodash.intersectionBy = intersectionBy, lodash.intersectionWith = intersectionWith, lodash.invert = invert, lodash.invertBy = invertBy, lodash.invokeMap = invokeMap, lodash.iteratee = iteratee, lodash.keyBy = keyBy, lodash.keys = keys, lodash.keysIn = keysIn, lodash.map = map, lodash.mapKeys = mapKeys, lodash.mapValues = mapValues, lodash.matches = matches2, lodash.matchesProperty = matchesProperty, lodash.memoize = memoize, lodash.merge = merge, lodash.mergeWith = mergeWith, lodash.method = method, lodash.methodOf = methodOf, lodash.mixin = mixin, lodash.negate = negate, lodash.nthArg = nthArg, lodash.omit = omit, lodash.omitBy = omitBy, lodash.once = once, lodash.orderBy = orderBy, lodash.over = over, lodash.overArgs = overArgs, lodash.overEvery = overEvery, lodash.overSome = overSome, lodash.partial = partial, lodash.partialRight = partialRight, lodash.partition = partition2, lodash.pick = pick, lodash.pickBy = pickBy2, lodash.property = property, lodash.propertyOf = propertyOf, lodash.pull = pull3, lodash.pullAll = pullAll, lodash.pullAllBy = pullAllBy, lodash.pullAllWith = pullAllWith, lodash.pullAt = pullAt, lodash.range = range, lodash.rangeRight = rangeRight, lodash.rearg = rearg, lodash.reject = reject, lodash.remove = remove2, lodash.rest = rest, lodash.reverse = reverse, lodash.sampleSize = sampleSize, lodash.set = set, lodash.setWith = setWith, lodash.shuffle = shuffle, lodash.slice = slice, lodash.sortBy = sortBy, lodash.sortedUniq = sortedUniq, lodash.sortedUniqBy = sortedUniqBy, lodash.split = split, lodash.spread = spread, lodash.tail = tail, lodash.take = take, lodash.takeRight = takeRight, lodash.takeRightWhile = takeRightWhile, lodash.takeWhile = takeWhile, lodash.tap = tap, lodash.throttle = throttle, lodash.thru = thru, lodash.toArray = toArray, lodash.toPairs = toPairs, lodash.toPairsIn = toPairsIn, lodash.toPath = toPath, lodash.toPlainObject = toPlainObject, lodash.transform = transform, lodash.unary = unary, lodash.union = union2, lodash.unionBy = unionBy, lodash.unionWith = unionWith, lodash.uniq = uniq2, lodash.uniqBy = uniqBy2, lodash.uniqWith = uniqWith, lodash.unset = unset, lodash.unzip = unzip, lodash.unzipWith = unzipWith, lodash.update = update, lodash.updateWith = updateWith, lodash.values = values2, lodash.valuesIn = valuesIn, lodash.without = without, lodash.words = words, lodash.wrap = wrap, lodash.xor = xor, lodash.xorBy = xorBy, lodash.xorWith = xorWith, lodash.zip = zip2, lodash.zipObject = zipObject, lodash.zipObjectDeep = zipObjectDeep, lodash.zipWith = zipWith, lodash.entries = toPairs, lodash.entriesIn = toPairsIn, lodash.extend = assignIn, lodash.extendWith = assignInWith, mixin(lodash, lodash), lodash.add = add, lodash.attempt = attempt, lodash.camelCase = camelCase, lodash.capitalize = capitalize2, lodash.ceil = ceil, lodash.clamp = clamp, lodash.clone = clone, lodash.cloneDeep = cloneDeep2, lodash.cloneDeepWith = cloneDeepWith, lodash.cloneWith = cloneWith, lodash.conformsTo = conformsTo, lodash.deburr = deburr, lodash.defaultTo = defaultTo, lodash.divide = divide, lodash.endsWith = endsWith3, lodash.eq = eq, lodash.escape = escape, lodash.escapeRegExp = escapeRegExp2, lodash.every = every, lodash.find = find, lodash.findIndex = findIndex, lodash.findKey = findKey, lodash.findLast = findLast, lodash.findLastIndex = findLastIndex, lodash.findLastKey = findLastKey, lodash.floor = floor, lodash.forEach = forEach, lodash.forEachRight = forEachRight, lodash.forIn = forIn, lodash.forInRight = forInRight, lodash.forOwn = forOwn, lodash.forOwnRight = forOwnRight, lodash.get = get, lodash.gt = gt, lodash.gte = gte, lodash.has = has, lodash.hasIn = hasIn, lodash.head = head, lodash.identity = identity, lodash.includes = includes2, lodash.indexOf = indexOf, lodash.inRange = inRange, lodash.invoke = invoke, lodash.isArguments = isArguments, lodash.isArray = isArray, lodash.isArrayBuffer = isArrayBuffer, lodash.isArrayLike = isArrayLike, lodash.isArrayLikeObject = isArrayLikeObject, lodash.isBoolean = isBoolean2, lodash.isBuffer = isBuffer, lodash.isDate = isDate, lodash.isElement = isElement, lodash.isEmpty = isEmpty2, lodash.isEqual = isEqual, lodash.isEqualWith = isEqualWith, lodash.isError = isError2, lodash.isFinite = isFinite2, lodash.isFunction = isFunction, lodash.isInteger = isInteger, lodash.isLength = isLength, lodash.isMap = isMap, lodash.isMatch = isMatch, lodash.isMatchWith = isMatchWith, lodash.isNaN = isNaN2, lodash.isNative = isNative, lodash.isNil = isNil, lodash.isNull = isNull, lodash.isNumber = isNumber2, lodash.isObject = isObject2, lodash.isObjectLike = isObjectLike, lodash.isPlainObject = isPlainObject3, lodash.isRegExp = isRegExp, lodash.isSafeInteger = isSafeInteger, lodash.isSet = isSet, lodash.isString = isString3, lodash.isSymbol = isSymbol, lodash.isTypedArray = isTypedArray, lodash.isUndefined = isUndefined, lodash.isWeakMap = isWeakMap, lodash.isWeakSet = isWeakSet, lodash.join = join2, lodash.kebabCase = kebabCase, lodash.last = last, lodash.lastIndexOf = lastIndexOf, lodash.lowerCase = lowerCase, lodash.lowerFirst = lowerFirst, lodash.lt = lt, lodash.lte = lte, lodash.max = max, lodash.maxBy = maxBy, lodash.mean = mean, lodash.meanBy = meanBy, lodash.min = min, lodash.minBy = minBy, lodash.stubArray = stubArray, lodash.stubFalse = stubFalse, lodash.stubObject = stubObject, lodash.stubString = stubString, lodash.stubTrue = stubTrue, lodash.multiply = multiply, lodash.nth = nth, lodash.noConflict = noConflict, lodash.noop = noop, lodash.now = now, lodash.pad = pad, lodash.padEnd = padEnd, lodash.padStart = padStart, lodash.parseInt = parseInt2, lodash.random = random, lodash.reduce = reduce, lodash.reduceRight = reduceRight, lodash.repeat = repeat3, lodash.replace = replace, lodash.result = result, lodash.round = round, lodash.runInContext = runInContext2, lodash.sample = sample, lodash.size = size, lodash.snakeCase = snakeCase, lodash.some = some, lodash.sortedIndex = sortedIndex, lodash.sortedIndexBy = sortedIndexBy, lodash.sortedIndexOf = sortedIndexOf, lodash.sortedLastIndex = sortedLastIndex, lodash.sortedLastIndexBy = sortedLastIndexBy, lodash.sortedLastIndexOf = sortedLastIndexOf, lodash.startCase = startCase, lodash.startsWith = startsWith3, lodash.subtract = subtract, lodash.sum = sum, lodash.sumBy = sumBy, lodash.template = template, lodash.times = times, lodash.toFinite = toFinite, lodash.toInteger = toInteger, lodash.toLength = toLength, lodash.toLower = toLower, lodash.toNumber = toNumber, lodash.toSafeInteger = toSafeInteger, lodash.toString = toString2, lodash.toUpper = toUpper, lodash.trim = trim2, lodash.trimEnd = trimEnd, lodash.trimStart = trimStart, lodash.truncate = truncate, lodash.unescape = unescape4, lodash.uniqueId = uniqueId, lodash.upperCase = upperCase, lodash.upperFirst = upperFirst, lodash.each = forEach, lodash.eachRight = forEachRight, lodash.first = head, mixin(lodash, (function() {
|
|
34854
34854
|
var source = {};
|
|
34855
34855
|
return baseForOwn(lodash, function(func, methodName) {
|
|
34856
34856
|
hasOwnProperty.call(lodash.prototype, methodName) || (source[methodName] = func);
|
|
@@ -38643,7 +38643,7 @@ var require_utils7 = __commonJS({
|
|
|
38643
38643
|
exports.unique = unique;
|
|
38644
38644
|
exports.assertNever = assertNever;
|
|
38645
38645
|
exports.unexpected = unexpected;
|
|
38646
|
-
exports.isString =
|
|
38646
|
+
exports.isString = isString3;
|
|
38647
38647
|
exports.extname = extname2;
|
|
38648
38648
|
exports.exists = exists;
|
|
38649
38649
|
exports.acceptsLocalBlocks = acceptsLocalBlocks;
|
|
@@ -38658,7 +38658,7 @@ var require_utils7 = __commonJS({
|
|
|
38658
38658
|
}
|
|
38659
38659
|
var identity = (x) => x;
|
|
38660
38660
|
exports.identity = identity;
|
|
38661
|
-
function
|
|
38661
|
+
function isString3(x) {
|
|
38662
38662
|
return typeof x == "string";
|
|
38663
38663
|
}
|
|
38664
38664
|
function extname2(uri) {
|
|
@@ -47051,7 +47051,7 @@ ${message}`;
|
|
|
47051
47051
|
extends: [],
|
|
47052
47052
|
require: []
|
|
47053
47053
|
};
|
|
47054
|
-
yamlFile.root && (config2.root = yamlFile.root, delete yamlFile.root), yamlFile.ignore && (config2.ignore = asArray(yamlFile.ignore), delete yamlFile.ignore), yamlFile.require && (config2.require = asArray(yamlFile.require).map((pathLike) => resolvePath2(root, pathLike)).filter(
|
|
47054
|
+
yamlFile.root && (config2.root = yamlFile.root, delete yamlFile.root), yamlFile.ignore && (config2.ignore = asArray(yamlFile.ignore), delete yamlFile.ignore), yamlFile.require && (config2.require = asArray(yamlFile.require).map((pathLike) => resolvePath2(root, pathLike)).filter(isString3), delete yamlFile.require), yamlFile.extends ? (config2.extends = asArray(yamlFile.extends).map((pathLike) => resolveExtends(root, pathLike)).filter(isString3), delete yamlFile.extends) : isRootConfig && (config2.extends = [resolveExtends(root, "theme-check:recommended")]), yamlFile.context && (theme_check_common_1.Modes.includes(yamlFile.context) && (config2.context = yamlFile.context), delete yamlFile.context), yamlFile.include_categories && delete yamlFile.include_categories, yamlFile.exclude_categories && delete yamlFile.exclude_categories;
|
|
47055
47055
|
for (let [checkName, settings] of Object.entries(yamlFile)) {
|
|
47056
47056
|
if (!isPlainObject3(settings))
|
|
47057
47057
|
throw new Error(`Expected a plain object value for ${checkName} but got ${typeof settings}`);
|
|
@@ -47076,7 +47076,7 @@ ${message}`;
|
|
|
47076
47076
|
};
|
|
47077
47077
|
for (let [key, value] of Object.entries(settings))
|
|
47078
47078
|
resolvedSettings[toCamelCase(key)] = value;
|
|
47079
|
-
return settings.ignore !== void 0 && Array.isArray(settings.ignore) && settings.ignore.every(
|
|
47079
|
+
return settings.ignore !== void 0 && Array.isArray(settings.ignore) && settings.ignore.every(isString3) && (resolvedSettings.ignore = settings.ignore), settings.severity !== void 0 && (resolvedSettings.severity = resolveSeverity(settings.severity)), resolvedSettings;
|
|
47080
47080
|
}
|
|
47081
47081
|
function resolveSeverity(severity) {
|
|
47082
47082
|
if (isConvenienceSeverity(severity))
|
|
@@ -47097,7 +47097,7 @@ ${message}`;
|
|
|
47097
47097
|
function isPlainObject3(thing) {
|
|
47098
47098
|
return Object.prototype.toString.call(thing) === "[object Object]";
|
|
47099
47099
|
}
|
|
47100
|
-
function
|
|
47100
|
+
function isString3(thing) {
|
|
47101
47101
|
return typeof thing == "string";
|
|
47102
47102
|
}
|
|
47103
47103
|
function asArray(thing) {
|
|
@@ -47656,8 +47656,8 @@ var require_lib5 = __commonJS({
|
|
|
47656
47656
|
}
|
|
47657
47657
|
};
|
|
47658
47658
|
return node.kind === "OperationDefinition" ? node.selectionSet.selections.forEach((selection) => {
|
|
47659
|
-
var
|
|
47660
|
-
selection.kind === "Field" && ((
|
|
47659
|
+
var _a50;
|
|
47660
|
+
selection.kind === "Field" && ((_a50 = selection.selectionSet) == null || _a50.selections.forEach(handleSelectionNode));
|
|
47661
47661
|
}) : node.selectionSet.selections.forEach(handleSelectionNode), references;
|
|
47662
47662
|
}, generateContentsFromGraphqlString = (graphqlString, mapDocumentNode) => {
|
|
47663
47663
|
let graphqlDocument = graphql_tag.default(graphqlString), documentNodeAsString = generateDocumentNodeString(graphqlDocument, mapDocumentNode), allFragments = collectAllFragmentDefinitions(graphqlDocument), lines = graphqlDocument.definitions.reduce((accumulator, definition) => {
|
|
@@ -48531,7 +48531,7 @@ var require_ignore2 = __commonJS({
|
|
|
48531
48531
|
(prev, [matcher, replacer]) => prev.replace(matcher, replacer.bind(pattern)),
|
|
48532
48532
|
pattern
|
|
48533
48533
|
), regexCache[pattern] = source), ignoreCase ? new RegExp(source, "i") : new RegExp(source);
|
|
48534
|
-
},
|
|
48534
|
+
}, isString3 = (subject) => typeof subject == "string", checkPattern = (pattern) => pattern && isString3(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0, splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF), IgnoreRule = class {
|
|
48535
48535
|
constructor(origin, pattern, negative, regex) {
|
|
48536
48536
|
this.origin = origin, this.pattern = pattern, this.negative = negative, this.regex = regex;
|
|
48537
48537
|
}
|
|
@@ -48547,7 +48547,7 @@ var require_ignore2 = __commonJS({
|
|
|
48547
48547
|
);
|
|
48548
48548
|
}, throwError = (message, Ctor) => {
|
|
48549
48549
|
throw new Ctor(message);
|
|
48550
|
-
}, checkPath = (path, originalPath, doThrow) =>
|
|
48550
|
+
}, checkPath = (path, originalPath, doThrow) => isString3(path) ? path ? checkPath.isNotRelative(path) ? doThrow(
|
|
48551
48551
|
`path should be a \`path.relative()\`d string, but got "${originalPath}"`,
|
|
48552
48552
|
RangeError
|
|
48553
48553
|
) : !0 : doThrow("path must not be empty", TypeError) : doThrow(
|
|
@@ -48580,7 +48580,7 @@ var require_ignore2 = __commonJS({
|
|
|
48580
48580
|
// @param {Array<string> | string | Ignore} pattern
|
|
48581
48581
|
add(pattern) {
|
|
48582
48582
|
return this._added = !1, makeArray(
|
|
48583
|
-
|
|
48583
|
+
isString3(pattern) ? splitPattern(pattern) : pattern
|
|
48584
48584
|
).forEach(this._addPattern, this), this._added && this._initCache(), this;
|
|
48585
48585
|
}
|
|
48586
48586
|
// legacy
|
|
@@ -51350,7 +51350,7 @@ var require_lodash2 = __commonJS({
|
|
|
51350
51350
|
function includes2(collection, value, fromIndex, guard) {
|
|
51351
51351
|
collection = isArrayLike(collection) ? collection : values2(collection), fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0;
|
|
51352
51352
|
var length = collection.length;
|
|
51353
|
-
return fromIndex < 0 && (fromIndex = nativeMax(length + fromIndex, 0)),
|
|
51353
|
+
return fromIndex < 0 && (fromIndex = nativeMax(length + fromIndex, 0)), isString3(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
|
|
51354
51354
|
}
|
|
51355
51355
|
var invokeMap = baseRest(function(collection, path, args) {
|
|
51356
51356
|
var index = -1, isFunc = typeof path == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : [];
|
|
@@ -51401,7 +51401,7 @@ var require_lodash2 = __commonJS({
|
|
|
51401
51401
|
if (collection == null)
|
|
51402
51402
|
return 0;
|
|
51403
51403
|
if (isArrayLike(collection))
|
|
51404
|
-
return
|
|
51404
|
+
return isString3(collection) ? stringSize(collection) : collection.length;
|
|
51405
51405
|
var tag = getTag(collection);
|
|
51406
51406
|
return tag == mapTag || tag == setTag ? collection.size : baseKeys(collection).length;
|
|
51407
51407
|
}
|
|
@@ -51729,7 +51729,7 @@ var require_lodash2 = __commonJS({
|
|
|
51729
51729
|
return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
|
|
51730
51730
|
}
|
|
51731
51731
|
var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
|
|
51732
|
-
function
|
|
51732
|
+
function isString3(value) {
|
|
51733
51733
|
return typeof value == "string" || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
|
|
51734
51734
|
}
|
|
51735
51735
|
function isSymbol(value) {
|
|
@@ -51752,7 +51752,7 @@ var require_lodash2 = __commonJS({
|
|
|
51752
51752
|
if (!value)
|
|
51753
51753
|
return [];
|
|
51754
51754
|
if (isArrayLike(value))
|
|
51755
|
-
return
|
|
51755
|
+
return isString3(value) ? stringToArray(value) : copyArray(value);
|
|
51756
51756
|
if (symIterator && value[symIterator])
|
|
51757
51757
|
return iteratorToArray(value[symIterator]());
|
|
51758
51758
|
var tag = getTag(value), func = tag == mapTag ? mapToArray : tag == setTag ? setToArray : values2;
|
|
@@ -52313,7 +52313,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
52313
52313
|
function sumBy(array, iteratee2) {
|
|
52314
52314
|
return array && array.length ? baseSum(array, getIteratee(iteratee2, 2)) : 0;
|
|
52315
52315
|
}
|
|
52316
|
-
return lodash.after = after, lodash.ary = ary, lodash.assign = assign, lodash.assignIn = assignIn, lodash.assignInWith = assignInWith, lodash.assignWith = assignWith, lodash.at = at, lodash.before = before, lodash.bind = bind, lodash.bindAll = bindAll, lodash.bindKey = bindKey, lodash.castArray = castArray, lodash.chain = chain, lodash.chunk = chunk, lodash.compact = compact2, lodash.concat = concat, lodash.cond = cond, lodash.conforms = conforms, lodash.constant = constant, lodash.countBy = countBy, lodash.create = create, lodash.curry = curry, lodash.curryRight = curryRight, lodash.debounce = debounce2, lodash.defaults = defaults, lodash.defaultsDeep = defaultsDeep, lodash.defer = defer2, lodash.delay = delay, lodash.difference = difference3, lodash.differenceBy = differenceBy, lodash.differenceWith = differenceWith, lodash.drop = drop, lodash.dropRight = dropRight, lodash.dropRightWhile = dropRightWhile, lodash.dropWhile = dropWhile, lodash.fill = fill, lodash.filter = filter, lodash.flatMap = flatMap, lodash.flatMapDeep = flatMapDeep, lodash.flatMapDepth = flatMapDepth, lodash.flatten = flatten, lodash.flattenDeep = flattenDeep, lodash.flattenDepth = flattenDepth, lodash.flip = flip, lodash.flow = flow, lodash.flowRight = flowRight, lodash.fromPairs = fromPairs, lodash.functions = functions, lodash.functionsIn = functionsIn, lodash.groupBy = groupBy2, lodash.initial = initial, lodash.intersection = intersection, lodash.intersectionBy = intersectionBy, lodash.intersectionWith = intersectionWith, lodash.invert = invert, lodash.invertBy = invertBy, lodash.invokeMap = invokeMap, lodash.iteratee = iteratee, lodash.keyBy = keyBy, lodash.keys = keys, lodash.keysIn = keysIn, lodash.map = map, lodash.mapKeys = mapKeys, lodash.mapValues = mapValues, lodash.matches = matches2, lodash.matchesProperty = matchesProperty, lodash.memoize = memoize, lodash.merge = merge, lodash.mergeWith = mergeWith, lodash.method = method, lodash.methodOf = methodOf, lodash.mixin = mixin, lodash.negate = negate, lodash.nthArg = nthArg, lodash.omit = omit, lodash.omitBy = omitBy, lodash.once = once, lodash.orderBy = orderBy, lodash.over = over, lodash.overArgs = overArgs, lodash.overEvery = overEvery, lodash.overSome = overSome, lodash.partial = partial, lodash.partialRight = partialRight, lodash.partition = partition2, lodash.pick = pick, lodash.pickBy = pickBy2, lodash.property = property, lodash.propertyOf = propertyOf, lodash.pull = pull3, lodash.pullAll = pullAll, lodash.pullAllBy = pullAllBy, lodash.pullAllWith = pullAllWith, lodash.pullAt = pullAt, lodash.range = range, lodash.rangeRight = rangeRight, lodash.rearg = rearg, lodash.reject = reject, lodash.remove = remove2, lodash.rest = rest, lodash.reverse = reverse, lodash.sampleSize = sampleSize, lodash.set = set, lodash.setWith = setWith, lodash.shuffle = shuffle, lodash.slice = slice, lodash.sortBy = sortBy, lodash.sortedUniq = sortedUniq, lodash.sortedUniqBy = sortedUniqBy, lodash.split = split, lodash.spread = spread, lodash.tail = tail, lodash.take = take, lodash.takeRight = takeRight, lodash.takeRightWhile = takeRightWhile, lodash.takeWhile = takeWhile, lodash.tap = tap, lodash.throttle = throttle, lodash.thru = thru, lodash.toArray = toArray, lodash.toPairs = toPairs, lodash.toPairsIn = toPairsIn, lodash.toPath = toPath, lodash.toPlainObject = toPlainObject, lodash.transform = transform, lodash.unary = unary, lodash.union = union2, lodash.unionBy = unionBy, lodash.unionWith = unionWith, lodash.uniq = uniq2, lodash.uniqBy = uniqBy2, lodash.uniqWith = uniqWith, lodash.unset = unset, lodash.unzip = unzip, lodash.unzipWith = unzipWith, lodash.update = update, lodash.updateWith = updateWith, lodash.values = values2, lodash.valuesIn = valuesIn, lodash.without = without, lodash.words = words, lodash.wrap = wrap, lodash.xor = xor, lodash.xorBy = xorBy, lodash.xorWith = xorWith, lodash.zip = zip2, lodash.zipObject = zipObject, lodash.zipObjectDeep = zipObjectDeep, lodash.zipWith = zipWith, lodash.entries = toPairs, lodash.entriesIn = toPairsIn, lodash.extend = assignIn, lodash.extendWith = assignInWith, mixin(lodash, lodash), lodash.add = add, lodash.attempt = attempt, lodash.camelCase = camelCase, lodash.capitalize = capitalize2, lodash.ceil = ceil, lodash.clamp = clamp, lodash.clone = clone, lodash.cloneDeep = cloneDeep2, lodash.cloneDeepWith = cloneDeepWith, lodash.cloneWith = cloneWith, lodash.conformsTo = conformsTo, lodash.deburr = deburr, lodash.defaultTo = defaultTo, lodash.divide = divide, lodash.endsWith = endsWith3, lodash.eq = eq, lodash.escape = escape, lodash.escapeRegExp = escapeRegExp2, lodash.every = every, lodash.find = find, lodash.findIndex = findIndex, lodash.findKey = findKey, lodash.findLast = findLast, lodash.findLastIndex = findLastIndex, lodash.findLastKey = findLastKey, lodash.floor = floor, lodash.forEach = forEach, lodash.forEachRight = forEachRight, lodash.forIn = forIn, lodash.forInRight = forInRight, lodash.forOwn = forOwn, lodash.forOwnRight = forOwnRight, lodash.get = get, lodash.gt = gt, lodash.gte = gte, lodash.has = has, lodash.hasIn = hasIn, lodash.head = head, lodash.identity = identity, lodash.includes = includes2, lodash.indexOf = indexOf, lodash.inRange = inRange, lodash.invoke = invoke, lodash.isArguments = isArguments, lodash.isArray = isArray, lodash.isArrayBuffer = isArrayBuffer, lodash.isArrayLike = isArrayLike, lodash.isArrayLikeObject = isArrayLikeObject, lodash.isBoolean = isBoolean2, lodash.isBuffer = isBuffer, lodash.isDate = isDate, lodash.isElement = isElement, lodash.isEmpty = isEmpty2, lodash.isEqual = isEqual, lodash.isEqualWith = isEqualWith, lodash.isError = isError2, lodash.isFinite = isFinite2, lodash.isFunction = isFunction, lodash.isInteger = isInteger, lodash.isLength = isLength, lodash.isMap = isMap, lodash.isMatch = isMatch, lodash.isMatchWith = isMatchWith, lodash.isNaN = isNaN2, lodash.isNative = isNative, lodash.isNil = isNil, lodash.isNull = isNull, lodash.isNumber = isNumber2, lodash.isObject = isObject2, lodash.isObjectLike = isObjectLike, lodash.isPlainObject = isPlainObject3, lodash.isRegExp = isRegExp, lodash.isSafeInteger = isSafeInteger, lodash.isSet = isSet, lodash.isString =
|
|
52316
|
+
return lodash.after = after, lodash.ary = ary, lodash.assign = assign, lodash.assignIn = assignIn, lodash.assignInWith = assignInWith, lodash.assignWith = assignWith, lodash.at = at, lodash.before = before, lodash.bind = bind, lodash.bindAll = bindAll, lodash.bindKey = bindKey, lodash.castArray = castArray, lodash.chain = chain, lodash.chunk = chunk, lodash.compact = compact2, lodash.concat = concat, lodash.cond = cond, lodash.conforms = conforms, lodash.constant = constant, lodash.countBy = countBy, lodash.create = create, lodash.curry = curry, lodash.curryRight = curryRight, lodash.debounce = debounce2, lodash.defaults = defaults, lodash.defaultsDeep = defaultsDeep, lodash.defer = defer2, lodash.delay = delay, lodash.difference = difference3, lodash.differenceBy = differenceBy, lodash.differenceWith = differenceWith, lodash.drop = drop, lodash.dropRight = dropRight, lodash.dropRightWhile = dropRightWhile, lodash.dropWhile = dropWhile, lodash.fill = fill, lodash.filter = filter, lodash.flatMap = flatMap, lodash.flatMapDeep = flatMapDeep, lodash.flatMapDepth = flatMapDepth, lodash.flatten = flatten, lodash.flattenDeep = flattenDeep, lodash.flattenDepth = flattenDepth, lodash.flip = flip, lodash.flow = flow, lodash.flowRight = flowRight, lodash.fromPairs = fromPairs, lodash.functions = functions, lodash.functionsIn = functionsIn, lodash.groupBy = groupBy2, lodash.initial = initial, lodash.intersection = intersection, lodash.intersectionBy = intersectionBy, lodash.intersectionWith = intersectionWith, lodash.invert = invert, lodash.invertBy = invertBy, lodash.invokeMap = invokeMap, lodash.iteratee = iteratee, lodash.keyBy = keyBy, lodash.keys = keys, lodash.keysIn = keysIn, lodash.map = map, lodash.mapKeys = mapKeys, lodash.mapValues = mapValues, lodash.matches = matches2, lodash.matchesProperty = matchesProperty, lodash.memoize = memoize, lodash.merge = merge, lodash.mergeWith = mergeWith, lodash.method = method, lodash.methodOf = methodOf, lodash.mixin = mixin, lodash.negate = negate, lodash.nthArg = nthArg, lodash.omit = omit, lodash.omitBy = omitBy, lodash.once = once, lodash.orderBy = orderBy, lodash.over = over, lodash.overArgs = overArgs, lodash.overEvery = overEvery, lodash.overSome = overSome, lodash.partial = partial, lodash.partialRight = partialRight, lodash.partition = partition2, lodash.pick = pick, lodash.pickBy = pickBy2, lodash.property = property, lodash.propertyOf = propertyOf, lodash.pull = pull3, lodash.pullAll = pullAll, lodash.pullAllBy = pullAllBy, lodash.pullAllWith = pullAllWith, lodash.pullAt = pullAt, lodash.range = range, lodash.rangeRight = rangeRight, lodash.rearg = rearg, lodash.reject = reject, lodash.remove = remove2, lodash.rest = rest, lodash.reverse = reverse, lodash.sampleSize = sampleSize, lodash.set = set, lodash.setWith = setWith, lodash.shuffle = shuffle, lodash.slice = slice, lodash.sortBy = sortBy, lodash.sortedUniq = sortedUniq, lodash.sortedUniqBy = sortedUniqBy, lodash.split = split, lodash.spread = spread, lodash.tail = tail, lodash.take = take, lodash.takeRight = takeRight, lodash.takeRightWhile = takeRightWhile, lodash.takeWhile = takeWhile, lodash.tap = tap, lodash.throttle = throttle, lodash.thru = thru, lodash.toArray = toArray, lodash.toPairs = toPairs, lodash.toPairsIn = toPairsIn, lodash.toPath = toPath, lodash.toPlainObject = toPlainObject, lodash.transform = transform, lodash.unary = unary, lodash.union = union2, lodash.unionBy = unionBy, lodash.unionWith = unionWith, lodash.uniq = uniq2, lodash.uniqBy = uniqBy2, lodash.uniqWith = uniqWith, lodash.unset = unset, lodash.unzip = unzip, lodash.unzipWith = unzipWith, lodash.update = update, lodash.updateWith = updateWith, lodash.values = values2, lodash.valuesIn = valuesIn, lodash.without = without, lodash.words = words, lodash.wrap = wrap, lodash.xor = xor, lodash.xorBy = xorBy, lodash.xorWith = xorWith, lodash.zip = zip2, lodash.zipObject = zipObject, lodash.zipObjectDeep = zipObjectDeep, lodash.zipWith = zipWith, lodash.entries = toPairs, lodash.entriesIn = toPairsIn, lodash.extend = assignIn, lodash.extendWith = assignInWith, mixin(lodash, lodash), lodash.add = add, lodash.attempt = attempt, lodash.camelCase = camelCase, lodash.capitalize = capitalize2, lodash.ceil = ceil, lodash.clamp = clamp, lodash.clone = clone, lodash.cloneDeep = cloneDeep2, lodash.cloneDeepWith = cloneDeepWith, lodash.cloneWith = cloneWith, lodash.conformsTo = conformsTo, lodash.deburr = deburr, lodash.defaultTo = defaultTo, lodash.divide = divide, lodash.endsWith = endsWith3, lodash.eq = eq, lodash.escape = escape, lodash.escapeRegExp = escapeRegExp2, lodash.every = every, lodash.find = find, lodash.findIndex = findIndex, lodash.findKey = findKey, lodash.findLast = findLast, lodash.findLastIndex = findLastIndex, lodash.findLastKey = findLastKey, lodash.floor = floor, lodash.forEach = forEach, lodash.forEachRight = forEachRight, lodash.forIn = forIn, lodash.forInRight = forInRight, lodash.forOwn = forOwn, lodash.forOwnRight = forOwnRight, lodash.get = get, lodash.gt = gt, lodash.gte = gte, lodash.has = has, lodash.hasIn = hasIn, lodash.head = head, lodash.identity = identity, lodash.includes = includes2, lodash.indexOf = indexOf, lodash.inRange = inRange, lodash.invoke = invoke, lodash.isArguments = isArguments, lodash.isArray = isArray, lodash.isArrayBuffer = isArrayBuffer, lodash.isArrayLike = isArrayLike, lodash.isArrayLikeObject = isArrayLikeObject, lodash.isBoolean = isBoolean2, lodash.isBuffer = isBuffer, lodash.isDate = isDate, lodash.isElement = isElement, lodash.isEmpty = isEmpty2, lodash.isEqual = isEqual, lodash.isEqualWith = isEqualWith, lodash.isError = isError2, lodash.isFinite = isFinite2, lodash.isFunction = isFunction, lodash.isInteger = isInteger, lodash.isLength = isLength, lodash.isMap = isMap, lodash.isMatch = isMatch, lodash.isMatchWith = isMatchWith, lodash.isNaN = isNaN2, lodash.isNative = isNative, lodash.isNil = isNil, lodash.isNull = isNull, lodash.isNumber = isNumber2, lodash.isObject = isObject2, lodash.isObjectLike = isObjectLike, lodash.isPlainObject = isPlainObject3, lodash.isRegExp = isRegExp, lodash.isSafeInteger = isSafeInteger, lodash.isSet = isSet, lodash.isString = isString3, lodash.isSymbol = isSymbol, lodash.isTypedArray = isTypedArray, lodash.isUndefined = isUndefined, lodash.isWeakMap = isWeakMap, lodash.isWeakSet = isWeakSet, lodash.join = join2, lodash.kebabCase = kebabCase, lodash.last = last, lodash.lastIndexOf = lastIndexOf, lodash.lowerCase = lowerCase, lodash.lowerFirst = lowerFirst, lodash.lt = lt, lodash.lte = lte, lodash.max = max, lodash.maxBy = maxBy, lodash.mean = mean, lodash.meanBy = meanBy, lodash.min = min, lodash.minBy = minBy, lodash.stubArray = stubArray, lodash.stubFalse = stubFalse, lodash.stubObject = stubObject, lodash.stubString = stubString, lodash.stubTrue = stubTrue, lodash.multiply = multiply, lodash.nth = nth, lodash.noConflict = noConflict, lodash.noop = noop, lodash.now = now, lodash.pad = pad, lodash.padEnd = padEnd, lodash.padStart = padStart, lodash.parseInt = parseInt2, lodash.random = random, lodash.reduce = reduce, lodash.reduceRight = reduceRight, lodash.repeat = repeat3, lodash.replace = replace, lodash.result = result, lodash.round = round, lodash.runInContext = runInContext2, lodash.sample = sample, lodash.size = size, lodash.snakeCase = snakeCase, lodash.some = some, lodash.sortedIndex = sortedIndex, lodash.sortedIndexBy = sortedIndexBy, lodash.sortedIndexOf = sortedIndexOf, lodash.sortedLastIndex = sortedLastIndex, lodash.sortedLastIndexBy = sortedLastIndexBy, lodash.sortedLastIndexOf = sortedLastIndexOf, lodash.startCase = startCase, lodash.startsWith = startsWith3, lodash.subtract = subtract, lodash.sum = sum, lodash.sumBy = sumBy, lodash.template = template, lodash.times = times, lodash.toFinite = toFinite, lodash.toInteger = toInteger, lodash.toLength = toLength, lodash.toLower = toLower, lodash.toNumber = toNumber, lodash.toSafeInteger = toSafeInteger, lodash.toString = toString2, lodash.toUpper = toUpper, lodash.trim = trim2, lodash.trimEnd = trimEnd, lodash.trimStart = trimStart, lodash.truncate = truncate, lodash.unescape = unescape4, lodash.uniqueId = uniqueId, lodash.upperCase = upperCase, lodash.upperFirst = upperFirst, lodash.each = forEach, lodash.eachRight = forEachRight, lodash.first = head, mixin(lodash, (function() {
|
|
52317
52317
|
var source = {};
|
|
52318
52318
|
return baseForOwn(lodash, function(func, methodName) {
|
|
52319
52319
|
hasOwnProperty.call(lodash.prototype, methodName) || (source[methodName] = func);
|
|
@@ -55654,26 +55654,26 @@ var require_utils9 = __commonJS({
|
|
|
55654
55654
|
}
|
|
55655
55655
|
exports.generateName = generateName;
|
|
55656
55656
|
function error(...messages) {
|
|
55657
|
-
var
|
|
55657
|
+
var _a50;
|
|
55658
55658
|
if (!process.env.VERBOSE)
|
|
55659
55659
|
return console.error(messages);
|
|
55660
|
-
console.error((
|
|
55660
|
+
console.error((_a50 = getStyledTextForLogging("red")) === null || _a50 === void 0 ? void 0 : _a50("error"), ...messages);
|
|
55661
55661
|
}
|
|
55662
55662
|
exports.error = error;
|
|
55663
55663
|
function log(style, title, ...messages) {
|
|
55664
|
-
var
|
|
55664
|
+
var _a50, _b;
|
|
55665
55665
|
if (!process.env.VERBOSE)
|
|
55666
55666
|
return;
|
|
55667
55667
|
let lastMessage = null;
|
|
55668
|
-
messages.length > 1 && typeof messages[messages.length - 1] != "string" && (lastMessage = messages.splice(messages.length - 1, 1)), console.info((
|
|
55668
|
+
messages.length > 1 && typeof messages[messages.length - 1] != "string" && (lastMessage = messages.splice(messages.length - 1, 1)), console.info((_a50 = color()) === null || _a50 === void 0 ? void 0 : _a50.whiteBright.bgCyan("debug"), (_b = getStyledTextForLogging(style)) === null || _b === void 0 ? void 0 : _b(title), ...messages), lastMessage && console.dir(lastMessage, { depth: 6, maxArrayLength: 6 });
|
|
55669
55669
|
}
|
|
55670
55670
|
exports.log = log;
|
|
55671
55671
|
function getStyledTextForLogging(style) {
|
|
55672
|
-
var
|
|
55672
|
+
var _a50, _b, _c, _d, _e, _f2, _g;
|
|
55673
55673
|
if (process.env.VERBOSE)
|
|
55674
55674
|
switch (style) {
|
|
55675
55675
|
case "blue":
|
|
55676
|
-
return (
|
|
55676
|
+
return (_a50 = color()) === null || _a50 === void 0 ? void 0 : _a50.whiteBright.bgBlue;
|
|
55677
55677
|
case "cyan":
|
|
55678
55678
|
return (_b = color()) === null || _b === void 0 ? void 0 : _b.whiteBright.bgCyan;
|
|
55679
55679
|
case "green":
|
|
@@ -56080,7 +56080,7 @@ var require_applySchemaTyping = __commonJS({
|
|
|
56080
56080
|
exports.applySchemaTyping = void 0;
|
|
56081
56081
|
var JSONSchema_1 = require_JSONSchema(), typesOfSchema_1 = require_typesOfSchema();
|
|
56082
56082
|
function applySchemaTyping(schema) {
|
|
56083
|
-
var
|
|
56083
|
+
var _a50;
|
|
56084
56084
|
let types = (0, typesOfSchema_1.typesOfSchema)(schema);
|
|
56085
56085
|
if (Object.defineProperty(schema, JSONSchema_1.Types, {
|
|
56086
56086
|
enumerable: !1,
|
|
@@ -56095,7 +56095,7 @@ var require_applySchemaTyping = __commonJS({
|
|
|
56095
56095
|
description: schema.description,
|
|
56096
56096
|
name: schema.name,
|
|
56097
56097
|
title: schema.title,
|
|
56098
|
-
allOf: (
|
|
56098
|
+
allOf: (_a50 = schema.allOf) !== null && _a50 !== void 0 ? _a50 : [],
|
|
56099
56099
|
required: [],
|
|
56100
56100
|
additionalProperties: !1
|
|
56101
56101
|
};
|
|
@@ -56215,8 +56215,8 @@ var require_normalizer = __commonJS({
|
|
|
56215
56215
|
schema.const !== void 0 && (schema.enum = [schema.const], delete schema.const);
|
|
56216
56216
|
});
|
|
56217
56217
|
rules.set("Add tsEnumNames to enum types", (schema, _2, options) => {
|
|
56218
|
-
var
|
|
56219
|
-
isEnumTypeWithoutTsEnumNames(schema) && options.inferStringEnumKeysFromValues && (schema.tsEnumNames = (
|
|
56218
|
+
var _a50;
|
|
56219
|
+
isEnumTypeWithoutTsEnumNames(schema) && options.inferStringEnumKeysFromValues && (schema.tsEnumNames = (_a50 = schema.enum) === null || _a50 === void 0 ? void 0 : _a50.map(String));
|
|
56220
56220
|
});
|
|
56221
56221
|
rules.set("Pre-calculate schema types and intersections", (schema) => {
|
|
56222
56222
|
schema !== null && typeof schema == "object" && (0, applySchemaTyping_1.applySchemaTyping)(schema);
|
|
@@ -56501,8 +56501,8 @@ var require_parser4 = __commonJS({
|
|
|
56501
56501
|
}
|
|
56502
56502
|
}
|
|
56503
56503
|
function standaloneName(schema, keyNameFromDefinition, usedNames, options) {
|
|
56504
|
-
var
|
|
56505
|
-
let name = ((
|
|
56504
|
+
var _a50;
|
|
56505
|
+
let name = ((_a50 = options.customName) === null || _a50 === void 0 ? void 0 : _a50.call(options, schema, keyNameFromDefinition)) || schema.title || schema.$id || keyNameFromDefinition;
|
|
56506
56506
|
if (name)
|
|
56507
56507
|
return (0, utils_1.generateName)(name, usedNames);
|
|
56508
56508
|
}
|
|
@@ -58823,7 +58823,7 @@ var require_resolver = __commonJS({
|
|
|
58823
58823
|
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
58824
58824
|
exports.dereference = void 0;
|
|
58825
58825
|
var json_schema_ref_parser_1 = require_lib6(), utils_1 = require_utils9();
|
|
58826
|
-
function dereference(schema_1,
|
|
58826
|
+
function dereference(schema_1, _a50) {
|
|
58827
58827
|
return __awaiter(this, arguments, void 0, function* (schema, { cwd: cwd2, $refOptions }) {
|
|
58828
58828
|
(0, utils_1.log)("green", "dereferencer", "Dereferencing input schema:", cwd2, schema);
|
|
58829
58829
|
let parser = new json_schema_ref_parser_1.$RefParser(), dereferencedPaths = /* @__PURE__ */ new WeakMap(), dereferencedSchema = yield parser.dereference(cwd2, schema, Object.assign(Object.assign({}, $refOptions), { dereference: Object.assign(Object.assign({}, $refOptions.dereference), { onDereference($ref, schema2) {
|
|
@@ -62902,10 +62902,10 @@ var require_util3 = __commonJS({
|
|
|
62902
62902
|
return typeof arg == "number";
|
|
62903
62903
|
}
|
|
62904
62904
|
exports.isNumber = isNumber2;
|
|
62905
|
-
function
|
|
62905
|
+
function isString3(arg) {
|
|
62906
62906
|
return typeof arg == "string";
|
|
62907
62907
|
}
|
|
62908
|
-
exports.isString =
|
|
62908
|
+
exports.isString = isString3;
|
|
62909
62909
|
function isSymbol(arg) {
|
|
62910
62910
|
return typeof arg == "symbol";
|
|
62911
62911
|
}
|
|
@@ -70416,7 +70416,7 @@ var require_linkedMap = __commonJS({
|
|
|
70416
70416
|
"../../node_modules/.pnpm/vscode-jsonrpc@8.1.0/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(exports) {
|
|
70417
70417
|
"use strict";
|
|
70418
70418
|
init_cjs_shims();
|
|
70419
|
-
var
|
|
70419
|
+
var _a50;
|
|
70420
70420
|
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
70421
70421
|
exports.LRUCache = exports.LinkedMap = exports.Touch = void 0;
|
|
70422
70422
|
var Touch;
|
|
@@ -70425,7 +70425,7 @@ var require_linkedMap = __commonJS({
|
|
|
70425
70425
|
})(Touch = exports.Touch || (exports.Touch = {}));
|
|
70426
70426
|
var LinkedMap = class {
|
|
70427
70427
|
constructor() {
|
|
70428
|
-
this[
|
|
70428
|
+
this[_a50] = "LinkedMap", this._map = /* @__PURE__ */ new Map(), this._head = void 0, this._tail = void 0, this._size = 0, this._state = 0;
|
|
70429
70429
|
}
|
|
70430
70430
|
clear() {
|
|
70431
70431
|
this._map.clear(), this._head = void 0, this._tail = void 0, this._size = 0, this._state++;
|
|
@@ -70542,7 +70542,7 @@ var require_linkedMap = __commonJS({
|
|
|
70542
70542
|
};
|
|
70543
70543
|
return iterator;
|
|
70544
70544
|
}
|
|
70545
|
-
[(
|
|
70545
|
+
[(_a50 = Symbol.toStringTag, Symbol.iterator)]() {
|
|
70546
70546
|
return this.entries();
|
|
70547
70547
|
}
|
|
70548
70548
|
trimOld(newSize) {
|
|
@@ -73023,8 +73023,8 @@ var DocumentUri2, URI3, integer2, uinteger2, Position2, Range2, Location2, Locat
|
|
|
73023
73023
|
}
|
|
73024
73024
|
Diagnostic3.create = create;
|
|
73025
73025
|
function is(value) {
|
|
73026
|
-
var
|
|
73027
|
-
return Is2.defined(candidate) && Range2.is(candidate.range) && Is2.string(candidate.message) && (Is2.number(candidate.severity) || Is2.undefined(candidate.severity)) && (Is2.integer(candidate.code) || Is2.string(candidate.code) || Is2.undefined(candidate.code)) && (Is2.undefined(candidate.codeDescription) || Is2.string((
|
|
73026
|
+
var _a50, candidate = value;
|
|
73027
|
+
return Is2.defined(candidate) && Range2.is(candidate.range) && Is2.string(candidate.message) && (Is2.number(candidate.severity) || Is2.undefined(candidate.severity)) && (Is2.integer(candidate.code) || Is2.string(candidate.code) || Is2.undefined(candidate.code)) && (Is2.undefined(candidate.codeDescription) || Is2.string((_a50 = candidate.codeDescription) === null || _a50 === void 0 ? void 0 : _a50.href)) && (Is2.string(candidate.source) || Is2.undefined(candidate.source)) && (Is2.undefined(candidate.relatedInformation) || Is2.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation2.is));
|
|
73028
73028
|
}
|
|
73029
73029
|
Diagnostic3.is = is;
|
|
73030
73030
|
})(Diagnostic2 || (Diagnostic2 = {}));
|
|
@@ -125680,7 +125680,7 @@ var require_liquid_node = __commonJS({
|
|
|
125680
125680
|
liquidMethodMissing(key, context) {
|
|
125681
125681
|
}
|
|
125682
125682
|
}, toString$1 = Object.prototype.toString, toLowerCase = String.prototype.toLowerCase, hasOwnProperty = Object.hasOwnProperty;
|
|
125683
|
-
function
|
|
125683
|
+
function isString3(value) {
|
|
125684
125684
|
return typeof value == "string";
|
|
125685
125685
|
}
|
|
125686
125686
|
function isFunction(value) {
|
|
@@ -125702,10 +125702,10 @@ var require_liquid_node = __commonJS({
|
|
|
125702
125702
|
};
|
|
125703
125703
|
}
|
|
125704
125704
|
function stringify(value) {
|
|
125705
|
-
return value = toValue(value),
|
|
125705
|
+
return value = toValue(value), isString3(value) ? value : isNil(value) ? "" : isArray(value) ? value.map((x) => stringify(x)).join("") : String(value);
|
|
125706
125706
|
}
|
|
125707
125707
|
function toEnumerable(val) {
|
|
125708
|
-
return val = toValue(val), isArray(val) ? val :
|
|
125708
|
+
return val = toValue(val), isArray(val) ? val : isString3(val) && val.length > 0 ? [val] : isIterable(val) ? Array.from(val) : isObject2(val) ? Object.keys(val).map((key) => [key, val[key]]) : [];
|
|
125709
125709
|
}
|
|
125710
125710
|
function toArray(val) {
|
|
125711
125711
|
return val = toValue(val), isNil(val) ? [] : isArray(val) ? val : [val];
|
|
@@ -125902,7 +125902,7 @@ From ` + this.originalError.stack);
|
|
|
125902
125902
|
}
|
|
125903
125903
|
}, EmptyDrop = class _EmptyDrop extends Drop {
|
|
125904
125904
|
equals(value) {
|
|
125905
|
-
return value instanceof _EmptyDrop ? !1 : (value = toValue(value),
|
|
125905
|
+
return value instanceof _EmptyDrop ? !1 : (value = toValue(value), isString3(value) || isArray(value) ? value.length === 0 : isObject2(value) ? Object.keys(value).length === 0 : !1);
|
|
125906
125906
|
}
|
|
125907
125907
|
gt() {
|
|
125908
125908
|
return !1;
|
|
@@ -125924,7 +125924,7 @@ From ` + this.originalError.stack);
|
|
|
125924
125924
|
}
|
|
125925
125925
|
}, BlankDrop = class _BlankDrop extends EmptyDrop {
|
|
125926
125926
|
equals(value) {
|
|
125927
|
-
return value === !1 || isNil(toValue(value)) ? !0 :
|
|
125927
|
+
return value === !1 || isNil(toValue(value)) ? !0 : isString3(value) ? /^\s*$/.test(value) : super.equals(value);
|
|
125928
125928
|
}
|
|
125929
125929
|
static is(value) {
|
|
125930
125930
|
return value instanceof _BlankDrop;
|
|
@@ -126193,7 +126193,7 @@ From ` + this.originalError.stack);
|
|
|
126193
126193
|
"Saturday"
|
|
126194
126194
|
], dayNamesShort = dayNames.map((name) => name.slice(0, 3)), LiquidDate = class _LiquidDate {
|
|
126195
126195
|
constructor(init3, locale, timezone) {
|
|
126196
|
-
this.locale = locale, this.DateTimeFormat = getDateTimeFormat(), this.date = new Date(init3), this.timezoneFixed = timezone !== void 0, timezone === void 0 && (timezone = this.date.getTimezoneOffset()), this.timezoneOffset =
|
|
126196
|
+
this.locale = locale, this.DateTimeFormat = getDateTimeFormat(), this.date = new Date(init3), this.timezoneFixed = timezone !== void 0, timezone === void 0 && (timezone = this.date.getTimezoneOffset()), this.timezoneOffset = isString3(timezone) ? _LiquidDate.getTimezoneOffset(timezone, this.date) : timezone, this.timezoneName = isString3(timezone) ? timezone : "";
|
|
126197
126197
|
let diff2 = (this.date.getTimezoneOffset() - this.timezoneOffset) * OneMinute, time = this.date.getTime() + diff2;
|
|
126198
126198
|
this.displayDate = new Date(time);
|
|
126199
126199
|
}
|
|
@@ -126664,7 +126664,7 @@ From ` + this.originalError.stack);
|
|
|
126664
126664
|
sep: path.sep
|
|
126665
126665
|
});
|
|
126666
126666
|
function defaultFilter(value, defaultValue, ...args) {
|
|
126667
|
-
return value = toValue(value), isArray(value) ||
|
|
126667
|
+
return value = toValue(value), isArray(value) || isString3(value) ? value.length ? value : defaultValue : value === !1 && new Map(args).get("allow_false") ? !1 : isFalsy(value, this.context) ? defaultValue : value;
|
|
126668
126668
|
}
|
|
126669
126669
|
function json(value, space = 0) {
|
|
126670
126670
|
return JSON.stringify(value, null, space);
|
|
@@ -126831,7 +126831,7 @@ From ` + this.originalError.stack);
|
|
|
126831
126831
|
}
|
|
126832
126832
|
function normalizeDirectoryList(value) {
|
|
126833
126833
|
let list2 = [];
|
|
126834
|
-
return isArray(value) && (list2 = value),
|
|
126834
|
+
return isArray(value) && (list2 = value), isString3(value) && (list2 = [value]), list2;
|
|
126835
126835
|
}
|
|
126836
126836
|
function whiteSpaceCtrl(tokens, options) {
|
|
126837
126837
|
let inRaw = !1;
|
|
@@ -127056,7 +127056,7 @@ From ` + this.originalError.stack);
|
|
|
127056
127056
|
return;
|
|
127057
127057
|
let value;
|
|
127058
127058
|
this.skipBlank();
|
|
127059
|
-
let sep =
|
|
127059
|
+
let sep = isString3(jekyllStyle) ? jekyllStyle : jekyllStyle ? "=" : ":";
|
|
127060
127060
|
return this.peek() === sep && (++this.p, value = this.readValue()), new HashToken(this.input, begin, this.p, name, value, this.file);
|
|
127061
127061
|
}
|
|
127062
127062
|
remaining() {
|
|
@@ -127353,10 +127353,10 @@ From ` + this.originalError.stack);
|
|
|
127353
127353
|
let aliased = scope.alias(variable);
|
|
127354
127354
|
if (aliased !== void 0) {
|
|
127355
127355
|
let root = aliased.segments[0];
|
|
127356
|
-
|
|
127356
|
+
isString3(root) && !rootScope.has(root) && globals.push(aliased);
|
|
127357
127357
|
} else {
|
|
127358
127358
|
let root = variable.segments[0];
|
|
127359
|
-
|
|
127359
|
+
isString3(root) && !scope.has(root) && globals.push(variable);
|
|
127360
127360
|
}
|
|
127361
127361
|
for (let segment of variable.segments)
|
|
127362
127362
|
segment instanceof Variable2 && updateVariables(segment, scope);
|
|
@@ -127384,7 +127384,7 @@ From ` + this.originalError.stack);
|
|
|
127384
127384
|
return;
|
|
127385
127385
|
let partialScopeNames = /* @__PURE__ */ new Set(), partialScope = partial.isolated ? new DummyScope(partialScopeNames) : scope.push(partialScopeNames);
|
|
127386
127386
|
for (let name of partial.scope)
|
|
127387
|
-
if (
|
|
127387
|
+
if (isString3(name))
|
|
127388
127388
|
partialScopeNames.add(name);
|
|
127389
127389
|
else {
|
|
127390
127390
|
let [alias, argument] = name;
|
|
@@ -127442,7 +127442,7 @@ From ` + this.originalError.stack);
|
|
|
127442
127442
|
/** Return the variable that `variable` aliases, or `variable` if it doesn't alias anything. */
|
|
127443
127443
|
alias(variable) {
|
|
127444
127444
|
let root = variable.segments[0];
|
|
127445
|
-
if (!
|
|
127445
|
+
if (!isString3(root))
|
|
127446
127446
|
return;
|
|
127447
127447
|
let alias = this.getAlias(root);
|
|
127448
127448
|
if (alias !== void 0)
|
|
@@ -127492,9 +127492,9 @@ From ` + this.originalError.stack);
|
|
|
127492
127492
|
var RE_PROPERTY = /^[\u0080-\uFFFFa-zA-Z_][\u0080-\uFFFFa-zA-Z0-9_-]*$/;
|
|
127493
127493
|
function segmentsString(segments, bracketedRoot = !1) {
|
|
127494
127494
|
let buf = [], root = segments[0];
|
|
127495
|
-
|
|
127495
|
+
isString3(root) && (!bracketedRoot || root.match(RE_PROPERTY) ? buf.push(`${root}`) : buf.push(`['${root}']`));
|
|
127496
127496
|
for (let segment of segments.slice(1))
|
|
127497
|
-
segment instanceof Variable2 ? buf.push(`[${segmentsString(segment.segments)}]`) :
|
|
127497
|
+
segment instanceof Variable2 ? buf.push(`[${segmentsString(segment.segments)}]`) : isString3(segment) ? segment.match(RE_PROPERTY) ? buf.push(`.${segment}`) : buf.push(`['${segment}']`) : buf.push(`[${segment}]`);
|
|
127498
127498
|
return buf.join("");
|
|
127499
127499
|
}
|
|
127500
127500
|
(function(LookupType) {
|
|
@@ -127709,7 +127709,7 @@ From ` + this.originalError.stack);
|
|
|
127709
127709
|
return toValueSync(this._getFromScope(scope, paths));
|
|
127710
127710
|
}
|
|
127711
127711
|
*_getFromScope(scope, paths, strictVariables = this.strictVariables) {
|
|
127712
|
-
|
|
127712
|
+
isString3(paths) && (paths = paths.split("."));
|
|
127713
127713
|
for (let i = 0; i < paths.length; i++)
|
|
127714
127714
|
if (scope = yield this.readProperty(scope, paths[i]), strictVariables && isUndefined(scope))
|
|
127715
127715
|
throw new InternalUndefinedVariableError(paths.slice(0, i + 1).join("."));
|
|
@@ -127765,7 +127765,7 @@ From ` + this.originalError.stack);
|
|
|
127765
127765
|
function readSize(obj) {
|
|
127766
127766
|
if (hasOwnProperty.call(obj, "size") || obj.size !== void 0)
|
|
127767
127767
|
return obj.size;
|
|
127768
|
-
if (isArray(obj) ||
|
|
127768
|
+
if (isArray(obj) || isString3(obj))
|
|
127769
127769
|
return obj.length;
|
|
127770
127770
|
if (typeof obj == "object")
|
|
127771
127771
|
return Object.keys(obj).length;
|
|
@@ -128054,7 +128054,7 @@ From ` + this.originalError.stack);
|
|
|
128054
128054
|
function parseDate(v, opts, timezoneOffset) {
|
|
128055
128055
|
let date2, defaultTimezoneOffset = timezoneOffset ?? opts.timezoneOffset, locale = opts.locale;
|
|
128056
128056
|
if (v = toValue(v), !isNil(v))
|
|
128057
|
-
return v === "now" || v === "today" ? date2 = new LiquidDate(Date.now(), locale, defaultTimezoneOffset) : isNumber2(v) ? date2 = new LiquidDate(v * 1e3, locale, defaultTimezoneOffset) :
|
|
128057
|
+
return v === "now" || v === "today" ? date2 = new LiquidDate(Date.now(), locale, defaultTimezoneOffset) : isNumber2(v) ? date2 = new LiquidDate(v * 1e3, locale, defaultTimezoneOffset) : isString3(v) ? /^\d+$/.test(v) ? date2 = new LiquidDate(+v * 1e3, locale, defaultTimezoneOffset) : opts.preserveTimezones && timezoneOffset === void 0 ? date2 = LiquidDate.createDateFixedToTimezone(v, locale) : date2 = new LiquidDate(v, locale, defaultTimezoneOffset) : date2 = new LiquidDate(v, locale, defaultTimezoneOffset), date2.valid() ? date2 : void 0;
|
|
128058
128058
|
}
|
|
128059
128059
|
var dateFilters = /* @__PURE__ */ Object.freeze({
|
|
128060
128060
|
__proto__: null,
|
|
@@ -128467,18 +128467,18 @@ From ` + this.originalError.stack);
|
|
|
128467
128467
|
}
|
|
128468
128468
|
}
|
|
128469
128469
|
*children(partials, sync) {
|
|
128470
|
-
return partials &&
|
|
128470
|
+
return partials && isString3(this.file) ? yield this.liquid._parsePartialFile(this.file, sync, this.currentFile) : [];
|
|
128471
128471
|
}
|
|
128472
128472
|
partialScope() {
|
|
128473
|
-
if (
|
|
128473
|
+
if (isString3(this.file)) {
|
|
128474
128474
|
let names = Object.keys(this.hash.hash);
|
|
128475
128475
|
if (this.with) {
|
|
128476
128476
|
let { value, alias } = this.with;
|
|
128477
|
-
|
|
128477
|
+
isString3(alias) ? names.push([alias, value]) : isString3(this.file) && names.push([this.file, value]);
|
|
128478
128478
|
}
|
|
128479
128479
|
if (this.for) {
|
|
128480
128480
|
let { value, alias } = this.for;
|
|
128481
|
-
|
|
128481
|
+
isString3(alias) ? names.push([alias, value]) : isString3(this.file) && names.push([this.file, value]);
|
|
128482
128482
|
}
|
|
128483
128483
|
return { name: this.file, isolated: !0, scope: names };
|
|
128484
128484
|
}
|
|
@@ -128535,10 +128535,10 @@ From ` + this.originalError.stack);
|
|
|
128535
128535
|
ctx.push(ctx.opts.jekyllInclude ? createScope({ include: scope }) : scope), yield renderer.renderTemplates(templates2, ctx, emitter), ctx.pop(), ctx.restoreRegister(saved);
|
|
128536
128536
|
}
|
|
128537
128537
|
*children(partials, sync) {
|
|
128538
|
-
return partials &&
|
|
128538
|
+
return partials && isString3(this.file) ? yield this.liquid._parsePartialFile(this.file, sync, this.currentFile) : [];
|
|
128539
128539
|
}
|
|
128540
128540
|
partialScope() {
|
|
128541
|
-
if (
|
|
128541
|
+
if (isString3(this.file)) {
|
|
128542
128542
|
let names;
|
|
128543
128543
|
return this.liquid.options.jekyllInclude ? names = ["include"] : (names = Object.keys(this.hash.hash), this.withVar && names.push([this.file, this.withVar])), { name: this.file, isolated: !1, scope: names };
|
|
128544
128544
|
}
|
|
@@ -128646,7 +128646,7 @@ From ` + this.originalError.stack);
|
|
|
128646
128646
|
}
|
|
128647
128647
|
*children(partials) {
|
|
128648
128648
|
let templates2 = this.templates.slice();
|
|
128649
|
-
return partials &&
|
|
128649
|
+
return partials && isString3(this.file) && templates2.push(...yield this.liquid._parsePartialFile(this.file, !0, this.currentFile)), templates2;
|
|
128650
128650
|
}
|
|
128651
128651
|
*arguments() {
|
|
128652
128652
|
for (let v of Object.values(this.args.hash))
|
|
@@ -128654,7 +128654,7 @@ From ` + this.originalError.stack);
|
|
|
128654
128654
|
isValueToken(this.file) && (yield this.file);
|
|
128655
128655
|
}
|
|
128656
128656
|
partialScope() {
|
|
128657
|
-
if (
|
|
128657
|
+
if (isString3(this.file))
|
|
128658
128658
|
return { name: this.file, isolated: !1, scope: Object.keys(this.args.hash) };
|
|
128659
128659
|
}
|
|
128660
128660
|
}, BlockTag = class extends Tag {
|
|
@@ -128967,62 +128967,62 @@ From ` + this.originalError.stack);
|
|
|
128967
128967
|
}
|
|
128968
128968
|
/** Return an array of all variables without their properties. */
|
|
128969
128969
|
async variables(template, options = {}) {
|
|
128970
|
-
let analysis = await analyze(
|
|
128970
|
+
let analysis = await analyze(isString3(template) ? this.parse(template) : template, options);
|
|
128971
128971
|
return Object.keys(analysis.variables);
|
|
128972
128972
|
}
|
|
128973
128973
|
/** Return an array of all variables without their properties. */
|
|
128974
128974
|
variablesSync(template, options = {}) {
|
|
128975
|
-
let analysis = analyzeSync(
|
|
128975
|
+
let analysis = analyzeSync(isString3(template) ? this.parse(template) : template, options);
|
|
128976
128976
|
return Object.keys(analysis.variables);
|
|
128977
128977
|
}
|
|
128978
128978
|
/** Return an array of all variables including their properties/paths. */
|
|
128979
128979
|
async fullVariables(template, options = {}) {
|
|
128980
|
-
let analysis = await analyze(
|
|
128980
|
+
let analysis = await analyze(isString3(template) ? this.parse(template) : template, options);
|
|
128981
128981
|
return Array.from(new Set(Object.values(analysis.variables).flatMap((a2) => a2.map((v) => String(v)))));
|
|
128982
128982
|
}
|
|
128983
128983
|
/** Return an array of all variables including their properties/paths. */
|
|
128984
128984
|
fullVariablesSync(template, options = {}) {
|
|
128985
|
-
let analysis = analyzeSync(
|
|
128985
|
+
let analysis = analyzeSync(isString3(template) ? this.parse(template) : template, options);
|
|
128986
128986
|
return Array.from(new Set(Object.values(analysis.variables).flatMap((a2) => a2.map((v) => String(v)))));
|
|
128987
128987
|
}
|
|
128988
128988
|
/** Return an array of all variables, each as an array of properties/segments. */
|
|
128989
128989
|
async variableSegments(template, options = {}) {
|
|
128990
|
-
let analysis = await analyze(
|
|
128990
|
+
let analysis = await analyze(isString3(template) ? this.parse(template) : template, options);
|
|
128991
128991
|
return Array.from(strictUniq(Object.values(analysis.variables).flatMap((a2) => a2.map((v) => v.toArray()))));
|
|
128992
128992
|
}
|
|
128993
128993
|
/** Return an array of all variables, each as an array of properties/segments. */
|
|
128994
128994
|
variableSegmentsSync(template, options = {}) {
|
|
128995
|
-
let analysis = analyzeSync(
|
|
128995
|
+
let analysis = analyzeSync(isString3(template) ? this.parse(template) : template, options);
|
|
128996
128996
|
return Array.from(strictUniq(Object.values(analysis.variables).flatMap((a2) => a2.map((v) => v.toArray()))));
|
|
128997
128997
|
}
|
|
128998
128998
|
/** Return an array of all expected context variables without their properties. */
|
|
128999
128999
|
async globalVariables(template, options = {}) {
|
|
129000
|
-
let analysis = await analyze(
|
|
129000
|
+
let analysis = await analyze(isString3(template) ? this.parse(template) : template, options);
|
|
129001
129001
|
return Object.keys(analysis.globals);
|
|
129002
129002
|
}
|
|
129003
129003
|
/** Return an array of all expected context variables without their properties. */
|
|
129004
129004
|
globalVariablesSync(template, options = {}) {
|
|
129005
|
-
let analysis = analyzeSync(
|
|
129005
|
+
let analysis = analyzeSync(isString3(template) ? this.parse(template) : template, options);
|
|
129006
129006
|
return Object.keys(analysis.globals);
|
|
129007
129007
|
}
|
|
129008
129008
|
/** Return an array of all expected context variables including their properties/paths. */
|
|
129009
129009
|
async globalFullVariables(template, options = {}) {
|
|
129010
|
-
let analysis = await analyze(
|
|
129010
|
+
let analysis = await analyze(isString3(template) ? this.parse(template) : template, options);
|
|
129011
129011
|
return Array.from(new Set(Object.values(analysis.globals).flatMap((a2) => a2.map((v) => String(v)))));
|
|
129012
129012
|
}
|
|
129013
129013
|
/** Return an array of all expected context variables including their properties/paths. */
|
|
129014
129014
|
globalFullVariablesSync(template, options = {}) {
|
|
129015
|
-
let analysis = analyzeSync(
|
|
129015
|
+
let analysis = analyzeSync(isString3(template) ? this.parse(template) : template, options);
|
|
129016
129016
|
return Array.from(new Set(Object.values(analysis.globals).flatMap((a2) => a2.map((v) => String(v)))));
|
|
129017
129017
|
}
|
|
129018
129018
|
/** Return an array of all expected context variables, each as an array of properties/segments. */
|
|
129019
129019
|
async globalVariableSegments(template, options = {}) {
|
|
129020
|
-
let analysis = await analyze(
|
|
129020
|
+
let analysis = await analyze(isString3(template) ? this.parse(template) : template, options);
|
|
129021
129021
|
return Array.from(strictUniq(Object.values(analysis.globals).flatMap((a2) => a2.map((v) => v.toArray()))));
|
|
129022
129022
|
}
|
|
129023
129023
|
/** Return an array of all expected context variables, each as an array of properties/segments. */
|
|
129024
129024
|
globalVariableSegmentsSync(template, options = {}) {
|
|
129025
|
-
let analysis = analyzeSync(
|
|
129025
|
+
let analysis = analyzeSync(isString3(template) ? this.parse(template) : template, options);
|
|
129026
129026
|
return Array.from(strictUniq(Object.values(analysis.globals).flatMap((a2) => a2.map((v) => v.toArray()))));
|
|
129027
129027
|
}
|
|
129028
129028
|
}, version = "10.27.0";
|
|
@@ -129791,8 +129791,8 @@ var require_react_dom_server_legacy_node_production = __commonJS({
|
|
|
129791
129791
|
try {
|
|
129792
129792
|
var customFields = formAction.$$FORM_ACTION(resumableState);
|
|
129793
129793
|
if (customFields) {
|
|
129794
|
-
var
|
|
129795
|
-
|
|
129794
|
+
var formData = customFields.data;
|
|
129795
|
+
formData?.forEach(validateAdditionalFormField);
|
|
129796
129796
|
}
|
|
129797
129797
|
return customFields;
|
|
129798
129798
|
} catch (x) {
|
|
@@ -129803,12 +129803,12 @@ var require_react_dom_server_legacy_node_production = __commonJS({
|
|
|
129803
129803
|
return null;
|
|
129804
129804
|
}
|
|
129805
129805
|
function pushFormActionAttribute(target, resumableState, renderState, formAction, formEncType, formMethod, formTarget, name) {
|
|
129806
|
-
var
|
|
129806
|
+
var formData = null;
|
|
129807
129807
|
if (typeof formAction == "function") {
|
|
129808
129808
|
var customFields = getCustomFormFields(resumableState, formAction);
|
|
129809
|
-
customFields !== null ? (name = customFields.name, formAction = customFields.action || "", formEncType = customFields.encType, formMethod = customFields.method, formTarget = customFields.target,
|
|
129809
|
+
customFields !== null ? (name = customFields.name, formAction = customFields.action || "", formEncType = customFields.encType, formMethod = customFields.method, formTarget = customFields.target, formData = customFields.data) : (target.push(" ", "formAction", '="', actionJavaScriptURL, '"'), formTarget = formMethod = formEncType = formAction = name = null, injectFormReplayingRuntime(resumableState, renderState));
|
|
129810
129810
|
}
|
|
129811
|
-
return name != null && pushAttribute(target, "name", name), formAction != null && pushAttribute(target, "formAction", formAction), formEncType != null && pushAttribute(target, "formEncType", formEncType), formMethod != null && pushAttribute(target, "formMethod", formMethod), formTarget != null && pushAttribute(target, "formTarget", formTarget),
|
|
129811
|
+
return name != null && pushAttribute(target, "name", name), formAction != null && pushAttribute(target, "formAction", formAction), formEncType != null && pushAttribute(target, "formEncType", formEncType), formMethod != null && pushAttribute(target, "formMethod", formMethod), formTarget != null && pushAttribute(target, "formTarget", formTarget), formData;
|
|
129812
129812
|
}
|
|
129813
129813
|
function pushAttribute(target, name, value) {
|
|
129814
129814
|
switch (name) {
|
|
@@ -130303,7 +130303,7 @@ var require_react_dom_server_legacy_node_production = __commonJS({
|
|
|
130303
130303
|
);
|
|
130304
130304
|
}
|
|
130305
130305
|
}
|
|
130306
|
-
var
|
|
130306
|
+
var formData = pushFormActionAttribute(
|
|
130307
130307
|
target$jscomp$0,
|
|
130308
130308
|
resumableState,
|
|
130309
130309
|
renderState,
|
|
@@ -130313,7 +130313,7 @@ var require_react_dom_server_legacy_node_production = __commonJS({
|
|
|
130313
130313
|
formTarget,
|
|
130314
130314
|
name
|
|
130315
130315
|
);
|
|
130316
|
-
return checked2 !== null ? pushBooleanAttribute(target$jscomp$0, "checked", checked2) : defaultChecked !== null && pushBooleanAttribute(target$jscomp$0, "checked", defaultChecked), value$jscomp$1 !== null ? pushAttribute(target$jscomp$0, "value", value$jscomp$1) : defaultValue$jscomp$0 !== null && pushAttribute(target$jscomp$0, "value", defaultValue$jscomp$0), target$jscomp$0.push("/>"),
|
|
130316
|
+
return checked2 !== null ? pushBooleanAttribute(target$jscomp$0, "checked", checked2) : defaultChecked !== null && pushBooleanAttribute(target$jscomp$0, "checked", defaultChecked), value$jscomp$1 !== null ? pushAttribute(target$jscomp$0, "value", value$jscomp$1) : defaultValue$jscomp$0 !== null && pushAttribute(target$jscomp$0, "value", defaultValue$jscomp$0), target$jscomp$0.push("/>"), formData?.forEach(pushAdditionalFormField, target$jscomp$0), null;
|
|
130317
130317
|
case "button":
|
|
130318
130318
|
target$jscomp$0.push(startChunkForTag("button"));
|
|
130319
130319
|
var children$jscomp$3 = null, innerHTML$jscomp$2 = null, name$jscomp$0 = null, formAction$jscomp$0 = null, formEncType$jscomp$0 = null, formMethod$jscomp$0 = null, formTarget$jscomp$0 = null, propKey$jscomp$4;
|
|
@@ -131686,15 +131686,15 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
131686
131686
|
boundAction(payload);
|
|
131687
131687
|
}, typeof boundAction.$$FORM_ACTION == "function" && (action.$$FORM_ACTION = function(prefix2) {
|
|
131688
131688
|
prefix2 = boundAction.$$FORM_ACTION(prefix2), permalink !== void 0 && (permalink += "", prefix2.action = permalink);
|
|
131689
|
-
var
|
|
131690
|
-
return
|
|
131689
|
+
var formData = prefix2.data;
|
|
131690
|
+
return formData && (nextPostbackStateKey === null && (nextPostbackStateKey = permalink !== void 0 ? "p" + permalink : "k" + murmurhash3_32_gc(
|
|
131691
131691
|
JSON.stringify([
|
|
131692
131692
|
componentKeyPath,
|
|
131693
131693
|
null,
|
|
131694
131694
|
actionStateHookIndex
|
|
131695
131695
|
]),
|
|
131696
131696
|
0
|
|
131697
|
-
)),
|
|
131697
|
+
)), formData.append("$ACTION_KEY", nextPostbackStateKey)), prefix2;
|
|
131698
131698
|
}), [initialState, action, !1];
|
|
131699
131699
|
}
|
|
131700
131700
|
var boundAction$22 = action.bind(null, initialState);
|
|
@@ -134130,8 +134130,8 @@ var require_react_dom_server_node_production = __commonJS({
|
|
|
134130
134130
|
try {
|
|
134131
134131
|
var customFields = formAction.$$FORM_ACTION(resumableState);
|
|
134132
134132
|
if (customFields) {
|
|
134133
|
-
var
|
|
134134
|
-
|
|
134133
|
+
var formData = customFields.data;
|
|
134134
|
+
formData?.forEach(validateAdditionalFormField);
|
|
134135
134135
|
}
|
|
134136
134136
|
return customFields;
|
|
134137
134137
|
} catch (x) {
|
|
@@ -134142,10 +134142,10 @@ var require_react_dom_server_node_production = __commonJS({
|
|
|
134142
134142
|
return null;
|
|
134143
134143
|
}
|
|
134144
134144
|
function pushFormActionAttribute(target, resumableState, renderState, formAction, formEncType, formMethod, formTarget, name) {
|
|
134145
|
-
var
|
|
134145
|
+
var formData = null;
|
|
134146
134146
|
if (typeof formAction == "function") {
|
|
134147
134147
|
var customFields = getCustomFormFields(resumableState, formAction);
|
|
134148
|
-
customFields !== null ? (name = customFields.name, formAction = customFields.action || "", formEncType = customFields.encType, formMethod = customFields.method, formTarget = customFields.target,
|
|
134148
|
+
customFields !== null ? (name = customFields.name, formAction = customFields.action || "", formEncType = customFields.encType, formMethod = customFields.method, formTarget = customFields.target, formData = customFields.data) : (target.push(
|
|
134149
134149
|
attributeSeparator,
|
|
134150
134150
|
"formAction",
|
|
134151
134151
|
attributeAssign,
|
|
@@ -134153,7 +134153,7 @@ var require_react_dom_server_node_production = __commonJS({
|
|
|
134153
134153
|
attributeEnd
|
|
134154
134154
|
), formTarget = formMethod = formEncType = formAction = name = null, injectFormReplayingRuntime(resumableState, renderState));
|
|
134155
134155
|
}
|
|
134156
|
-
return name != null && pushAttribute(target, "name", name), formAction != null && pushAttribute(target, "formAction", formAction), formEncType != null && pushAttribute(target, "formEncType", formEncType), formMethod != null && pushAttribute(target, "formMethod", formMethod), formTarget != null && pushAttribute(target, "formTarget", formTarget),
|
|
134156
|
+
return name != null && pushAttribute(target, "name", name), formAction != null && pushAttribute(target, "formAction", formAction), formEncType != null && pushAttribute(target, "formEncType", formEncType), formMethod != null && pushAttribute(target, "formMethod", formMethod), formTarget != null && pushAttribute(target, "formTarget", formTarget), formData;
|
|
134157
134157
|
}
|
|
134158
134158
|
function pushAttribute(target, name, value) {
|
|
134159
134159
|
switch (name) {
|
|
@@ -134697,7 +134697,7 @@ var require_react_dom_server_node_production = __commonJS({
|
|
|
134697
134697
|
);
|
|
134698
134698
|
}
|
|
134699
134699
|
}
|
|
134700
|
-
var
|
|
134700
|
+
var formData = pushFormActionAttribute(
|
|
134701
134701
|
target$jscomp$0,
|
|
134702
134702
|
resumableState,
|
|
134703
134703
|
renderState,
|
|
@@ -134707,7 +134707,7 @@ var require_react_dom_server_node_production = __commonJS({
|
|
|
134707
134707
|
formTarget,
|
|
134708
134708
|
name
|
|
134709
134709
|
);
|
|
134710
|
-
return checked2 !== null ? pushBooleanAttribute(target$jscomp$0, "checked", checked2) : defaultChecked !== null && pushBooleanAttribute(target$jscomp$0, "checked", defaultChecked), value$jscomp$1 !== null ? pushAttribute(target$jscomp$0, "value", value$jscomp$1) : defaultValue$jscomp$0 !== null && pushAttribute(target$jscomp$0, "value", defaultValue$jscomp$0), target$jscomp$0.push(endOfStartTagSelfClosing),
|
|
134710
|
+
return checked2 !== null ? pushBooleanAttribute(target$jscomp$0, "checked", checked2) : defaultChecked !== null && pushBooleanAttribute(target$jscomp$0, "checked", defaultChecked), value$jscomp$1 !== null ? pushAttribute(target$jscomp$0, "value", value$jscomp$1) : defaultValue$jscomp$0 !== null && pushAttribute(target$jscomp$0, "value", defaultValue$jscomp$0), target$jscomp$0.push(endOfStartTagSelfClosing), formData?.forEach(pushAdditionalFormField, target$jscomp$0), null;
|
|
134711
134711
|
case "button":
|
|
134712
134712
|
target$jscomp$0.push(startChunkForTag("button"));
|
|
134713
134713
|
var children$jscomp$3 = null, innerHTML$jscomp$2 = null, name$jscomp$0 = null, formAction$jscomp$0 = null, formEncType$jscomp$0 = null, formMethod$jscomp$0 = null, formTarget$jscomp$0 = null, propKey$jscomp$4;
|
|
@@ -136050,12 +136050,12 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
136050
136050
|
boundAction(payload);
|
|
136051
136051
|
}, typeof boundAction.$$FORM_ACTION == "function" && (action.$$FORM_ACTION = function(prefix2) {
|
|
136052
136052
|
prefix2 = boundAction.$$FORM_ACTION(prefix2), permalink !== void 0 && (permalink += "", prefix2.action = permalink);
|
|
136053
|
-
var
|
|
136054
|
-
return
|
|
136053
|
+
var formData = prefix2.data;
|
|
136054
|
+
return formData && (nextPostbackStateKey === null && (nextPostbackStateKey = createPostbackActionStateKey(
|
|
136055
136055
|
permalink,
|
|
136056
136056
|
componentKeyPath,
|
|
136057
136057
|
actionStateHookIndex
|
|
136058
|
-
)),
|
|
136058
|
+
)), formData.append("$ACTION_KEY", nextPostbackStateKey)), prefix2;
|
|
136059
136059
|
}), [initialState, action, !1];
|
|
136060
136060
|
}
|
|
136061
136061
|
var boundAction$22 = action.bind(null, initialState);
|
|
@@ -139239,8 +139239,8 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
139239
139239
|
try {
|
|
139240
139240
|
var customFields = formAction.$$FORM_ACTION(resumableState);
|
|
139241
139241
|
if (customFields) {
|
|
139242
|
-
var
|
|
139243
|
-
|
|
139242
|
+
var formData = customFields.data;
|
|
139243
|
+
formData?.forEach(validateAdditionalFormField);
|
|
139244
139244
|
}
|
|
139245
139245
|
return customFields;
|
|
139246
139246
|
} catch (x) {
|
|
@@ -139256,7 +139256,7 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
139256
139256
|
return null;
|
|
139257
139257
|
}
|
|
139258
139258
|
function pushFormActionAttribute(target, resumableState, renderState, formAction, formEncType, formMethod, formTarget, name) {
|
|
139259
|
-
var
|
|
139259
|
+
var formData = null;
|
|
139260
139260
|
if (typeof formAction == "function") {
|
|
139261
139261
|
name === null || didWarnFormActionName || (didWarnFormActionName = !0, console.error(
|
|
139262
139262
|
'Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.'
|
|
@@ -139266,7 +139266,7 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
139266
139266
|
"Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."
|
|
139267
139267
|
));
|
|
139268
139268
|
var customFields = getCustomFormFields(resumableState, formAction);
|
|
139269
|
-
customFields !== null ? (name = customFields.name, formAction = customFields.action || "", formEncType = customFields.encType, formMethod = customFields.method, formTarget = customFields.target,
|
|
139269
|
+
customFields !== null ? (name = customFields.name, formAction = customFields.action || "", formEncType = customFields.encType, formMethod = customFields.method, formTarget = customFields.target, formData = customFields.data) : (target.push(
|
|
139270
139270
|
attributeSeparator,
|
|
139271
139271
|
"formAction",
|
|
139272
139272
|
attributeAssign,
|
|
@@ -139274,7 +139274,7 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
139274
139274
|
attributeEnd
|
|
139275
139275
|
), formTarget = formMethod = formEncType = formAction = name = null, injectFormReplayingRuntime(resumableState, renderState));
|
|
139276
139276
|
}
|
|
139277
|
-
return name != null && pushAttribute(target, "name", name), formAction != null && pushAttribute(target, "formAction", formAction), formEncType != null && pushAttribute(target, "formEncType", formEncType), formMethod != null && pushAttribute(target, "formMethod", formMethod), formTarget != null && pushAttribute(target, "formTarget", formTarget),
|
|
139277
|
+
return name != null && pushAttribute(target, "name", name), formAction != null && pushAttribute(target, "formAction", formAction), formEncType != null && pushAttribute(target, "formEncType", formEncType), formMethod != null && pushAttribute(target, "formMethod", formMethod), formTarget != null && pushAttribute(target, "formTarget", formTarget), formData;
|
|
139278
139278
|
}
|
|
139279
139279
|
function pushAttribute(target, name, value) {
|
|
139280
139280
|
switch (name) {
|
|
@@ -139879,7 +139879,7 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
139879
139879
|
formAction === null || props.type === "image" || props.type === "submit" || didWarnFormActionType || (didWarnFormActionType = !0, console.error(
|
|
139880
139880
|
'An input can only specify a formAction along with type="submit" or type="image".'
|
|
139881
139881
|
));
|
|
139882
|
-
var
|
|
139882
|
+
var formData = pushFormActionAttribute(
|
|
139883
139883
|
target$jscomp$0,
|
|
139884
139884
|
resumableState,
|
|
139885
139885
|
renderState,
|
|
@@ -139897,7 +139897,7 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
139897
139897
|
"%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",
|
|
139898
139898
|
"A component",
|
|
139899
139899
|
props.type
|
|
139900
|
-
), didWarnDefaultInputValue = !0), checked2 !== null ? pushBooleanAttribute(target$jscomp$0, "checked", checked2) : defaultChecked !== null && pushBooleanAttribute(target$jscomp$0, "checked", defaultChecked), value$jscomp$1 !== null ? pushAttribute(target$jscomp$0, "value", value$jscomp$1) : defaultValue$jscomp$0 !== null && pushAttribute(target$jscomp$0, "value", defaultValue$jscomp$0), target$jscomp$0.push(endOfStartTagSelfClosing),
|
|
139900
|
+
), didWarnDefaultInputValue = !0), checked2 !== null ? pushBooleanAttribute(target$jscomp$0, "checked", checked2) : defaultChecked !== null && pushBooleanAttribute(target$jscomp$0, "checked", defaultChecked), value$jscomp$1 !== null ? pushAttribute(target$jscomp$0, "value", value$jscomp$1) : defaultValue$jscomp$0 !== null && pushAttribute(target$jscomp$0, "value", defaultValue$jscomp$0), target$jscomp$0.push(endOfStartTagSelfClosing), formData?.forEach(pushAdditionalFormField, target$jscomp$0), null;
|
|
139901
139901
|
case "button":
|
|
139902
139902
|
target$jscomp$0.push(startChunkForTag("button"));
|
|
139903
139903
|
var children$jscomp$3 = null, innerHTML$jscomp$2 = null, name$jscomp$0 = null, formAction$jscomp$0 = null, formEncType$jscomp$0 = null, formMethod$jscomp$0 = null, formTarget$jscomp$0 = null, propKey$jscomp$4;
|
|
@@ -141273,15 +141273,15 @@ Incoming: %s`,
|
|
|
141273
141273
|
boundAction(payload);
|
|
141274
141274
|
}, typeof boundAction.$$FORM_ACTION == "function" && (action.$$FORM_ACTION = function(prefix2) {
|
|
141275
141275
|
prefix2 = boundAction.$$FORM_ACTION(prefix2), permalink !== void 0 && (checkAttributeStringCoercion(permalink, "target"), permalink += "", prefix2.action = permalink);
|
|
141276
|
-
var
|
|
141277
|
-
return
|
|
141276
|
+
var formData = prefix2.data;
|
|
141277
|
+
return formData && (nextPostbackStateKey === null && (nextPostbackStateKey = permalink !== void 0 ? "p" + permalink : "k" + murmurhash3_32_gc(
|
|
141278
141278
|
JSON.stringify([
|
|
141279
141279
|
componentKeyPath,
|
|
141280
141280
|
null,
|
|
141281
141281
|
actionStateHookIndex
|
|
141282
141282
|
]),
|
|
141283
141283
|
0
|
|
141284
|
-
)),
|
|
141284
|
+
)), formData.append("$ACTION_KEY", nextPostbackStateKey)), prefix2;
|
|
141285
141285
|
}), [initialState, action, !1];
|
|
141286
141286
|
}
|
|
141287
141287
|
var _boundAction = action.bind(null, initialState);
|
|
@@ -145642,8 +145642,8 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
145642
145642
|
try {
|
|
145643
145643
|
var customFields = formAction.$$FORM_ACTION(resumableState);
|
|
145644
145644
|
if (customFields) {
|
|
145645
|
-
var
|
|
145646
|
-
|
|
145645
|
+
var formData = customFields.data;
|
|
145646
|
+
formData?.forEach(validateAdditionalFormField);
|
|
145647
145647
|
}
|
|
145648
145648
|
return customFields;
|
|
145649
145649
|
} catch (x) {
|
|
@@ -145659,7 +145659,7 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
145659
145659
|
return null;
|
|
145660
145660
|
}
|
|
145661
145661
|
function pushFormActionAttribute(target, resumableState, renderState, formAction, formEncType, formMethod, formTarget, name) {
|
|
145662
|
-
var
|
|
145662
|
+
var formData = null;
|
|
145663
145663
|
if (typeof formAction == "function") {
|
|
145664
145664
|
name === null || didWarnFormActionName || (didWarnFormActionName = !0, console.error(
|
|
145665
145665
|
'Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.'
|
|
@@ -145669,7 +145669,7 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
145669
145669
|
"Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."
|
|
145670
145670
|
));
|
|
145671
145671
|
var customFields = getCustomFormFields(resumableState, formAction);
|
|
145672
|
-
customFields !== null ? (name = customFields.name, formAction = customFields.action || "", formEncType = customFields.encType, formMethod = customFields.method, formTarget = customFields.target,
|
|
145672
|
+
customFields !== null ? (name = customFields.name, formAction = customFields.action || "", formEncType = customFields.encType, formMethod = customFields.method, formTarget = customFields.target, formData = customFields.data) : (target.push(
|
|
145673
145673
|
attributeSeparator,
|
|
145674
145674
|
"formAction",
|
|
145675
145675
|
attributeAssign,
|
|
@@ -145677,7 +145677,7 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
145677
145677
|
attributeEnd
|
|
145678
145678
|
), formTarget = formMethod = formEncType = formAction = name = null, injectFormReplayingRuntime(resumableState, renderState));
|
|
145679
145679
|
}
|
|
145680
|
-
return name != null && pushAttribute(target, "name", name), formAction != null && pushAttribute(target, "formAction", formAction), formEncType != null && pushAttribute(target, "formEncType", formEncType), formMethod != null && pushAttribute(target, "formMethod", formMethod), formTarget != null && pushAttribute(target, "formTarget", formTarget),
|
|
145680
|
+
return name != null && pushAttribute(target, "name", name), formAction != null && pushAttribute(target, "formAction", formAction), formEncType != null && pushAttribute(target, "formEncType", formEncType), formMethod != null && pushAttribute(target, "formMethod", formMethod), formTarget != null && pushAttribute(target, "formTarget", formTarget), formData;
|
|
145681
145681
|
}
|
|
145682
145682
|
function pushAttribute(target, name, value) {
|
|
145683
145683
|
switch (name) {
|
|
@@ -146282,7 +146282,7 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
146282
146282
|
formAction === null || props.type === "image" || props.type === "submit" || didWarnFormActionType || (didWarnFormActionType = !0, console.error(
|
|
146283
146283
|
'An input can only specify a formAction along with type="submit" or type="image".'
|
|
146284
146284
|
));
|
|
146285
|
-
var
|
|
146285
|
+
var formData = pushFormActionAttribute(
|
|
146286
146286
|
target$jscomp$0,
|
|
146287
146287
|
resumableState,
|
|
146288
146288
|
renderState,
|
|
@@ -146300,7 +146300,7 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
146300
146300
|
"%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",
|
|
146301
146301
|
"A component",
|
|
146302
146302
|
props.type
|
|
146303
|
-
), didWarnDefaultInputValue = !0), checked2 !== null ? pushBooleanAttribute(target$jscomp$0, "checked", checked2) : defaultChecked !== null && pushBooleanAttribute(target$jscomp$0, "checked", defaultChecked), value$jscomp$1 !== null ? pushAttribute(target$jscomp$0, "value", value$jscomp$1) : defaultValue$jscomp$0 !== null && pushAttribute(target$jscomp$0, "value", defaultValue$jscomp$0), target$jscomp$0.push(endOfStartTagSelfClosing),
|
|
146303
|
+
), didWarnDefaultInputValue = !0), checked2 !== null ? pushBooleanAttribute(target$jscomp$0, "checked", checked2) : defaultChecked !== null && pushBooleanAttribute(target$jscomp$0, "checked", defaultChecked), value$jscomp$1 !== null ? pushAttribute(target$jscomp$0, "value", value$jscomp$1) : defaultValue$jscomp$0 !== null && pushAttribute(target$jscomp$0, "value", defaultValue$jscomp$0), target$jscomp$0.push(endOfStartTagSelfClosing), formData?.forEach(pushAdditionalFormField, target$jscomp$0), null;
|
|
146304
146304
|
case "button":
|
|
146305
146305
|
target$jscomp$0.push(startChunkForTag("button"));
|
|
146306
146306
|
var children$jscomp$3 = null, innerHTML$jscomp$2 = null, name$jscomp$0 = null, formAction$jscomp$0 = null, formEncType$jscomp$0 = null, formMethod$jscomp$0 = null, formTarget$jscomp$0 = null, propKey$jscomp$4;
|
|
@@ -147569,12 +147569,12 @@ Incoming: %s`,
|
|
|
147569
147569
|
boundAction(payload);
|
|
147570
147570
|
}, typeof boundAction.$$FORM_ACTION == "function" && (action.$$FORM_ACTION = function(prefix2) {
|
|
147571
147571
|
prefix2 = boundAction.$$FORM_ACTION(prefix2), permalink !== void 0 && (checkAttributeStringCoercion(permalink, "target"), permalink += "", prefix2.action = permalink);
|
|
147572
|
-
var
|
|
147573
|
-
return
|
|
147572
|
+
var formData = prefix2.data;
|
|
147573
|
+
return formData && (nextPostbackStateKey === null && (nextPostbackStateKey = createPostbackActionStateKey(
|
|
147574
147574
|
permalink,
|
|
147575
147575
|
componentKeyPath,
|
|
147576
147576
|
actionStateHookIndex
|
|
147577
|
-
)),
|
|
147577
|
+
)), formData.append("$ACTION_KEY", nextPostbackStateKey)), prefix2;
|
|
147578
147578
|
}), [initialState, action, !1];
|
|
147579
147579
|
}
|
|
147580
147580
|
var _boundAction = action.bind(null, initialState);
|
|
@@ -190143,7 +190143,7 @@ var require_Select = __commonJS({
|
|
|
190143
190143
|
className: Select_module.default.Backdrop
|
|
190144
190144
|
})));
|
|
190145
190145
|
}
|
|
190146
|
-
function
|
|
190146
|
+
function isString3(option) {
|
|
190147
190147
|
return typeof option == "string";
|
|
190148
190148
|
}
|
|
190149
190149
|
function isGroup(option) {
|
|
@@ -190156,7 +190156,7 @@ var require_Select = __commonJS({
|
|
|
190156
190156
|
};
|
|
190157
190157
|
}
|
|
190158
190158
|
function normalizeOption(option) {
|
|
190159
|
-
if (
|
|
190159
|
+
if (isString3(option))
|
|
190160
190160
|
return normalizeStringOption(option);
|
|
190161
190161
|
if (isGroup(option)) {
|
|
190162
190162
|
let {
|
|
@@ -190165,7 +190165,7 @@ var require_Select = __commonJS({
|
|
|
190165
190165
|
} = option;
|
|
190166
190166
|
return {
|
|
190167
190167
|
title,
|
|
190168
|
-
options: options.map((option2) =>
|
|
190168
|
+
options: options.map((option2) => isString3(option2) ? normalizeStringOption(option2) : option2)
|
|
190169
190169
|
};
|
|
190170
190170
|
}
|
|
190171
190171
|
return option;
|
|
@@ -192020,7 +192020,7 @@ import { pipeline } from "stream/promises";
|
|
|
192020
192020
|
import stream from "node:stream/promises";
|
|
192021
192021
|
import * as gzip from "node:zlib";
|
|
192022
192022
|
import { fileURLToPath } from "node:url";
|
|
192023
|
-
var PREFERRED_FUNCTION_RUNNER_VERSION = "9.
|
|
192023
|
+
var PREFERRED_FUNCTION_RUNNER_VERSION = "9.2.0", PREFERRED_JAVY_VERSION = "9.0.0", PREFERRED_JAVY_PLUGIN_VERSION = "4", BINARYEN_VERSION = "123.0.0", V1_TRAMPOLINE_VERSION = "1.0.2", V2_TRAMPOLINE_VERSION = "2.0.1";
|
|
192024
192024
|
function deriveJavaScriptBinaryDependencies(version) {
|
|
192025
192025
|
return version === "0" || version === "1" ? {
|
|
192026
192026
|
functionRunner: "7.0.1",
|
|
@@ -203544,10 +203544,10 @@ var PublicApiVersions2 = {
|
|
|
203544
203544
|
|
|
203545
203545
|
// ../cli-kit/dist/public/node/api/admin.js
|
|
203546
203546
|
var LatestApiVersionByFQDN = /* @__PURE__ */ new Map();
|
|
203547
|
-
async function adminRequest(query, session, variables) {
|
|
203548
|
-
let api = "Admin",
|
|
203547
|
+
async function adminRequest(query, session, variables, version) {
|
|
203548
|
+
let api = "Admin", apiVersion = version ?? await fetchLatestSupportedApiVersion(session), storeDomain = session.storeFqdn, addedHeaders = themeAccessHeaders(session);
|
|
203549
203549
|
serviceEnvironment() === "local" && (addedHeaders["x-forwarded-host"] = storeDomain, storeDomain = new DevServerCore().host("app"));
|
|
203550
|
-
let url = adminUrl(storeDomain,
|
|
203550
|
+
let url = adminUrl(storeDomain, apiVersion, session);
|
|
203551
203551
|
return graphqlRequest({ query, api, addedHeaders, url, token: session.token, variables });
|
|
203552
203552
|
}
|
|
203553
203553
|
async function adminRequestDoc(options) {
|
|
@@ -204379,7 +204379,7 @@ async function link(options, shouldRenderSuccess = !0) {
|
|
|
204379
204379
|
developerPlatformClient,
|
|
204380
204380
|
app: remoteApp
|
|
204381
204381
|
}), flags = remoteApp.flags, localAppOptions = await loadLocalAppOptions(options, specifications, flags, remoteApp.apiKey), configFileName = await loadConfigurationFileName(remoteApp, options, {
|
|
204382
|
-
appDirectory: localAppOptions.appDirectory
|
|
204382
|
+
appDirectory: localAppOptions.appDirectory ?? appDirectory
|
|
204383
204383
|
});
|
|
204384
204384
|
await logMetadataForLoadedContext(remoteApp, developerPlatformClient.organizationSource);
|
|
204385
204385
|
let mergedAppConfiguration = await overwriteLocalConfigFileWithRemoteAppConfiguration({
|
|
@@ -204496,8 +204496,8 @@ async function loadConfigurationFileName(remoteApp, options, localAppInfo) {
|
|
|
204496
204496
|
let cache = getCachedCommandInfo();
|
|
204497
204497
|
if (cache?.selectedToml)
|
|
204498
204498
|
return cache.selectedToml;
|
|
204499
|
-
let existingTomls = await getTomls(
|
|
204500
|
-
return currentToml || (isEmpty(existingTomls) ? "shopify.app.toml" : selectConfigName(
|
|
204499
|
+
let configDirectory = localAppInfo.appDirectory ?? options.directory, existingTomls = await getTomls(configDirectory), currentToml = existingTomls[remoteApp.apiKey];
|
|
204500
|
+
return currentToml || (isEmpty(existingTomls) ? "shopify.app.toml" : selectConfigName(configDirectory, remoteApp.title));
|
|
204501
204501
|
}
|
|
204502
204502
|
async function overwriteLocalConfigFileWithRemoteAppConfiguration(options) {
|
|
204503
204503
|
let { remoteApp, developerPlatformClient, specifications, flags, configFileName, appDirectory, localAppOptions } = options, configFilePath = joinPath(appDirectory, configFileName), remoteAppConfiguration = await fetchAppRemoteConfiguration(remoteApp, developerPlatformClient, specifications, flags);
|
|
@@ -204736,16 +204736,16 @@ var import_core2 = __toESM(require_lib()), BaseCommand = class extends import_co
|
|
|
204736
204736
|
}
|
|
204737
204737
|
async catch(error) {
|
|
204738
204738
|
error.skipOclifErrorHandling = !0;
|
|
204739
|
-
let { errorHandler } = await import("./error-handler-
|
|
204739
|
+
let { errorHandler } = await import("./error-handler-5PE7ZVHN.js");
|
|
204740
204740
|
return await errorHandler(error, this.config), import_core2.Errors.handle(error);
|
|
204741
204741
|
}
|
|
204742
204742
|
async init() {
|
|
204743
204743
|
if (this.exitWithTimestampWhenEnvVariablePresent(), setCurrentCommandId(this.id ?? ""), !isDevelopment()) {
|
|
204744
|
-
let { registerCleanBugsnagErrorsFromWithinPlugins } = await import("./error-handler-
|
|
204744
|
+
let { registerCleanBugsnagErrorsFromWithinPlugins } = await import("./error-handler-5PE7ZVHN.js");
|
|
204745
204745
|
await registerCleanBugsnagErrorsFromWithinPlugins(this.config);
|
|
204746
204746
|
}
|
|
204747
204747
|
await removeDuplicatedPlugins(this.config), this.showNpmFlagWarning();
|
|
204748
|
-
let { showNotificationsIfNeeded: showNotificationsIfNeeded2 } = await import("./notifications-system-
|
|
204748
|
+
let { showNotificationsIfNeeded: showNotificationsIfNeeded2 } = await import("./notifications-system-OQOH54WS.js");
|
|
204749
204749
|
return await showNotificationsIfNeeded2(), super.init();
|
|
204750
204750
|
}
|
|
204751
204751
|
// NPM creates an environment variable for every flag passed to a script.
|
|
@@ -204753,7 +204753,7 @@ var import_core2 = __toESM(require_lib()), BaseCommand = class extends import_co
|
|
|
204753
204753
|
// and warns the user to use the `--` separator.
|
|
204754
204754
|
showNpmFlagWarning() {
|
|
204755
204755
|
let commandVariables = this.constructor;
|
|
204756
|
-
Object.keys(commandVariables.flags || {}).map((key) => `npm_config_${underscore(key).replace(/^no_/, "")}`).some((flag) => process.env[flag] !== void 0) && import("./ui-
|
|
204756
|
+
Object.keys(commandVariables.flags || {}).map((key) => `npm_config_${underscore(key).replace(/^no_/, "")}`).some((flag) => process.env[flag] !== void 0) && import("./ui-6HWKB4U5.js").then(({ renderWarning: renderWarning2 }) => {
|
|
204757
204757
|
renderWarning2({
|
|
204758
204758
|
body: [
|
|
204759
204759
|
"NPM scripts require an extra",
|
|
@@ -204791,7 +204791,7 @@ This flag is required in non-interactive terminal environments, such as a CI env
|
|
|
204791
204791
|
let flags = originalResult.flags, environmentsFileName = this.environmentsFilename();
|
|
204792
204792
|
if (!environmentsFileName)
|
|
204793
204793
|
return originalResult;
|
|
204794
|
-
let { environmentFilePath } = await import("./environments-
|
|
204794
|
+
let { environmentFilePath } = await import("./environments-QH3M37S5.js"), environmentFileExists = await environmentFilePath(environmentsFileName, { from: flags.path }), environments = [];
|
|
204795
204795
|
flags.environment && (environments = Array.isArray(flags.environment) ? flags.environment : [flags.environment]);
|
|
204796
204796
|
let environmentSpecified = environments.length > 0;
|
|
204797
204797
|
if (!environmentFileExists && !environmentSpecified || environmentSpecified && environments.length > 1)
|
|
@@ -204812,7 +204812,7 @@ This flag is required in non-interactive terminal environments, such as a CI env
|
|
|
204812
204812
|
* is specified it will try to load a default environment.
|
|
204813
204813
|
*/
|
|
204814
204814
|
async loadEnvironmentForCommand(path, environmentsFileName, specifiedEnvironment) {
|
|
204815
|
-
let { loadEnvironment: loadEnvironment2 } = await import("./environments-
|
|
204815
|
+
let { loadEnvironment: loadEnvironment2 } = await import("./environments-QH3M37S5.js");
|
|
204816
204816
|
return specifiedEnvironment ? { environment: await loadEnvironment2(specifiedEnvironment, environmentsFileName, { from: path }), isDefaultEnvironment: !1 } : { environment: await loadEnvironment2("default", environmentsFileName, { from: path, silent: !0 }), isDefaultEnvironment: !0 };
|
|
204817
204817
|
}
|
|
204818
204818
|
};
|
|
@@ -204836,7 +204836,7 @@ function reportEnvironmentApplication(noDefaultsFlags, flagsWithEnvironments, en
|
|
|
204836
204836
|
if (Object.keys(changes).length === 0)
|
|
204837
204837
|
return;
|
|
204838
204838
|
let items = Object.entries(changes).map(([name, value]) => `${name}: ${value}`);
|
|
204839
|
-
import("./ui-
|
|
204839
|
+
import("./ui-6HWKB4U5.js").then(({ renderInfo: renderInfo2 }) => {
|
|
204840
204840
|
renderInfo2({
|
|
204841
204841
|
headline: ["Using applicable flags from", { userInput: environmentName }, "environment:"],
|
|
204842
204842
|
body: [{ list: { items } }]
|
|
@@ -204873,7 +204873,7 @@ async function removeDuplicatedPlugins(config2) {
|
|
|
204873
204873
|
let plugins = Array.from(config2.plugins.values()), bundlePlugins = ["@shopify/app", "@shopify/plugin-cloudflare"], pluginsToRemove = plugins.filter((plugin) => bundlePlugins.includes(plugin.name));
|
|
204874
204874
|
if (pluginsToRemove.length > 0) {
|
|
204875
204875
|
let commandsToRun = pluginsToRemove.map((plugin) => ` - shopify plugins remove ${plugin.name}`).join(`
|
|
204876
|
-
`), { renderWarning: renderWarning2 } = await import("./ui-
|
|
204876
|
+
`), { renderWarning: renderWarning2 } = await import("./ui-6HWKB4U5.js");
|
|
204877
204877
|
renderWarning2({
|
|
204878
204878
|
headline: `Unsupported plugins detected: ${pluginsToRemove.map((plugin) => plugin.name).join(", ")}`,
|
|
204879
204879
|
body: [
|
|
@@ -204909,13 +204909,13 @@ init_cjs_shims();
|
|
|
204909
204909
|
init_cjs_shims();
|
|
204910
204910
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
204911
204911
|
async function launchCLI(options) {
|
|
204912
|
-
let { isDevelopment: isDevelopment2 } = await import("./local-
|
|
204912
|
+
let { isDevelopment: isDevelopment2 } = await import("./local-ZYOWEOLU.js"), { ShopifyConfig } = await import("./custom-oclif-loader-7BTLNXYR.js"), oclifModule = await import("./lib-NKDE2QNY.js"), { run, flush, Errors: Errors2, settings } = oclifModule.default ?? oclifModule;
|
|
204913
204913
|
isDevelopment2() && (settings.debug = !0);
|
|
204914
204914
|
try {
|
|
204915
204915
|
let config2 = new ShopifyConfig({ root: fileURLToPath2(options.moduleURL) });
|
|
204916
204916
|
await config2.load(), options.lazyCommandLoader && config2.setLazyCommandLoader(options.lazyCommandLoader), await run(options.argv, config2), await flush();
|
|
204917
204917
|
} catch (error) {
|
|
204918
|
-
let { errorHandler } = await import("./error-handler-
|
|
204918
|
+
let { errorHandler } = await import("./error-handler-5PE7ZVHN.js");
|
|
204919
204919
|
return await errorHandler(error), Errors2.handle(error);
|
|
204920
204920
|
}
|
|
204921
204921
|
}
|
|
@@ -204925,7 +204925,7 @@ var import_core3 = __toESM(require_lib());
|
|
|
204925
204925
|
async function exitIfOldNodeVersion(versions2 = process.versions) {
|
|
204926
204926
|
let nodeVersion = versions2.node, nodeMajorVersion = Number(nodeVersion.split(".")[0]);
|
|
204927
204927
|
if (nodeMajorVersion < 18) {
|
|
204928
|
-
let { renderError: renderError2 } = await import("./ui-
|
|
204928
|
+
let { renderError: renderError2 } = await import("./ui-6HWKB4U5.js");
|
|
204929
204929
|
renderError2({
|
|
204930
204930
|
headline: "Upgrade to a supported Node version now.",
|
|
204931
204931
|
body: [
|
|
@@ -204952,7 +204952,7 @@ async function runCLI(options, launchCLI2 = launchCLI, argv = process.argv, env
|
|
|
204952
204952
|
return setupEnvironmentVariables(options, argv, env), options.runInCreateMode && await addInitToArgvWhenRunningCreateCLI(options, argv), forceNoColor(argv, env), await exitIfOldNodeVersion(versions2), launchCLI2({ moduleURL: options.moduleURL, lazyCommandLoader: options.lazyCommandLoader });
|
|
204953
204953
|
}
|
|
204954
204954
|
async function addInitToArgvWhenRunningCreateCLI(options, argv = process.argv) {
|
|
204955
|
-
let { findUpAndReadPackageJson: findUpAndReadPackageJson2 } = await import("./node-package-manager-
|
|
204955
|
+
let { findUpAndReadPackageJson: findUpAndReadPackageJson2 } = await import("./node-package-manager-UMBL54DA.js"), { moduleDirectory: moduleDirectory2 } = await import("./path-2WA5R6GG.js"), name = (await findUpAndReadPackageJson2(moduleDirectory2(options.moduleURL))).content.name.replace("@shopify/create-", "");
|
|
204956
204956
|
if (argv.findIndex((arg) => arg.includes("init")) === -1) {
|
|
204957
204957
|
let initIndex2 = argv.findIndex((arg) => arg.match(new RegExp(`bin(\\/|\\\\)+(create-${name}|dev|run)`))) + 1;
|
|
204958
204958
|
argv.splice(initIndex2, 0, "init");
|
|
@@ -205120,14 +205120,21 @@ async function logMetadata2(selectedStore, resetUsed) {
|
|
|
205120
205120
|
}));
|
|
205121
205121
|
}
|
|
205122
205122
|
|
|
205123
|
-
// ../
|
|
205123
|
+
// ../cli-kit/dist/public/node/api/bulk-operations.js
|
|
205124
|
+
init_cjs_shims();
|
|
205125
|
+
|
|
205126
|
+
// ../cli-kit/dist/public/node/api/bulk-operations/constants.js
|
|
205127
|
+
init_cjs_shims();
|
|
205128
|
+
var BULK_OPERATIONS_MIN_API_VERSION = "2026-01";
|
|
205129
|
+
|
|
205130
|
+
// ../cli-kit/dist/public/node/api/bulk-operations/helpers.js
|
|
205124
205131
|
init_cjs_shims();
|
|
205125
205132
|
var import_graphql6 = __toESM(require_graphql(), 1);
|
|
205126
|
-
|
|
205127
|
-
|
|
205128
|
-
|
|
205129
|
-
|
|
205130
|
-
return
|
|
205133
|
+
function normalizeBulkOperationId(id) {
|
|
205134
|
+
return id.startsWith("gid://") ? id : /^\d+$/.test(id) ? `gid://shopify/BulkOperation/${id}` : id;
|
|
205135
|
+
}
|
|
205136
|
+
function extractBulkOperationId(gid) {
|
|
205137
|
+
return gid.match(/^gid:\/\/shopify\/BulkOperation\/(\d+)$/)?.[1] ?? gid;
|
|
205131
205138
|
}
|
|
205132
205139
|
function validateSingleOperation(graphqlOperation) {
|
|
205133
205140
|
let document2;
|
|
@@ -205139,6 +205146,15 @@ function validateSingleOperation(graphqlOperation) {
|
|
|
205139
205146
|
if (document2.definitions.filter((def) => def.kind === "OperationDefinition").length !== 1)
|
|
205140
205147
|
throw new AbortError("GraphQL document must contain exactly one operation definition. Multiple operations are not supported.");
|
|
205141
205148
|
}
|
|
205149
|
+
function isMutation(graphqlOperation) {
|
|
205150
|
+
let document2;
|
|
205151
|
+
try {
|
|
205152
|
+
document2 = (0, import_graphql6.parse)(graphqlOperation);
|
|
205153
|
+
} catch (error) {
|
|
205154
|
+
throw error instanceof Error ? new AbortError(`Invalid GraphQL syntax: ${error.message}`) : error;
|
|
205155
|
+
}
|
|
205156
|
+
return document2.definitions.find((def) => def.kind === "OperationDefinition")?.operation === "mutation";
|
|
205157
|
+
}
|
|
205142
205158
|
async function resolveApiVersion(options) {
|
|
205143
205159
|
let { adminSession, userSpecifiedVersion, minimumDefaultVersion } = options;
|
|
205144
205160
|
if (userSpecifiedVersion === "unstable")
|
|
@@ -205146,7 +205162,11 @@ async function resolveApiVersion(options) {
|
|
|
205146
205162
|
let availableVersions = await fetchApiVersions(adminSession);
|
|
205147
205163
|
if (!userSpecifiedVersion) {
|
|
205148
205164
|
let supportedVersions = availableVersions.filter((version) => version.supported).map((version) => version.handle);
|
|
205149
|
-
|
|
205165
|
+
minimumDefaultVersion && supportedVersions.push(minimumDefaultVersion);
|
|
205166
|
+
let latest = supportedVersions.sort().reverse()[0];
|
|
205167
|
+
if (!latest)
|
|
205168
|
+
throw new AbortError("No supported API versions available for this store.");
|
|
205169
|
+
return latest;
|
|
205150
205170
|
}
|
|
205151
205171
|
let versionList2 = availableVersions.map((version) => version.handle);
|
|
205152
205172
|
if (versionList2.includes(userSpecifiedVersion))
|
|
@@ -205154,67 +205174,384 @@ async function resolveApiVersion(options) {
|
|
|
205154
205174
|
let firstLine = outputContent`Invalid API version: ${userSpecifiedVersion}`.value, secondLine = outputContent`Allowed versions: ${versionList2.join(", ")}`.value;
|
|
205155
205175
|
throw new AbortError(firstLine, secondLine);
|
|
205156
205176
|
}
|
|
205157
|
-
function formatOperationInfo(options) {
|
|
205158
|
-
let { organization, remoteApp, storeFqdn, version } = options, items = [`Organization: ${organization.businessName}`, `App: ${remoteApp.title}`, `Store: ${storeFqdn}`];
|
|
205159
|
-
return version && items.push(`API version: ${version}`), items;
|
|
205160
|
-
}
|
|
205161
|
-
function isMutation(graphqlOperation) {
|
|
205162
|
-
return (0, import_graphql6.parse)(graphqlOperation).definitions.find((def) => def.kind === "OperationDefinition")?.operation === "mutation";
|
|
205163
|
-
}
|
|
205164
|
-
function validateMutationStore(graphqlOperation, store) {
|
|
205165
|
-
if (isMutation(graphqlOperation) && store.storeType !== "APP_DEVELOPMENT")
|
|
205166
|
-
throw new AbortError("Mutations can only be executed on dev stores.");
|
|
205167
|
-
}
|
|
205168
205177
|
|
|
205169
|
-
// ../
|
|
205170
|
-
|
|
205171
|
-
|
|
205172
|
-
directory: flags.path,
|
|
205173
|
-
clientId: flags["client-id"],
|
|
205174
|
-
forceRelink: flags.reset,
|
|
205175
|
-
userProvidedConfigName: flags.config
|
|
205176
|
-
}), store = await storeContext({
|
|
205177
|
-
appContextResult,
|
|
205178
|
-
storeFqdn: flags.store,
|
|
205179
|
-
forceReselectStore: flags.reset,
|
|
205180
|
-
storeTypes: ["APP_DEVELOPMENT", "DEVELOPMENT", "DEVELOPMENT_SUPERSET", "PRODUCTION"]
|
|
205181
|
-
});
|
|
205182
|
-
return { appContextResult, store };
|
|
205183
|
-
}
|
|
205184
|
-
async function prepareExecuteContext(flags) {
|
|
205178
|
+
// ../cli-kit/dist/public/node/api/bulk-operations/query.js
|
|
205179
|
+
init_cjs_shims();
|
|
205180
|
+
async function resolveBulkOperationQuery(input) {
|
|
205185
205181
|
let query;
|
|
205186
|
-
if (
|
|
205187
|
-
if (!
|
|
205182
|
+
if (input.query !== void 0) {
|
|
205183
|
+
if (!input.query.trim())
|
|
205188
205184
|
throw new AbortError("The --query flag value is empty. Please provide a valid GraphQL query or mutation.");
|
|
205189
|
-
query =
|
|
205190
|
-
} else if (
|
|
205191
|
-
|
|
205192
|
-
|
|
205193
|
-
|
|
205194
|
-
if (
|
|
205195
|
-
throw new AbortError(outputContent`Query file at ${outputToken.path(queryFile)} is empty. Please provide a valid GraphQL query or mutation.`);
|
|
205196
|
-
|
|
205197
|
-
|
|
205185
|
+
query = input.query;
|
|
205186
|
+
} else if (input.queryFile) {
|
|
205187
|
+
if (!await fileExists(input.queryFile))
|
|
205188
|
+
throw new AbortError(outputContent`Query file not found at ${outputToken.path(input.queryFile)}. Please check the path and try again.`);
|
|
205189
|
+
let fileContents = await readFile(input.queryFile, { encoding: "utf8" });
|
|
205190
|
+
if (!fileContents.trim())
|
|
205191
|
+
throw new AbortError(outputContent`Query file at ${outputToken.path(input.queryFile)} is empty. Please provide a valid GraphQL query or mutation.`);
|
|
205192
|
+
query = fileContents;
|
|
205193
|
+
} else
|
|
205198
205194
|
throw new BugError("Query should have been provided via --query or --query-file flags due to exactlyOne constraint. This indicates the oclif flag validation failed.");
|
|
205199
|
-
validateSingleOperation(query);
|
|
205200
|
-
let { appContextResult, store } = await prepareAppStoreContext(flags);
|
|
205201
|
-
return { query, appContextResult, store };
|
|
205195
|
+
return validateSingleOperation(query), query;
|
|
205202
205196
|
}
|
|
205203
205197
|
|
|
205204
|
-
// ../
|
|
205198
|
+
// ../cli-kit/dist/public/node/api/bulk-operations/run-query.js
|
|
205199
|
+
init_cjs_shims();
|
|
205200
|
+
|
|
205201
|
+
// ../cli-kit/dist/cli/api/graphql/bulk-operations/generated/bulk-operation-run-query.js
|
|
205205
205202
|
init_cjs_shims();
|
|
205203
|
+
var BulkOperationRunQuery = {
|
|
205204
|
+
kind: "Document",
|
|
205205
|
+
definitions: [
|
|
205206
|
+
{
|
|
205207
|
+
kind: "OperationDefinition",
|
|
205208
|
+
operation: "mutation",
|
|
205209
|
+
name: { kind: "Name", value: "BulkOperationRunQuery" },
|
|
205210
|
+
variableDefinitions: [
|
|
205211
|
+
{
|
|
205212
|
+
kind: "VariableDefinition",
|
|
205213
|
+
variable: { kind: "Variable", name: { kind: "Name", value: "query" } },
|
|
205214
|
+
type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }
|
|
205215
|
+
}
|
|
205216
|
+
],
|
|
205217
|
+
selectionSet: {
|
|
205218
|
+
kind: "SelectionSet",
|
|
205219
|
+
selections: [
|
|
205220
|
+
{
|
|
205221
|
+
kind: "Field",
|
|
205222
|
+
name: { kind: "Name", value: "bulkOperationRunQuery" },
|
|
205223
|
+
arguments: [
|
|
205224
|
+
{
|
|
205225
|
+
kind: "Argument",
|
|
205226
|
+
name: { kind: "Name", value: "query" },
|
|
205227
|
+
value: { kind: "Variable", name: { kind: "Name", value: "query" } }
|
|
205228
|
+
}
|
|
205229
|
+
],
|
|
205230
|
+
selectionSet: {
|
|
205231
|
+
kind: "SelectionSet",
|
|
205232
|
+
selections: [
|
|
205233
|
+
{
|
|
205234
|
+
kind: "Field",
|
|
205235
|
+
name: { kind: "Name", value: "bulkOperation" },
|
|
205236
|
+
selectionSet: {
|
|
205237
|
+
kind: "SelectionSet",
|
|
205238
|
+
selections: [
|
|
205239
|
+
{ kind: "Field", name: { kind: "Name", value: "type" } },
|
|
205240
|
+
{ kind: "Field", name: { kind: "Name", value: "completedAt" } },
|
|
205241
|
+
{ kind: "Field", name: { kind: "Name", value: "createdAt" } },
|
|
205242
|
+
{ kind: "Field", name: { kind: "Name", value: "errorCode" } },
|
|
205243
|
+
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
|
205244
|
+
{ kind: "Field", name: { kind: "Name", value: "objectCount" } },
|
|
205245
|
+
{ kind: "Field", name: { kind: "Name", value: "partialDataUrl" } },
|
|
205246
|
+
{ kind: "Field", name: { kind: "Name", value: "status" } },
|
|
205247
|
+
{ kind: "Field", name: { kind: "Name", value: "url" } },
|
|
205248
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
205249
|
+
]
|
|
205250
|
+
}
|
|
205251
|
+
},
|
|
205252
|
+
{
|
|
205253
|
+
kind: "Field",
|
|
205254
|
+
name: { kind: "Name", value: "userErrors" },
|
|
205255
|
+
selectionSet: {
|
|
205256
|
+
kind: "SelectionSet",
|
|
205257
|
+
selections: [
|
|
205258
|
+
{ kind: "Field", name: { kind: "Name", value: "code" } },
|
|
205259
|
+
{ kind: "Field", name: { kind: "Name", value: "field" } },
|
|
205260
|
+
{ kind: "Field", name: { kind: "Name", value: "message" } },
|
|
205261
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
205262
|
+
]
|
|
205263
|
+
}
|
|
205264
|
+
},
|
|
205265
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
205266
|
+
]
|
|
205267
|
+
}
|
|
205268
|
+
}
|
|
205269
|
+
]
|
|
205270
|
+
}
|
|
205271
|
+
}
|
|
205272
|
+
]
|
|
205273
|
+
};
|
|
205274
|
+
|
|
205275
|
+
// ../cli-kit/dist/public/node/api/bulk-operations/run-query.js
|
|
205276
|
+
async function runBulkOperationQuery(options) {
|
|
205277
|
+
let { adminSession, query, version } = options;
|
|
205278
|
+
return (await adminRequestDoc({
|
|
205279
|
+
query: BulkOperationRunQuery,
|
|
205280
|
+
session: adminSession,
|
|
205281
|
+
variables: { query },
|
|
205282
|
+
...version && { version }
|
|
205283
|
+
})).bulkOperationRunQuery;
|
|
205284
|
+
}
|
|
205206
205285
|
|
|
205207
|
-
// ../
|
|
205286
|
+
// ../cli-kit/dist/public/node/api/bulk-operations/run-mutation.js
|
|
205208
205287
|
init_cjs_shims();
|
|
205209
205288
|
|
|
205210
|
-
// ../
|
|
205289
|
+
// ../cli-kit/dist/public/node/api/bulk-operations/stage-file.js
|
|
205211
205290
|
init_cjs_shims();
|
|
205212
205291
|
|
|
205213
|
-
// ../
|
|
205292
|
+
// ../cli-kit/dist/cli/api/graphql/bulk-operations/generated/staged-uploads-create.js
|
|
205293
|
+
init_cjs_shims();
|
|
205294
|
+
var StagedUploadsCreate = {
|
|
205295
|
+
kind: "Document",
|
|
205296
|
+
definitions: [
|
|
205297
|
+
{
|
|
205298
|
+
kind: "OperationDefinition",
|
|
205299
|
+
operation: "mutation",
|
|
205300
|
+
name: { kind: "Name", value: "StagedUploadsCreate" },
|
|
205301
|
+
variableDefinitions: [
|
|
205302
|
+
{
|
|
205303
|
+
kind: "VariableDefinition",
|
|
205304
|
+
variable: { kind: "Variable", name: { kind: "Name", value: "input" } },
|
|
205305
|
+
type: {
|
|
205306
|
+
kind: "NonNullType",
|
|
205307
|
+
type: {
|
|
205308
|
+
kind: "ListType",
|
|
205309
|
+
type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "StagedUploadInput" } } }
|
|
205310
|
+
}
|
|
205311
|
+
}
|
|
205312
|
+
}
|
|
205313
|
+
],
|
|
205314
|
+
selectionSet: {
|
|
205315
|
+
kind: "SelectionSet",
|
|
205316
|
+
selections: [
|
|
205317
|
+
{
|
|
205318
|
+
kind: "Field",
|
|
205319
|
+
name: { kind: "Name", value: "stagedUploadsCreate" },
|
|
205320
|
+
arguments: [
|
|
205321
|
+
{
|
|
205322
|
+
kind: "Argument",
|
|
205323
|
+
name: { kind: "Name", value: "input" },
|
|
205324
|
+
value: { kind: "Variable", name: { kind: "Name", value: "input" } }
|
|
205325
|
+
}
|
|
205326
|
+
],
|
|
205327
|
+
selectionSet: {
|
|
205328
|
+
kind: "SelectionSet",
|
|
205329
|
+
selections: [
|
|
205330
|
+
{
|
|
205331
|
+
kind: "Field",
|
|
205332
|
+
name: { kind: "Name", value: "stagedTargets" },
|
|
205333
|
+
selectionSet: {
|
|
205334
|
+
kind: "SelectionSet",
|
|
205335
|
+
selections: [
|
|
205336
|
+
{ kind: "Field", name: { kind: "Name", value: "url" } },
|
|
205337
|
+
{ kind: "Field", name: { kind: "Name", value: "resourceUrl" } },
|
|
205338
|
+
{
|
|
205339
|
+
kind: "Field",
|
|
205340
|
+
name: { kind: "Name", value: "parameters" },
|
|
205341
|
+
selectionSet: {
|
|
205342
|
+
kind: "SelectionSet",
|
|
205343
|
+
selections: [
|
|
205344
|
+
{ kind: "Field", name: { kind: "Name", value: "name" } },
|
|
205345
|
+
{ kind: "Field", name: { kind: "Name", value: "value" } },
|
|
205346
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
205347
|
+
]
|
|
205348
|
+
}
|
|
205349
|
+
},
|
|
205350
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
205351
|
+
]
|
|
205352
|
+
}
|
|
205353
|
+
},
|
|
205354
|
+
{
|
|
205355
|
+
kind: "Field",
|
|
205356
|
+
name: { kind: "Name", value: "userErrors" },
|
|
205357
|
+
selectionSet: {
|
|
205358
|
+
kind: "SelectionSet",
|
|
205359
|
+
selections: [
|
|
205360
|
+
{ kind: "Field", name: { kind: "Name", value: "field" } },
|
|
205361
|
+
{ kind: "Field", name: { kind: "Name", value: "message" } },
|
|
205362
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
205363
|
+
]
|
|
205364
|
+
}
|
|
205365
|
+
},
|
|
205366
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
205367
|
+
]
|
|
205368
|
+
}
|
|
205369
|
+
}
|
|
205370
|
+
]
|
|
205371
|
+
}
|
|
205372
|
+
}
|
|
205373
|
+
]
|
|
205374
|
+
};
|
|
205375
|
+
|
|
205376
|
+
// ../cli-kit/dist/public/node/api/bulk-operations/stage-file.js
|
|
205377
|
+
async function stageFile(options) {
|
|
205378
|
+
let { adminSession, variablesJsonl } = options, buffer = Buffer.from(variablesJsonl ?? "", "utf-8"), filename = "bulk-variables.jsonl", size = buffer.length, response = await requestStagedUpload(adminSession, filename, size), target = validateStagedUploadResponse(response);
|
|
205379
|
+
return await uploadFileToStagedUrl(buffer, target.url, target.parameters, filename), target.stagedUploadKey;
|
|
205380
|
+
}
|
|
205381
|
+
async function requestStagedUpload(adminSession, filename, size) {
|
|
205382
|
+
return adminRequestDoc({
|
|
205383
|
+
query: StagedUploadsCreate,
|
|
205384
|
+
session: adminSession,
|
|
205385
|
+
variables: {
|
|
205386
|
+
input: [
|
|
205387
|
+
{
|
|
205388
|
+
filename,
|
|
205389
|
+
fileSize: size.toString(),
|
|
205390
|
+
httpMethod: "POST",
|
|
205391
|
+
mimeType: "text/jsonl",
|
|
205392
|
+
resource: "BULK_MUTATION_VARIABLES"
|
|
205393
|
+
}
|
|
205394
|
+
]
|
|
205395
|
+
}
|
|
205396
|
+
});
|
|
205397
|
+
}
|
|
205398
|
+
function validateStagedUploadResponse(response) {
|
|
205399
|
+
if (!response.stagedUploadsCreate)
|
|
205400
|
+
throw new AbortError("No response received from stagedUploadsCreate mutation");
|
|
205401
|
+
if (response.stagedUploadsCreate.userErrors.length > 0) {
|
|
205402
|
+
let errors = response.stagedUploadsCreate.userErrors.map((error) => error.message).join(", ");
|
|
205403
|
+
throw new AbortError(`Failed to create staged upload: ${errors}`);
|
|
205404
|
+
}
|
|
205405
|
+
let target = response.stagedUploadsCreate.stagedTargets?.[0];
|
|
205406
|
+
if (!target)
|
|
205407
|
+
throw new AbortError("No staged upload target returned from Shopify");
|
|
205408
|
+
if (!target.url || !target.resourceUrl)
|
|
205409
|
+
throw new AbortError("Invalid staged upload target: missing required URLs");
|
|
205410
|
+
let stagedUploadKey = target.parameters.find((param) => param.name === "key")?.value;
|
|
205411
|
+
if (!stagedUploadKey)
|
|
205412
|
+
throw new AbortError("No key parameter found in staged upload target");
|
|
205413
|
+
return {
|
|
205414
|
+
url: target.url,
|
|
205415
|
+
resourceUrl: target.resourceUrl,
|
|
205416
|
+
parameters: target.parameters,
|
|
205417
|
+
stagedUploadKey
|
|
205418
|
+
};
|
|
205419
|
+
}
|
|
205420
|
+
async function uploadFileToStagedUrl(fileContents, uploadUrl, parameters, filename) {
|
|
205421
|
+
let form = new FormData();
|
|
205422
|
+
for (let param of parameters)
|
|
205423
|
+
form.append(param.name, param.value);
|
|
205424
|
+
form.append("file", new Blob([new Uint8Array(fileContents)], { type: "text/jsonl" }), filename);
|
|
205425
|
+
let uploadResponse = await renderSingleTask({
|
|
205426
|
+
title: outputContent`Uploading bulk operation variables`,
|
|
205427
|
+
task: async () => fetch2(uploadUrl, {
|
|
205428
|
+
method: "POST",
|
|
205429
|
+
body: form
|
|
205430
|
+
}, "slow-request"),
|
|
205431
|
+
renderOptions: { stdout: process.stderr }
|
|
205432
|
+
});
|
|
205433
|
+
if (!uploadResponse.ok) {
|
|
205434
|
+
let errorText = await uploadResponse.text();
|
|
205435
|
+
throw new AbortError(`Failed to upload file to staged URL: ${uploadResponse.statusText}
|
|
205436
|
+
${errorText}`);
|
|
205437
|
+
}
|
|
205438
|
+
}
|
|
205439
|
+
|
|
205440
|
+
// ../cli-kit/dist/cli/api/graphql/bulk-operations/generated/bulk-operation-run-mutation.js
|
|
205441
|
+
init_cjs_shims();
|
|
205442
|
+
var BulkOperationRunMutation = {
|
|
205443
|
+
kind: "Document",
|
|
205444
|
+
definitions: [
|
|
205445
|
+
{
|
|
205446
|
+
kind: "OperationDefinition",
|
|
205447
|
+
operation: "mutation",
|
|
205448
|
+
name: { kind: "Name", value: "BulkOperationRunMutation" },
|
|
205449
|
+
variableDefinitions: [
|
|
205450
|
+
{
|
|
205451
|
+
kind: "VariableDefinition",
|
|
205452
|
+
variable: { kind: "Variable", name: { kind: "Name", value: "mutation" } },
|
|
205453
|
+
type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }
|
|
205454
|
+
},
|
|
205455
|
+
{
|
|
205456
|
+
kind: "VariableDefinition",
|
|
205457
|
+
variable: { kind: "Variable", name: { kind: "Name", value: "stagedUploadPath" } },
|
|
205458
|
+
type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }
|
|
205459
|
+
},
|
|
205460
|
+
{
|
|
205461
|
+
kind: "VariableDefinition",
|
|
205462
|
+
variable: { kind: "Variable", name: { kind: "Name", value: "clientIdentifier" } },
|
|
205463
|
+
type: { kind: "NamedType", name: { kind: "Name", value: "String" } }
|
|
205464
|
+
}
|
|
205465
|
+
],
|
|
205466
|
+
selectionSet: {
|
|
205467
|
+
kind: "SelectionSet",
|
|
205468
|
+
selections: [
|
|
205469
|
+
{
|
|
205470
|
+
kind: "Field",
|
|
205471
|
+
name: { kind: "Name", value: "bulkOperationRunMutation" },
|
|
205472
|
+
arguments: [
|
|
205473
|
+
{
|
|
205474
|
+
kind: "Argument",
|
|
205475
|
+
name: { kind: "Name", value: "mutation" },
|
|
205476
|
+
value: { kind: "Variable", name: { kind: "Name", value: "mutation" } }
|
|
205477
|
+
},
|
|
205478
|
+
{
|
|
205479
|
+
kind: "Argument",
|
|
205480
|
+
name: { kind: "Name", value: "stagedUploadPath" },
|
|
205481
|
+
value: { kind: "Variable", name: { kind: "Name", value: "stagedUploadPath" } }
|
|
205482
|
+
},
|
|
205483
|
+
{
|
|
205484
|
+
kind: "Argument",
|
|
205485
|
+
name: { kind: "Name", value: "clientIdentifier" },
|
|
205486
|
+
value: { kind: "Variable", name: { kind: "Name", value: "clientIdentifier" } }
|
|
205487
|
+
}
|
|
205488
|
+
],
|
|
205489
|
+
selectionSet: {
|
|
205490
|
+
kind: "SelectionSet",
|
|
205491
|
+
selections: [
|
|
205492
|
+
{
|
|
205493
|
+
kind: "Field",
|
|
205494
|
+
name: { kind: "Name", value: "bulkOperation" },
|
|
205495
|
+
selectionSet: {
|
|
205496
|
+
kind: "SelectionSet",
|
|
205497
|
+
selections: [
|
|
205498
|
+
{ kind: "Field", name: { kind: "Name", value: "type" } },
|
|
205499
|
+
{ kind: "Field", name: { kind: "Name", value: "completedAt" } },
|
|
205500
|
+
{ kind: "Field", name: { kind: "Name", value: "createdAt" } },
|
|
205501
|
+
{ kind: "Field", name: { kind: "Name", value: "errorCode" } },
|
|
205502
|
+
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
|
205503
|
+
{ kind: "Field", name: { kind: "Name", value: "objectCount" } },
|
|
205504
|
+
{ kind: "Field", name: { kind: "Name", value: "partialDataUrl" } },
|
|
205505
|
+
{ kind: "Field", name: { kind: "Name", value: "status" } },
|
|
205506
|
+
{ kind: "Field", name: { kind: "Name", value: "url" } },
|
|
205507
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
205508
|
+
]
|
|
205509
|
+
}
|
|
205510
|
+
},
|
|
205511
|
+
{
|
|
205512
|
+
kind: "Field",
|
|
205513
|
+
name: { kind: "Name", value: "userErrors" },
|
|
205514
|
+
selectionSet: {
|
|
205515
|
+
kind: "SelectionSet",
|
|
205516
|
+
selections: [
|
|
205517
|
+
{ kind: "Field", name: { kind: "Name", value: "code" } },
|
|
205518
|
+
{ kind: "Field", name: { kind: "Name", value: "field" } },
|
|
205519
|
+
{ kind: "Field", name: { kind: "Name", value: "message" } },
|
|
205520
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
205521
|
+
]
|
|
205522
|
+
}
|
|
205523
|
+
},
|
|
205524
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
205525
|
+
]
|
|
205526
|
+
}
|
|
205527
|
+
}
|
|
205528
|
+
]
|
|
205529
|
+
}
|
|
205530
|
+
}
|
|
205531
|
+
]
|
|
205532
|
+
};
|
|
205533
|
+
|
|
205534
|
+
// ../cli-kit/dist/public/node/api/bulk-operations/run-mutation.js
|
|
205535
|
+
async function runBulkOperationMutation(options) {
|
|
205536
|
+
let { adminSession, query: mutation, variablesJsonl, version } = options, stagedUploadPath = await stageFile({
|
|
205537
|
+
adminSession,
|
|
205538
|
+
variablesJsonl
|
|
205539
|
+
});
|
|
205540
|
+
return (await adminRequestDoc({
|
|
205541
|
+
query: BulkOperationRunMutation,
|
|
205542
|
+
session: adminSession,
|
|
205543
|
+
variables: {
|
|
205544
|
+
mutation,
|
|
205545
|
+
stagedUploadPath
|
|
205546
|
+
},
|
|
205547
|
+
...version && { version }
|
|
205548
|
+
})).bulkOperationRunMutation;
|
|
205549
|
+
}
|
|
205550
|
+
|
|
205551
|
+
// ../cli-kit/dist/public/node/api/bulk-operations/fetch.js
|
|
205214
205552
|
init_cjs_shims();
|
|
205215
|
-
var BULK_OPERATIONS_MIN_API_VERSION = "2026-01";
|
|
205216
205553
|
|
|
205217
|
-
// ../
|
|
205554
|
+
// ../cli-kit/dist/cli/api/graphql/bulk-operations/generated/get-bulk-operation-by-id.js
|
|
205218
205555
|
init_cjs_shims();
|
|
205219
205556
|
var GetBulkOperationById = {
|
|
205220
205557
|
kind: "Document",
|
|
@@ -205265,7 +205602,7 @@ var GetBulkOperationById = {
|
|
|
205265
205602
|
]
|
|
205266
205603
|
};
|
|
205267
205604
|
|
|
205268
|
-
// ../
|
|
205605
|
+
// ../cli-kit/dist/cli/api/graphql/bulk-operations/generated/list-bulk-operations.js
|
|
205269
205606
|
init_cjs_shims();
|
|
205270
205607
|
var ListBulkOperations = {
|
|
205271
205608
|
kind: "Document",
|
|
@@ -205345,13 +205682,414 @@ var ListBulkOperations = {
|
|
|
205345
205682
|
]
|
|
205346
205683
|
};
|
|
205347
205684
|
|
|
205348
|
-
// ../
|
|
205349
|
-
function
|
|
205350
|
-
|
|
205685
|
+
// ../cli-kit/dist/public/node/api/bulk-operations/fetch.js
|
|
205686
|
+
async function fetchBulkOperationById(options) {
|
|
205687
|
+
let { adminSession, operationId, version } = options;
|
|
205688
|
+
return (await adminRequestDoc({
|
|
205689
|
+
query: GetBulkOperationById,
|
|
205690
|
+
session: adminSession,
|
|
205691
|
+
variables: { id: operationId },
|
|
205692
|
+
version: version ?? BULK_OPERATIONS_MIN_API_VERSION
|
|
205693
|
+
})).bulkOperation;
|
|
205351
205694
|
}
|
|
205352
|
-
function
|
|
205353
|
-
|
|
205695
|
+
async function fetchRecentBulkOperations(options) {
|
|
205696
|
+
let { adminSession, version, sinceDays = 7, first = 100 } = options, since = new Date(Date.now() - sinceDays * 24 * 60 * 60 * 1e3).toISOString().split("T")[0];
|
|
205697
|
+
return (await adminRequestDoc({
|
|
205698
|
+
query: ListBulkOperations,
|
|
205699
|
+
session: adminSession,
|
|
205700
|
+
variables: {
|
|
205701
|
+
query: `created_at:>=${since}`,
|
|
205702
|
+
first,
|
|
205703
|
+
sortKey: "CREATED_AT"
|
|
205704
|
+
},
|
|
205705
|
+
version: version ?? BULK_OPERATIONS_MIN_API_VERSION
|
|
205706
|
+
})).bulkOperations.nodes;
|
|
205707
|
+
}
|
|
205708
|
+
|
|
205709
|
+
// ../cli-kit/dist/public/node/api/bulk-operations/cancel.js
|
|
205710
|
+
init_cjs_shims();
|
|
205711
|
+
|
|
205712
|
+
// ../cli-kit/dist/cli/api/graphql/bulk-operations/generated/bulk-operation-cancel.js
|
|
205713
|
+
init_cjs_shims();
|
|
205714
|
+
var BulkOperationCancel = {
|
|
205715
|
+
kind: "Document",
|
|
205716
|
+
definitions: [
|
|
205717
|
+
{
|
|
205718
|
+
kind: "OperationDefinition",
|
|
205719
|
+
operation: "mutation",
|
|
205720
|
+
name: { kind: "Name", value: "BulkOperationCancel" },
|
|
205721
|
+
variableDefinitions: [
|
|
205722
|
+
{
|
|
205723
|
+
kind: "VariableDefinition",
|
|
205724
|
+
variable: { kind: "Variable", name: { kind: "Name", value: "id" } },
|
|
205725
|
+
type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "ID" } } }
|
|
205726
|
+
}
|
|
205727
|
+
],
|
|
205728
|
+
selectionSet: {
|
|
205729
|
+
kind: "SelectionSet",
|
|
205730
|
+
selections: [
|
|
205731
|
+
{
|
|
205732
|
+
kind: "Field",
|
|
205733
|
+
name: { kind: "Name", value: "bulkOperationCancel" },
|
|
205734
|
+
arguments: [
|
|
205735
|
+
{
|
|
205736
|
+
kind: "Argument",
|
|
205737
|
+
name: { kind: "Name", value: "id" },
|
|
205738
|
+
value: { kind: "Variable", name: { kind: "Name", value: "id" } }
|
|
205739
|
+
}
|
|
205740
|
+
],
|
|
205741
|
+
selectionSet: {
|
|
205742
|
+
kind: "SelectionSet",
|
|
205743
|
+
selections: [
|
|
205744
|
+
{
|
|
205745
|
+
kind: "Field",
|
|
205746
|
+
name: { kind: "Name", value: "bulkOperation" },
|
|
205747
|
+
selectionSet: {
|
|
205748
|
+
kind: "SelectionSet",
|
|
205749
|
+
selections: [
|
|
205750
|
+
{ kind: "Field", name: { kind: "Name", value: "completedAt" } },
|
|
205751
|
+
{ kind: "Field", name: { kind: "Name", value: "createdAt" } },
|
|
205752
|
+
{ kind: "Field", name: { kind: "Name", value: "errorCode" } },
|
|
205753
|
+
{ kind: "Field", name: { kind: "Name", value: "fileSize" } },
|
|
205754
|
+
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
|
205755
|
+
{ kind: "Field", name: { kind: "Name", value: "objectCount" } },
|
|
205756
|
+
{ kind: "Field", name: { kind: "Name", value: "partialDataUrl" } },
|
|
205757
|
+
{ kind: "Field", name: { kind: "Name", value: "query" } },
|
|
205758
|
+
{ kind: "Field", name: { kind: "Name", value: "rootObjectCount" } },
|
|
205759
|
+
{ kind: "Field", name: { kind: "Name", value: "status" } },
|
|
205760
|
+
{ kind: "Field", name: { kind: "Name", value: "type" } },
|
|
205761
|
+
{ kind: "Field", name: { kind: "Name", value: "url" } },
|
|
205762
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
205763
|
+
]
|
|
205764
|
+
}
|
|
205765
|
+
},
|
|
205766
|
+
{
|
|
205767
|
+
kind: "Field",
|
|
205768
|
+
name: { kind: "Name", value: "userErrors" },
|
|
205769
|
+
selectionSet: {
|
|
205770
|
+
kind: "SelectionSet",
|
|
205771
|
+
selections: [
|
|
205772
|
+
{ kind: "Field", name: { kind: "Name", value: "field" } },
|
|
205773
|
+
{ kind: "Field", name: { kind: "Name", value: "message" } },
|
|
205774
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
205775
|
+
]
|
|
205776
|
+
}
|
|
205777
|
+
},
|
|
205778
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
205779
|
+
]
|
|
205780
|
+
}
|
|
205781
|
+
}
|
|
205782
|
+
]
|
|
205783
|
+
}
|
|
205784
|
+
}
|
|
205785
|
+
]
|
|
205786
|
+
};
|
|
205787
|
+
|
|
205788
|
+
// ../cli-kit/dist/public/node/api/bulk-operations/cancel.js
|
|
205789
|
+
async function cancelBulkOperationRequest(options) {
|
|
205790
|
+
let { adminSession, operationId, version } = options;
|
|
205791
|
+
return (await adminRequestDoc({
|
|
205792
|
+
query: BulkOperationCancel,
|
|
205793
|
+
session: adminSession,
|
|
205794
|
+
variables: { id: operationId },
|
|
205795
|
+
version: version ?? BULK_OPERATIONS_MIN_API_VERSION
|
|
205796
|
+
})).bulkOperationCancel;
|
|
205354
205797
|
}
|
|
205798
|
+
|
|
205799
|
+
// ../cli-kit/dist/public/node/api/bulk-operations/watch-bulk-operation.js
|
|
205800
|
+
init_cjs_shims();
|
|
205801
|
+
|
|
205802
|
+
// ../cli-kit/dist/public/node/api/bulk-operations/format-bulk-operation-status.js
|
|
205803
|
+
init_cjs_shims();
|
|
205804
|
+
function formatBulkOperationStatus(operation) {
|
|
205805
|
+
switch (operation.status) {
|
|
205806
|
+
case "RUNNING":
|
|
205807
|
+
return outputContent`Bulk operation in progress${operation.objectCount > 0 ? outputToken.gray(` (${String(operation.objectCount)} objects ${operation.type === "MUTATION" ? "written" : "read"})`) : ""}`;
|
|
205808
|
+
case "CREATED":
|
|
205809
|
+
return outputContent`Starting`;
|
|
205810
|
+
case "COMPLETED":
|
|
205811
|
+
return outputContent`Bulk operation succeeded: ${outputToken.gray(`${String(operation.objectCount)} objects`)}`;
|
|
205812
|
+
case "FAILED":
|
|
205813
|
+
return outputContent`Bulk operation failed. ${outputToken.errorText(`Error: ${operation.errorCode ?? "unknown"}`)}`;
|
|
205814
|
+
case "CANCELING":
|
|
205815
|
+
return outputContent`Bulk operation canceling...`;
|
|
205816
|
+
case "CANCELED":
|
|
205817
|
+
return outputContent`Bulk operation canceled.`;
|
|
205818
|
+
case "EXPIRED":
|
|
205819
|
+
return outputContent`Bulk operation expired.`;
|
|
205820
|
+
default:
|
|
205821
|
+
return outputContent`Bulk operation status: ${operation.status}`;
|
|
205822
|
+
}
|
|
205823
|
+
}
|
|
205824
|
+
function renderBulkOperationUserErrors(userErrors, headline) {
|
|
205825
|
+
let errorMessages = userErrors.map((error) => outputContent`${error.field?.join(".") ?? "unknown"}: ${error.message}`.value).join(`
|
|
205826
|
+
`);
|
|
205827
|
+
renderError({
|
|
205828
|
+
headline,
|
|
205829
|
+
body: errorMessages
|
|
205830
|
+
});
|
|
205831
|
+
}
|
|
205832
|
+
function formatBulkOperationCancellationResult(operation) {
|
|
205833
|
+
let headline = formatBulkOperationStatus(operation).value;
|
|
205834
|
+
switch (operation.status) {
|
|
205835
|
+
case "CANCELING":
|
|
205836
|
+
return {
|
|
205837
|
+
headline: "Bulk operation is being cancelled.",
|
|
205838
|
+
renderType: "success"
|
|
205839
|
+
};
|
|
205840
|
+
case "CANCELED":
|
|
205841
|
+
case "COMPLETED":
|
|
205842
|
+
case "FAILED": {
|
|
205843
|
+
let items = [
|
|
205844
|
+
outputContent`ID: ${outputToken.cyan(operation.id)}`.value,
|
|
205845
|
+
outputContent`Status: ${outputToken.yellow(operation.status)}`.value,
|
|
205846
|
+
outputContent`Created at: ${outputToken.gray(String(operation.createdAt))}`.value,
|
|
205847
|
+
...operation.completedAt ? [outputContent`Completed at: ${outputToken.gray(String(operation.completedAt))}`.value] : []
|
|
205848
|
+
];
|
|
205849
|
+
return {
|
|
205850
|
+
headline: outputContent`Bulk operation is already ${operation.status.toLowerCase()}.`.value,
|
|
205851
|
+
body: outputContent`This operation has already finished and can't be canceled.`.value,
|
|
205852
|
+
customSections: [{ body: [{ list: { items } }] }],
|
|
205853
|
+
renderType: "warning"
|
|
205854
|
+
};
|
|
205855
|
+
}
|
|
205856
|
+
case "CREATED":
|
|
205857
|
+
case "EXPIRED":
|
|
205858
|
+
case "RUNNING":
|
|
205859
|
+
return {
|
|
205860
|
+
headline,
|
|
205861
|
+
renderType: "info"
|
|
205862
|
+
};
|
|
205863
|
+
}
|
|
205864
|
+
}
|
|
205865
|
+
|
|
205866
|
+
// ../cli-kit/dist/public/node/api/bulk-operations/watch-bulk-operation.js
|
|
205867
|
+
var TERMINAL_STATUSES = ["COMPLETED", "FAILED", "CANCELED", "EXPIRED"], INITIAL_POLL_INTERVAL_SECONDS = 1, REGULAR_POLL_INTERVAL_SECONDS = 5, INITIAL_POLL_COUNT = 10, QUICK_WATCH_TIMEOUT_MS = 3e3, QUICK_WATCH_POLL_INTERVAL_MS = 300;
|
|
205868
|
+
async function shortBulkOperationPoll(adminSession, operationId) {
|
|
205869
|
+
return renderSingleTask({
|
|
205870
|
+
title: outputContent`Starting bulk operation`,
|
|
205871
|
+
task: async () => {
|
|
205872
|
+
let startTime = Date.now(), poller = pollBulkOperation({
|
|
205873
|
+
adminSession,
|
|
205874
|
+
operationId,
|
|
205875
|
+
pollIntervalSeconds: QUICK_WATCH_POLL_INTERVAL_MS / 1e3,
|
|
205876
|
+
useAdaptivePolling: !1
|
|
205877
|
+
}), latestOperationState;
|
|
205878
|
+
do {
|
|
205879
|
+
let { value, done } = await poller.next();
|
|
205880
|
+
if (latestOperationState = value, done)
|
|
205881
|
+
return latestOperationState;
|
|
205882
|
+
} while (Date.now() - startTime < QUICK_WATCH_TIMEOUT_MS);
|
|
205883
|
+
return latestOperationState;
|
|
205884
|
+
},
|
|
205885
|
+
renderOptions: { stdout: process.stderr }
|
|
205886
|
+
});
|
|
205887
|
+
}
|
|
205888
|
+
async function watchBulkOperation(adminSession, operationId, abortSignal, onAbort) {
|
|
205889
|
+
return renderSingleTask({
|
|
205890
|
+
title: outputContent`Polling bulk operation`,
|
|
205891
|
+
task: async (updateStatus) => {
|
|
205892
|
+
let poller = pollBulkOperation({
|
|
205893
|
+
adminSession,
|
|
205894
|
+
operationId,
|
|
205895
|
+
pollIntervalSeconds: REGULAR_POLL_INTERVAL_SECONDS,
|
|
205896
|
+
initialPollIntervalSeconds: INITIAL_POLL_INTERVAL_SECONDS,
|
|
205897
|
+
initialPollCount: INITIAL_POLL_COUNT,
|
|
205898
|
+
useAdaptivePolling: !0,
|
|
205899
|
+
abortSignal
|
|
205900
|
+
});
|
|
205901
|
+
for (; ; ) {
|
|
205902
|
+
let { value: latestOperationState, done } = await poller.next();
|
|
205903
|
+
if (done)
|
|
205904
|
+
return latestOperationState;
|
|
205905
|
+
updateStatus(formatBulkOperationStatus(latestOperationState));
|
|
205906
|
+
}
|
|
205907
|
+
},
|
|
205908
|
+
onAbort,
|
|
205909
|
+
renderOptions: { stdout: process.stderr }
|
|
205910
|
+
});
|
|
205911
|
+
}
|
|
205912
|
+
async function* pollBulkOperation({ adminSession, operationId, pollIntervalSeconds, useAdaptivePolling = !1, initialPollIntervalSeconds = INITIAL_POLL_INTERVAL_SECONDS, initialPollCount = INITIAL_POLL_COUNT, abortSignal }) {
|
|
205913
|
+
let pollCount = 0;
|
|
205914
|
+
for (; ; ) {
|
|
205915
|
+
let response = await fetchBulkOperation(adminSession, operationId);
|
|
205916
|
+
if (!response.bulkOperation)
|
|
205917
|
+
throw new Error("bulk operation not found");
|
|
205918
|
+
let latestOperationState = response.bulkOperation;
|
|
205919
|
+
if (TERMINAL_STATUSES.includes(latestOperationState.status) || abortSignal?.aborted)
|
|
205920
|
+
return latestOperationState;
|
|
205921
|
+
yield latestOperationState, pollCount++;
|
|
205922
|
+
let pollInterval = pollIntervalSeconds;
|
|
205923
|
+
if (useAdaptivePolling && pollCount <= initialPollCount && (pollInterval = initialPollIntervalSeconds), abortSignal) {
|
|
205924
|
+
let removeAbortListener, abortPromise = new Promise((resolve) => {
|
|
205925
|
+
let handler = () => resolve();
|
|
205926
|
+
abortSignal.addEventListener("abort", handler, { once: !0 }), removeAbortListener = () => abortSignal.removeEventListener("abort", handler);
|
|
205927
|
+
});
|
|
205928
|
+
await Promise.race([sleep(pollInterval), abortPromise]), removeAbortListener?.();
|
|
205929
|
+
} else
|
|
205930
|
+
await sleep(pollInterval);
|
|
205931
|
+
}
|
|
205932
|
+
}
|
|
205933
|
+
async function fetchBulkOperation(adminSession, operationId) {
|
|
205934
|
+
return adminRequestDoc({
|
|
205935
|
+
query: GetBulkOperationById,
|
|
205936
|
+
session: adminSession,
|
|
205937
|
+
variables: { id: operationId },
|
|
205938
|
+
version: BULK_OPERATIONS_MIN_API_VERSION
|
|
205939
|
+
});
|
|
205940
|
+
}
|
|
205941
|
+
|
|
205942
|
+
// ../cli-kit/dist/public/node/api/bulk-operations/download-bulk-operation-results.js
|
|
205943
|
+
init_cjs_shims();
|
|
205944
|
+
async function downloadBulkOperationResults(url) {
|
|
205945
|
+
let response = await fetch2(url);
|
|
205946
|
+
if (!response.ok)
|
|
205947
|
+
throw new AbortError(`Failed to download bulk operation results: ${response.statusText}`);
|
|
205948
|
+
return response.text();
|
|
205949
|
+
}
|
|
205950
|
+
function resultsContainUserErrors(results) {
|
|
205951
|
+
return results.trim().split(`
|
|
205952
|
+
`).filter((line) => line.trim().length > 0).some((line) => {
|
|
205953
|
+
let parsed;
|
|
205954
|
+
try {
|
|
205955
|
+
parsed = JSON.parse(line);
|
|
205956
|
+
} catch (error) {
|
|
205957
|
+
if (error instanceof SyntaxError)
|
|
205958
|
+
return !1;
|
|
205959
|
+
throw error;
|
|
205960
|
+
}
|
|
205961
|
+
if (!parsed.data)
|
|
205962
|
+
return !1;
|
|
205963
|
+
let result = Object.values(parsed.data)[0];
|
|
205964
|
+
return result?.userErrors !== void 0 && result.userErrors.length > 0;
|
|
205965
|
+
});
|
|
205966
|
+
}
|
|
205967
|
+
|
|
205968
|
+
// ../app/dist/cli/utilities/execute-command-helpers.js
|
|
205969
|
+
async function prepareAppStoreContext(flags) {
|
|
205970
|
+
let appContextResult = await linkedAppContext({
|
|
205971
|
+
directory: flags.path,
|
|
205972
|
+
clientId: flags["client-id"],
|
|
205973
|
+
forceRelink: flags.reset,
|
|
205974
|
+
userProvidedConfigName: flags.config
|
|
205975
|
+
}), store = await storeContext({
|
|
205976
|
+
appContextResult,
|
|
205977
|
+
storeFqdn: flags.store,
|
|
205978
|
+
forceReselectStore: flags.reset,
|
|
205979
|
+
storeTypes: ["APP_DEVELOPMENT", "DEVELOPMENT", "DEVELOPMENT_SUPERSET", "PRODUCTION"]
|
|
205980
|
+
});
|
|
205981
|
+
return { appContextResult, store };
|
|
205982
|
+
}
|
|
205983
|
+
async function prepareExecuteContext(flags) {
|
|
205984
|
+
let query = await resolveBulkOperationQuery({ query: flags.query, queryFile: flags["query-file"] }), { appContextResult, store } = await prepareAppStoreContext(flags);
|
|
205985
|
+
return { query, appContextResult, store };
|
|
205986
|
+
}
|
|
205987
|
+
|
|
205988
|
+
// ../app/dist/cli/services/bulk-operations/cancel-bulk-operation.js
|
|
205989
|
+
init_cjs_shims();
|
|
205990
|
+
|
|
205991
|
+
// ../app/dist/cli/services/graphql/common.js
|
|
205992
|
+
init_cjs_shims();
|
|
205993
|
+
async function createAdminSessionAsApp(remoteApp, storeFqdn) {
|
|
205994
|
+
let appSecret = remoteApp.apiSecretKeys[0]?.secret;
|
|
205995
|
+
if (!appSecret)
|
|
205996
|
+
throw new BugError("No API secret keys found for app");
|
|
205997
|
+
return ensureAuthenticatedAdminAsApp(storeFqdn, remoteApp.apiKey, appSecret);
|
|
205998
|
+
}
|
|
205999
|
+
function formatOperationInfo(options) {
|
|
206000
|
+
let { organization, remoteApp, storeFqdn, version } = options, items = [`Organization: ${organization.businessName}`, `App: ${remoteApp.title}`, `Store: ${storeFqdn}`];
|
|
206001
|
+
return version && items.push(`API version: ${version}`), items;
|
|
206002
|
+
}
|
|
206003
|
+
function validateMutationStore(graphqlOperation, store) {
|
|
206004
|
+
if (isMutation(graphqlOperation) && store.storeType !== "APP_DEVELOPMENT")
|
|
206005
|
+
throw new AbortError("Mutations can only be executed on dev stores.");
|
|
206006
|
+
}
|
|
206007
|
+
|
|
206008
|
+
// ../app/dist/cli/services/bulk-operations/cancel-bulk-operation.js
|
|
206009
|
+
async function cancelBulkOperation(options) {
|
|
206010
|
+
let { organization, storeFqdn, operationId, remoteApp } = options;
|
|
206011
|
+
renderInfo({
|
|
206012
|
+
headline: "Canceling bulk operation.",
|
|
206013
|
+
body: [
|
|
206014
|
+
{
|
|
206015
|
+
list: {
|
|
206016
|
+
items: [`ID: ${operationId}`, ...formatOperationInfo({ organization, remoteApp, storeFqdn })]
|
|
206017
|
+
}
|
|
206018
|
+
}
|
|
206019
|
+
]
|
|
206020
|
+
});
|
|
206021
|
+
let adminSession = await createAdminSessionAsApp(remoteApp, storeFqdn), bulkOperationCancel = await cancelBulkOperationRequest({ adminSession, operationId });
|
|
206022
|
+
if (bulkOperationCancel?.userErrors?.length) {
|
|
206023
|
+
renderBulkOperationUserErrors(bulkOperationCancel.userErrors, "Failed to cancel bulk operation.");
|
|
206024
|
+
return;
|
|
206025
|
+
}
|
|
206026
|
+
let operation = bulkOperationCancel?.bulkOperation;
|
|
206027
|
+
if (operation) {
|
|
206028
|
+
let result = formatBulkOperationCancellationResult(operation), body = operation.status === "CANCELING" ? [
|
|
206029
|
+
`This may take a few moments. Check the status with:
|
|
206030
|
+
`,
|
|
206031
|
+
{ command: `shopify app bulk status --id=${extractBulkOperationId(operation.id)}` }
|
|
206032
|
+
] : result.body, renderOptions = {
|
|
206033
|
+
headline: result.headline,
|
|
206034
|
+
...body && { body },
|
|
206035
|
+
...result.customSections && { customSections: result.customSections }
|
|
206036
|
+
};
|
|
206037
|
+
switch (result.renderType) {
|
|
206038
|
+
case "success":
|
|
206039
|
+
renderSuccess(renderOptions);
|
|
206040
|
+
break;
|
|
206041
|
+
case "warning":
|
|
206042
|
+
renderWarning(renderOptions);
|
|
206043
|
+
break;
|
|
206044
|
+
case "info":
|
|
206045
|
+
renderInfo(renderOptions);
|
|
206046
|
+
break;
|
|
206047
|
+
}
|
|
206048
|
+
} else
|
|
206049
|
+
renderError({
|
|
206050
|
+
headline: "Bulk operation not found or could not be canceled.",
|
|
206051
|
+
body: outputContent`ID: ${outputToken.yellow(operationId)}`.value
|
|
206052
|
+
});
|
|
206053
|
+
}
|
|
206054
|
+
|
|
206055
|
+
// ../app/dist/cli/commands/app/bulk/cancel.js
|
|
206056
|
+
var import_core5 = __toESM(require_lib(), 1);
|
|
206057
|
+
var _a2, BulkCancel = class extends AppLinkedCommand {
|
|
206058
|
+
async run() {
|
|
206059
|
+
let { flags } = await this.parse(_a2), { appContextResult, store } = await prepareAppStoreContext(flags);
|
|
206060
|
+
return await cancelBulkOperation({
|
|
206061
|
+
organization: appContextResult.organization,
|
|
206062
|
+
storeFqdn: store.shopDomain,
|
|
206063
|
+
operationId: normalizeBulkOperationId(flags.id),
|
|
206064
|
+
remoteApp: appContextResult.remoteApp
|
|
206065
|
+
}), { app: appContextResult.app };
|
|
206066
|
+
}
|
|
206067
|
+
};
|
|
206068
|
+
_a2 = BulkCancel;
|
|
206069
|
+
BulkCancel.summary = "Cancel a bulk operation.";
|
|
206070
|
+
BulkCancel.description = "Cancels a running bulk operation by ID.";
|
|
206071
|
+
BulkCancel.flags = {
|
|
206072
|
+
...globalFlags,
|
|
206073
|
+
...appFlags,
|
|
206074
|
+
id: import_core5.Flags.string({
|
|
206075
|
+
description: "The bulk operation ID to cancel (numeric ID or full GID).",
|
|
206076
|
+
env: "SHOPIFY_FLAG_ID",
|
|
206077
|
+
required: !0
|
|
206078
|
+
}),
|
|
206079
|
+
store: import_core5.Flags.string({
|
|
206080
|
+
char: "s",
|
|
206081
|
+
description: "The store domain. Must be an existing dev store.",
|
|
206082
|
+
env: "SHOPIFY_FLAG_STORE",
|
|
206083
|
+
parse: async (input) => normalizeStoreFqdn(input)
|
|
206084
|
+
})
|
|
206085
|
+
};
|
|
206086
|
+
var cancel_default = BulkCancel;
|
|
206087
|
+
|
|
206088
|
+
// ../app/dist/cli/commands/app/bulk/status.js
|
|
206089
|
+
init_cjs_shims();
|
|
206090
|
+
|
|
206091
|
+
// ../app/dist/cli/services/bulk-operations/bulk-operation-status.js
|
|
206092
|
+
init_cjs_shims();
|
|
205355
206093
|
async function getBulkOperationStatus(options) {
|
|
205356
206094
|
let { organization, storeFqdn, operationId, remoteApp } = options;
|
|
205357
206095
|
renderInfo({
|
|
@@ -205367,16 +206105,15 @@ async function getBulkOperationStatus(options) {
|
|
|
205367
206105
|
let appSecret = remoteApp.apiSecretKeys[0]?.secret;
|
|
205368
206106
|
if (!appSecret)
|
|
205369
206107
|
throw new BugError("No API secret keys found for app");
|
|
205370
|
-
let adminSession = await ensureAuthenticatedAdminAsApp(storeFqdn, remoteApp.apiKey, appSecret),
|
|
205371
|
-
|
|
205372
|
-
|
|
205373
|
-
variables: { id: operationId },
|
|
206108
|
+
let adminSession = await ensureAuthenticatedAdminAsApp(storeFqdn, remoteApp.apiKey, appSecret), operation = await fetchBulkOperationById({
|
|
206109
|
+
adminSession,
|
|
206110
|
+
operationId,
|
|
205374
206111
|
version: await resolveApiVersion({
|
|
205375
206112
|
adminSession,
|
|
205376
206113
|
minimumDefaultVersion: BULK_OPERATIONS_MIN_API_VERSION
|
|
205377
206114
|
})
|
|
205378
206115
|
});
|
|
205379
|
-
|
|
206116
|
+
operation ? renderBulkOperationStatus(operation) : renderError({
|
|
205380
206117
|
headline: "Bulk operation not found.",
|
|
205381
206118
|
body: outputContent`ID: ${outputToken.yellow(operationId)}`.value
|
|
205382
206119
|
});
|
|
@@ -205396,19 +206133,13 @@ async function listBulkOperations(options) {
|
|
|
205396
206133
|
let appSecret = remoteApp.apiSecretKeys[0]?.secret;
|
|
205397
206134
|
if (!appSecret)
|
|
205398
206135
|
throw new BugError("No API secret keys found for app");
|
|
205399
|
-
let adminSession = await ensureAuthenticatedAdminAsApp(storeFqdn, remoteApp.apiKey, appSecret),
|
|
205400
|
-
|
|
205401
|
-
session: adminSession,
|
|
205402
|
-
variables: {
|
|
205403
|
-
query: `created_at:>=${sevenDaysAgo}`,
|
|
205404
|
-
first: 100,
|
|
205405
|
-
sortKey: "CREATED_AT"
|
|
205406
|
-
},
|
|
206136
|
+
let adminSession = await ensureAuthenticatedAdminAsApp(storeFqdn, remoteApp.apiKey, appSecret), operations = (await fetchRecentBulkOperations({
|
|
206137
|
+
adminSession,
|
|
205407
206138
|
version: await resolveApiVersion({
|
|
205408
206139
|
adminSession,
|
|
205409
206140
|
minimumDefaultVersion: BULK_OPERATIONS_MIN_API_VERSION
|
|
205410
206141
|
})
|
|
205411
|
-
})).
|
|
206142
|
+
})).map((operation) => ({
|
|
205412
206143
|
id: extractBulkOperationId(operation.id),
|
|
205413
206144
|
status: formatStatus(operation.status),
|
|
205414
206145
|
count: formatCount(operation.objectCount),
|
|
@@ -205453,234 +206184,7 @@ function downloadLink(downloadUrl) {
|
|
|
205453
206184
|
return downloadUrl ? outputContent`${outputToken.link("download", downloadUrl)}`.value : "";
|
|
205454
206185
|
}
|
|
205455
206186
|
|
|
205456
|
-
// ../app/dist/cli/services/bulk-operations/format-bulk-operation-status.js
|
|
205457
|
-
function formatBulkOperationStatus(operation) {
|
|
205458
|
-
switch (operation.status) {
|
|
205459
|
-
case "RUNNING":
|
|
205460
|
-
return outputContent`Bulk operation in progress${operation.objectCount > 0 ? outputToken.gray(` (${String(operation.objectCount)} objects ${operation.type === "MUTATION" ? "written" : "read"})`) : ""}`;
|
|
205461
|
-
case "CREATED":
|
|
205462
|
-
return outputContent`Starting`;
|
|
205463
|
-
case "COMPLETED":
|
|
205464
|
-
return outputContent`Bulk operation succeeded: ${outputToken.gray(`${String(operation.objectCount)} objects`)}`;
|
|
205465
|
-
case "FAILED":
|
|
205466
|
-
return outputContent`Bulk operation failed. ${outputToken.errorText(`Error: ${operation.errorCode ?? "unknown"}`)}`;
|
|
205467
|
-
case "CANCELING":
|
|
205468
|
-
return outputContent`Bulk operation canceling...`;
|
|
205469
|
-
case "CANCELED":
|
|
205470
|
-
return outputContent`Bulk operation canceled.`;
|
|
205471
|
-
case "EXPIRED":
|
|
205472
|
-
return outputContent`Bulk operation expired.`;
|
|
205473
|
-
default:
|
|
205474
|
-
return outputContent`Bulk operation status: ${operation.status}`;
|
|
205475
|
-
}
|
|
205476
|
-
}
|
|
205477
|
-
function renderBulkOperationUserErrors(userErrors, headline) {
|
|
205478
|
-
let errorMessages = userErrors.map((error) => outputContent`${error.field?.join(".") ?? "unknown"}: ${error.message}`.value).join(`
|
|
205479
|
-
`);
|
|
205480
|
-
renderError({
|
|
205481
|
-
headline,
|
|
205482
|
-
body: errorMessages
|
|
205483
|
-
});
|
|
205484
|
-
}
|
|
205485
|
-
function formatBulkOperationCancellationResult(operation) {
|
|
205486
|
-
let headline = formatBulkOperationStatus(operation).value;
|
|
205487
|
-
switch (operation.status) {
|
|
205488
|
-
case "CANCELING":
|
|
205489
|
-
return {
|
|
205490
|
-
headline: "Bulk operation is being cancelled.",
|
|
205491
|
-
body: [
|
|
205492
|
-
`This may take a few moments. Check the status with:
|
|
205493
|
-
`,
|
|
205494
|
-
{ command: `shopify app bulk status --id=${extractBulkOperationId(operation.id)}` }
|
|
205495
|
-
],
|
|
205496
|
-
renderType: "success"
|
|
205497
|
-
};
|
|
205498
|
-
case "CANCELED":
|
|
205499
|
-
case "COMPLETED":
|
|
205500
|
-
case "FAILED": {
|
|
205501
|
-
let items = [
|
|
205502
|
-
outputContent`ID: ${outputToken.cyan(operation.id)}`.value,
|
|
205503
|
-
outputContent`Status: ${outputToken.yellow(operation.status)}`.value,
|
|
205504
|
-
outputContent`Created at: ${outputToken.gray(String(operation.createdAt))}`.value,
|
|
205505
|
-
...operation.completedAt ? [outputContent`Completed at: ${outputToken.gray(String(operation.completedAt))}`.value] : []
|
|
205506
|
-
];
|
|
205507
|
-
return {
|
|
205508
|
-
headline: outputContent`Bulk operation is already ${operation.status.toLowerCase()}.`.value,
|
|
205509
|
-
body: outputContent`This operation has already finished and can't be canceled.`.value,
|
|
205510
|
-
customSections: [{ body: [{ list: { items } }] }],
|
|
205511
|
-
renderType: "warning"
|
|
205512
|
-
};
|
|
205513
|
-
}
|
|
205514
|
-
case "CREATED":
|
|
205515
|
-
case "EXPIRED":
|
|
205516
|
-
case "RUNNING":
|
|
205517
|
-
return {
|
|
205518
|
-
headline,
|
|
205519
|
-
renderType: "info"
|
|
205520
|
-
};
|
|
205521
|
-
}
|
|
205522
|
-
}
|
|
205523
|
-
|
|
205524
|
-
// ../app/dist/cli/api/graphql/bulk-operations/generated/bulk-operation-cancel.js
|
|
205525
|
-
init_cjs_shims();
|
|
205526
|
-
var BulkOperationCancel = {
|
|
205527
|
-
kind: "Document",
|
|
205528
|
-
definitions: [
|
|
205529
|
-
{
|
|
205530
|
-
kind: "OperationDefinition",
|
|
205531
|
-
operation: "mutation",
|
|
205532
|
-
name: { kind: "Name", value: "BulkOperationCancel" },
|
|
205533
|
-
variableDefinitions: [
|
|
205534
|
-
{
|
|
205535
|
-
kind: "VariableDefinition",
|
|
205536
|
-
variable: { kind: "Variable", name: { kind: "Name", value: "id" } },
|
|
205537
|
-
type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "ID" } } }
|
|
205538
|
-
}
|
|
205539
|
-
],
|
|
205540
|
-
selectionSet: {
|
|
205541
|
-
kind: "SelectionSet",
|
|
205542
|
-
selections: [
|
|
205543
|
-
{
|
|
205544
|
-
kind: "Field",
|
|
205545
|
-
name: { kind: "Name", value: "bulkOperationCancel" },
|
|
205546
|
-
arguments: [
|
|
205547
|
-
{
|
|
205548
|
-
kind: "Argument",
|
|
205549
|
-
name: { kind: "Name", value: "id" },
|
|
205550
|
-
value: { kind: "Variable", name: { kind: "Name", value: "id" } }
|
|
205551
|
-
}
|
|
205552
|
-
],
|
|
205553
|
-
selectionSet: {
|
|
205554
|
-
kind: "SelectionSet",
|
|
205555
|
-
selections: [
|
|
205556
|
-
{
|
|
205557
|
-
kind: "Field",
|
|
205558
|
-
name: { kind: "Name", value: "bulkOperation" },
|
|
205559
|
-
selectionSet: {
|
|
205560
|
-
kind: "SelectionSet",
|
|
205561
|
-
selections: [
|
|
205562
|
-
{ kind: "Field", name: { kind: "Name", value: "completedAt" } },
|
|
205563
|
-
{ kind: "Field", name: { kind: "Name", value: "createdAt" } },
|
|
205564
|
-
{ kind: "Field", name: { kind: "Name", value: "errorCode" } },
|
|
205565
|
-
{ kind: "Field", name: { kind: "Name", value: "fileSize" } },
|
|
205566
|
-
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
|
205567
|
-
{ kind: "Field", name: { kind: "Name", value: "objectCount" } },
|
|
205568
|
-
{ kind: "Field", name: { kind: "Name", value: "partialDataUrl" } },
|
|
205569
|
-
{ kind: "Field", name: { kind: "Name", value: "query" } },
|
|
205570
|
-
{ kind: "Field", name: { kind: "Name", value: "rootObjectCount" } },
|
|
205571
|
-
{ kind: "Field", name: { kind: "Name", value: "status" } },
|
|
205572
|
-
{ kind: "Field", name: { kind: "Name", value: "type" } },
|
|
205573
|
-
{ kind: "Field", name: { kind: "Name", value: "url" } },
|
|
205574
|
-
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
205575
|
-
]
|
|
205576
|
-
}
|
|
205577
|
-
},
|
|
205578
|
-
{
|
|
205579
|
-
kind: "Field",
|
|
205580
|
-
name: { kind: "Name", value: "userErrors" },
|
|
205581
|
-
selectionSet: {
|
|
205582
|
-
kind: "SelectionSet",
|
|
205583
|
-
selections: [
|
|
205584
|
-
{ kind: "Field", name: { kind: "Name", value: "field" } },
|
|
205585
|
-
{ kind: "Field", name: { kind: "Name", value: "message" } },
|
|
205586
|
-
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
205587
|
-
]
|
|
205588
|
-
}
|
|
205589
|
-
},
|
|
205590
|
-
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
205591
|
-
]
|
|
205592
|
-
}
|
|
205593
|
-
}
|
|
205594
|
-
]
|
|
205595
|
-
}
|
|
205596
|
-
}
|
|
205597
|
-
]
|
|
205598
|
-
};
|
|
205599
|
-
|
|
205600
|
-
// ../app/dist/cli/services/bulk-operations/cancel-bulk-operation.js
|
|
205601
|
-
var API_VERSION = "2026-01";
|
|
205602
|
-
async function cancelBulkOperation(options) {
|
|
205603
|
-
let { organization, storeFqdn, operationId, remoteApp } = options;
|
|
205604
|
-
renderInfo({
|
|
205605
|
-
headline: "Canceling bulk operation.",
|
|
205606
|
-
body: [
|
|
205607
|
-
{
|
|
205608
|
-
list: {
|
|
205609
|
-
items: [`ID: ${operationId}`, ...formatOperationInfo({ organization, remoteApp, storeFqdn })]
|
|
205610
|
-
}
|
|
205611
|
-
}
|
|
205612
|
-
]
|
|
205613
|
-
});
|
|
205614
|
-
let adminSession = await createAdminSessionAsApp(remoteApp, storeFqdn), response = await adminRequestDoc({
|
|
205615
|
-
query: BulkOperationCancel,
|
|
205616
|
-
session: adminSession,
|
|
205617
|
-
variables: { id: operationId },
|
|
205618
|
-
version: API_VERSION
|
|
205619
|
-
});
|
|
205620
|
-
if (response.bulkOperationCancel?.userErrors?.length) {
|
|
205621
|
-
renderBulkOperationUserErrors(response.bulkOperationCancel.userErrors, "Failed to cancel bulk operation.");
|
|
205622
|
-
return;
|
|
205623
|
-
}
|
|
205624
|
-
let operation = response.bulkOperationCancel?.bulkOperation;
|
|
205625
|
-
if (operation) {
|
|
205626
|
-
let result = formatBulkOperationCancellationResult(operation), renderOptions = {
|
|
205627
|
-
headline: result.headline,
|
|
205628
|
-
...result.body && { body: result.body },
|
|
205629
|
-
...result.customSections && { customSections: result.customSections }
|
|
205630
|
-
};
|
|
205631
|
-
switch (result.renderType) {
|
|
205632
|
-
case "success":
|
|
205633
|
-
renderSuccess(renderOptions);
|
|
205634
|
-
break;
|
|
205635
|
-
case "warning":
|
|
205636
|
-
renderWarning(renderOptions);
|
|
205637
|
-
break;
|
|
205638
|
-
case "info":
|
|
205639
|
-
renderInfo(renderOptions);
|
|
205640
|
-
break;
|
|
205641
|
-
}
|
|
205642
|
-
} else
|
|
205643
|
-
renderError({
|
|
205644
|
-
headline: "Bulk operation not found or could not be canceled.",
|
|
205645
|
-
body: outputContent`ID: ${outputToken.yellow(operationId)}`.value
|
|
205646
|
-
});
|
|
205647
|
-
}
|
|
205648
|
-
|
|
205649
|
-
// ../app/dist/cli/commands/app/bulk/cancel.js
|
|
205650
|
-
var import_core5 = __toESM(require_lib(), 1);
|
|
205651
|
-
var _a2, BulkCancel = class extends AppLinkedCommand {
|
|
205652
|
-
async run() {
|
|
205653
|
-
let { flags } = await this.parse(_a2), { appContextResult, store } = await prepareAppStoreContext(flags);
|
|
205654
|
-
return await cancelBulkOperation({
|
|
205655
|
-
organization: appContextResult.organization,
|
|
205656
|
-
storeFqdn: store.shopDomain,
|
|
205657
|
-
operationId: normalizeBulkOperationId(flags.id),
|
|
205658
|
-
remoteApp: appContextResult.remoteApp
|
|
205659
|
-
}), { app: appContextResult.app };
|
|
205660
|
-
}
|
|
205661
|
-
};
|
|
205662
|
-
_a2 = BulkCancel;
|
|
205663
|
-
BulkCancel.summary = "Cancel a bulk operation.";
|
|
205664
|
-
BulkCancel.description = "Cancels a running bulk operation by ID.";
|
|
205665
|
-
BulkCancel.flags = {
|
|
205666
|
-
...globalFlags,
|
|
205667
|
-
...appFlags,
|
|
205668
|
-
id: import_core5.Flags.string({
|
|
205669
|
-
description: "The bulk operation ID to cancel (numeric ID or full GID).",
|
|
205670
|
-
env: "SHOPIFY_FLAG_ID",
|
|
205671
|
-
required: !0
|
|
205672
|
-
}),
|
|
205673
|
-
store: import_core5.Flags.string({
|
|
205674
|
-
char: "s",
|
|
205675
|
-
description: "The store domain. Must be an existing dev store.",
|
|
205676
|
-
env: "SHOPIFY_FLAG_STORE",
|
|
205677
|
-
parse: async (input) => normalizeStoreFqdn(input)
|
|
205678
|
-
})
|
|
205679
|
-
};
|
|
205680
|
-
var cancel_default = BulkCancel;
|
|
205681
|
-
|
|
205682
206187
|
// ../app/dist/cli/commands/app/bulk/status.js
|
|
205683
|
-
init_cjs_shims();
|
|
205684
206188
|
var import_core6 = __toESM(require_lib(), 1);
|
|
205685
206189
|
var _a3, BulkStatus = class extends AppLinkedCommand {
|
|
205686
206190
|
async run() {
|
|
@@ -205928,8 +206432,8 @@ var import_ignore2 = __toESM(require_ignore2(), 1), DEFAULT_DEBOUNCE_TIME_IN_MS
|
|
|
205928
206432
|
}
|
|
205929
206433
|
updateApp(app) {
|
|
205930
206434
|
this.app = app, this.extensionPaths = this.app.nonConfigExtensions.map((ext) => normalizePath(ext.directory)).filter((dir) => dir !== this.app.directory), this.extensionPaths.forEach((path) => {
|
|
205931
|
-
var
|
|
205932
|
-
(
|
|
206435
|
+
var _a50;
|
|
206436
|
+
(_a50 = this.ignored)[path] ?? (_a50[path] = this.createIgnoreInstance(path));
|
|
205933
206437
|
});
|
|
205934
206438
|
}
|
|
205935
206439
|
addAbortListener() {
|
|
@@ -206397,7 +206901,7 @@ async function brotliCompress(options) {
|
|
|
206397
206901
|
|
|
206398
206902
|
// ../app/dist/cli/services/bundle.js
|
|
206399
206903
|
import { writeFile as writeFile2 } from "fs/promises";
|
|
206400
|
-
var MEGABYTE = 1024 * 1024, MAX_BUNDLE_SIZE_MB = 100, MAX_BUNDLE_SIZE_BYTES = MAX_BUNDLE_SIZE_MB * MEGABYTE;
|
|
206904
|
+
var MEGABYTE = 1024 * 1024, MAX_BUNDLE_SIZE_MB = 100, MAX_BUNDLE_SIZE_BYTES = MAX_BUNDLE_SIZE_MB * MEGABYTE, UPLOAD_MAX_ATTEMPTS = 3, RETRYABLE_UPLOAD_STATUS_CODES = /* @__PURE__ */ new Set([408, 429, 500, 502, 503, 504]);
|
|
206401
206905
|
async function writeManifestToBundle(appManifest, bundlePath) {
|
|
206402
206906
|
let manifestPath = joinPath(bundlePath, "manifest.json");
|
|
206403
206907
|
await writeFile2(manifestPath, JSON.stringify(appManifest, null, 2));
|
|
@@ -206413,8 +206917,20 @@ async function uploadToGCS(signedURL, filePath) {
|
|
|
206413
206917
|
let humanSize = `${(Math.ceil(size / MEGABYTE * 100) / 100).toFixed(2)} MB`;
|
|
206414
206918
|
throw new AbortError(`Your app bundle exceeds the ${MAX_BUNDLE_SIZE_MB} MB upload limit (it is ${humanSize}).`, "Check the asset paths in your extension configuration \u2014 a misconfigured source can pull in much more than intended. Exclude large files or directories from your bundle, then try again.");
|
|
206415
206919
|
}
|
|
206416
|
-
let
|
|
206417
|
-
|
|
206920
|
+
let buffer = readFileSync(filePath), response;
|
|
206921
|
+
for (let attempt = 1; attempt <= UPLOAD_MAX_ATTEMPTS; attempt++) {
|
|
206922
|
+
if (response = await fetch2(signedURL, { method: "put", body: buffer }, "slow-request"), response.ok)
|
|
206923
|
+
return;
|
|
206924
|
+
let lastAttempt = attempt === UPLOAD_MAX_ATTEMPTS;
|
|
206925
|
+
if (RETRYABLE_UPLOAD_STATUS_CODES.has(response.status) && !lastAttempt) {
|
|
206926
|
+
await response.text().catch(() => {
|
|
206927
|
+
}), await sleep(2 ** attempt * 0.1);
|
|
206928
|
+
continue;
|
|
206929
|
+
}
|
|
206930
|
+
break;
|
|
206931
|
+
}
|
|
206932
|
+
let status = response?.status, responseBody = (await response?.text().catch(() => ""))?.trim();
|
|
206933
|
+
throw new AbortError(`Failed to upload your app bundle to storage${status ? ` (HTTP ${status})` : ""}.`, "This is usually transient. Please try again, and check your network connection if it persists.", responseBody ? [`Storage responded with: ${responseBody.slice(0, 300)}`] : void 0);
|
|
206418
206934
|
}
|
|
206419
206935
|
async function getUploadURL(developerPlatformClient, app) {
|
|
206420
206936
|
let result = await developerPlatformClient.generateSignedUploadUrl(app);
|
|
@@ -209196,9 +209712,142 @@ var configurationFileName = "shopify.theme.toml", timestampDateFormat = new Intl
|
|
|
209196
209712
|
"**/desktop.ini",
|
|
209197
209713
|
"**/config.yml",
|
|
209198
209714
|
"**/node_modules/",
|
|
209199
|
-
".prettierrc.json"
|
|
209715
|
+
".prettierrc.json",
|
|
209716
|
+
// Atomic-write temp files (e.g. blocks/foo.liquid.tmp.bar.baz)
|
|
209717
|
+
"**/{blocks,layout,snippets}/**/*.liquid.tmp.*",
|
|
209718
|
+
"**/{config,locales}/**/*.json.tmp.*",
|
|
209719
|
+
"**/{sections,templates}/**/*.{liquid,json}.tmp.*"
|
|
209200
209720
|
], MAX_GRAPHQL_THEME_FILES = 50;
|
|
209201
209721
|
|
|
209722
|
+
// ../cli-kit/dist/public/node/store-auth-session.js
|
|
209723
|
+
init_cjs_shims();
|
|
209724
|
+
|
|
209725
|
+
// ../cli-kit/dist/public/node/constants.js
|
|
209726
|
+
init_cjs_shims();
|
|
209727
|
+
var STORE_AUTH_APP_CLIENT_ID = "7e9cb568cfd431c538f36d1ad3f2b4f6";
|
|
209728
|
+
|
|
209729
|
+
// ../cli-kit/dist/public/node/store-auth-session.js
|
|
209730
|
+
var STORE_AUTH_PROJECT_NAME = "shopify-cli-store", EXPIRY_MARGIN_MS = 240 * 1e3, _storeAuthSessionStorage;
|
|
209731
|
+
function storeAuthSessionStorage() {
|
|
209732
|
+
return _storeAuthSessionStorage ?? (_storeAuthSessionStorage = new LocalStorage({ projectName: STORE_AUTH_PROJECT_NAME })), _storeAuthSessionStorage;
|
|
209733
|
+
}
|
|
209734
|
+
function storeAuthSessionKey(store) {
|
|
209735
|
+
return `${STORE_AUTH_APP_CLIENT_ID}::${escapeStoreAuthSessionKeySegment(store)}`;
|
|
209736
|
+
}
|
|
209737
|
+
function escapeStoreAuthSessionKeySegment(value) {
|
|
209738
|
+
return value.replace(/\\/g, "\\\\").replace(/\./g, "\\.");
|
|
209739
|
+
}
|
|
209740
|
+
function isString2(value) {
|
|
209741
|
+
return typeof value == "string";
|
|
209742
|
+
}
|
|
209743
|
+
function sanitizeAssociatedUser(value) {
|
|
209744
|
+
if (!value || typeof value != "object")
|
|
209745
|
+
return;
|
|
209746
|
+
let associatedUser = value;
|
|
209747
|
+
if (typeof associatedUser.id == "number")
|
|
209748
|
+
return {
|
|
209749
|
+
id: associatedUser.id,
|
|
209750
|
+
...isString2(associatedUser.email) ? { email: associatedUser.email } : {},
|
|
209751
|
+
...isString2(associatedUser.firstName) ? { firstName: associatedUser.firstName } : {},
|
|
209752
|
+
...isString2(associatedUser.lastName) ? { lastName: associatedUser.lastName } : {},
|
|
209753
|
+
...typeof associatedUser.accountOwner == "boolean" ? { accountOwner: associatedUser.accountOwner } : {}
|
|
209754
|
+
};
|
|
209755
|
+
}
|
|
209756
|
+
function sanitizePreviewMetadata(value) {
|
|
209757
|
+
if (!value || typeof value != "object")
|
|
209758
|
+
return;
|
|
209759
|
+
let metadata2 = value;
|
|
209760
|
+
if (!(!isString2(metadata2.shopId) || !isString2(metadata2.name) || !isString2(metadata2.createdAt)))
|
|
209761
|
+
return {
|
|
209762
|
+
shopId: metadata2.shopId,
|
|
209763
|
+
name: metadata2.name,
|
|
209764
|
+
createdAt: metadata2.createdAt,
|
|
209765
|
+
...isString2(metadata2.placeholderAccountUuid) ? { placeholderAccountUuid: metadata2.placeholderAccountUuid } : {},
|
|
209766
|
+
...isString2(metadata2.country) ? { country: metadata2.country } : {},
|
|
209767
|
+
...isString2(metadata2.accessUrl) ? { accessUrl: metadata2.accessUrl } : {}
|
|
209768
|
+
};
|
|
209769
|
+
}
|
|
209770
|
+
function sanitizeStoredStoreAppSession(value) {
|
|
209771
|
+
if (!value || typeof value != "object")
|
|
209772
|
+
return;
|
|
209773
|
+
let session = value;
|
|
209774
|
+
if (!isString2(session.store) || !isString2(session.clientId) || !isString2(session.userId) || !isString2(session.accessToken) || !Array.isArray(session.scopes) || !session.scopes.every(isString2) || !isString2(session.acquiredAt))
|
|
209775
|
+
return;
|
|
209776
|
+
let associatedUser = sanitizeAssociatedUser(session.associatedUser), kind = session.kind === "preview" ? "preview" : "standard", preview = kind === "preview" ? sanitizePreviewMetadata(session.preview) : void 0;
|
|
209777
|
+
if (!(kind === "preview" && !preview))
|
|
209778
|
+
return {
|
|
209779
|
+
store: session.store,
|
|
209780
|
+
clientId: session.clientId,
|
|
209781
|
+
userId: session.userId,
|
|
209782
|
+
accessToken: session.accessToken,
|
|
209783
|
+
scopes: session.scopes,
|
|
209784
|
+
acquiredAt: session.acquiredAt,
|
|
209785
|
+
...isString2(session.refreshToken) ? { refreshToken: session.refreshToken } : {},
|
|
209786
|
+
...isString2(session.expiresAt) ? { expiresAt: session.expiresAt } : {},
|
|
209787
|
+
...isString2(session.refreshTokenExpiresAt) ? { refreshTokenExpiresAt: session.refreshTokenExpiresAt } : {},
|
|
209788
|
+
...associatedUser ? { associatedUser } : {},
|
|
209789
|
+
...kind === "preview" ? { kind } : {},
|
|
209790
|
+
...preview ? { preview } : {}
|
|
209791
|
+
};
|
|
209792
|
+
}
|
|
209793
|
+
function sanitizeStoredStoreAppSessionBucket(store, storedBucket, storage) {
|
|
209794
|
+
if (!storedBucket || typeof storedBucket != "object")
|
|
209795
|
+
return;
|
|
209796
|
+
let { sessionsByUserId, currentUserId } = storedBucket;
|
|
209797
|
+
if (!(sessionsByUserId !== void 0 || currentUserId !== void 0))
|
|
209798
|
+
return;
|
|
209799
|
+
let key = storeAuthSessionKey(store);
|
|
209800
|
+
if (!sessionsByUserId || typeof sessionsByUserId != "object" || Array.isArray(sessionsByUserId) || typeof currentUserId != "string") {
|
|
209801
|
+
storage.delete(key);
|
|
209802
|
+
return;
|
|
209803
|
+
}
|
|
209804
|
+
let sanitizedSessionsByUserId = Object.fromEntries(Object.entries(sessionsByUserId).flatMap(([userId, session]) => {
|
|
209805
|
+
let sanitizedSession = sanitizeStoredStoreAppSession(session);
|
|
209806
|
+
return sanitizedSession ? [[userId, sanitizedSession]] : [];
|
|
209807
|
+
}));
|
|
209808
|
+
if (Object.keys(sanitizedSessionsByUserId).length !== Object.keys(sessionsByUserId).length)
|
|
209809
|
+
if (sanitizedSessionsByUserId[currentUserId])
|
|
209810
|
+
storage.set(key, {
|
|
209811
|
+
currentUserId,
|
|
209812
|
+
sessionsByUserId: sanitizedSessionsByUserId
|
|
209813
|
+
});
|
|
209814
|
+
else {
|
|
209815
|
+
storage.delete(key);
|
|
209816
|
+
return;
|
|
209817
|
+
}
|
|
209818
|
+
return {
|
|
209819
|
+
currentUserId,
|
|
209820
|
+
sessionsByUserId: sanitizedSessionsByUserId
|
|
209821
|
+
};
|
|
209822
|
+
}
|
|
209823
|
+
function readStoredStoreAppSessionBucket(store, storage) {
|
|
209824
|
+
return sanitizeStoredStoreAppSessionBucket(store, storage.get(storeAuthSessionKey(store)), storage);
|
|
209825
|
+
}
|
|
209826
|
+
function readRawStoreAuthSessionStorage(storage) {
|
|
209827
|
+
return storage.config?.store ?? {};
|
|
209828
|
+
}
|
|
209829
|
+
function listCurrentStoredStoreAppSessions(storage = storeAuthSessionStorage()) {
|
|
209830
|
+
let sessions = [], keyPrefix = `${STORE_AUTH_APP_CLIENT_ID}::`;
|
|
209831
|
+
for (let [key, value] of Object.entries(readRawStoreAuthSessionStorage(storage))) {
|
|
209832
|
+
if (!key.startsWith(keyPrefix))
|
|
209833
|
+
continue;
|
|
209834
|
+
let bucket = sanitizeStoredStoreAppSessionBucket(key.slice(keyPrefix.length), value, storage), session = bucket?.sessionsByUserId[bucket.currentUserId];
|
|
209835
|
+
session && sessions.push(session);
|
|
209836
|
+
}
|
|
209837
|
+
return sessions;
|
|
209838
|
+
}
|
|
209839
|
+
function getCurrentStoredStoreAppSession(store, storage = storeAuthSessionStorage()) {
|
|
209840
|
+
let storeFqdn = normalizeStoreFqdn(store), bucket = readStoredStoreAppSessionBucket(storeFqdn, storage);
|
|
209841
|
+
if (!bucket)
|
|
209842
|
+
return;
|
|
209843
|
+
let session = bucket.sessionsByUserId[bucket.currentUserId];
|
|
209844
|
+
if (!session) {
|
|
209845
|
+
storage.delete(storeAuthSessionKey(storeFqdn));
|
|
209846
|
+
return;
|
|
209847
|
+
}
|
|
209848
|
+
return session;
|
|
209849
|
+
}
|
|
209850
|
+
|
|
209202
209851
|
// ../theme/dist/cli/utilities/theme-command.js
|
|
209203
209852
|
var ThemeCommand = class extends base_command_default {
|
|
209204
209853
|
environmentsFilename() {
|
|
@@ -209233,6 +209882,9 @@ var ThemeCommand = class extends base_command_default {
|
|
|
209233
209882
|
let environmentsMap = await this.loadEnvironments(environments, flags, flagsWithoutDefaults), validationResults = await this.validateEnvironments(environmentsMap, requiredFlags, commandRequiresAuth);
|
|
209234
209883
|
"force" in klass.flags && !flags.force && !await this.showConfirmation(this.constructor.name, requiredFlags, validationResults) || await this.runConcurrent(validationResults.valid);
|
|
209235
209884
|
}
|
|
209885
|
+
storeAuthScopes() {
|
|
209886
|
+
return [];
|
|
209887
|
+
}
|
|
209236
209888
|
/**
|
|
209237
209889
|
* Create a map of environments from the shopify.theme.toml file
|
|
209238
209890
|
* @param environments - Names of environments to load
|
|
@@ -209267,15 +209919,20 @@ var ThemeCommand = class extends base_command_default {
|
|
|
209267
209919
|
* @returns An object containing valid and invalid environment arrays
|
|
209268
209920
|
*/
|
|
209269
209921
|
async validateEnvironments(environmentMap, requiredFlags, requiresAuth) {
|
|
209270
|
-
let valid = [], invalid = []
|
|
209271
|
-
|
|
209272
|
-
|
|
209922
|
+
let valid = [], invalid = [], storeAuthSessionsByStore = requiresAuth ? this.storeAuthSessionsForTheme(Array.from(environmentMap.values()).map(({ validationFlags }) => validationFlags)) : /* @__PURE__ */ new Map(), entriesWithStoreAuthSessions = Array.from(environmentMap.entries()).map(([environmentName, { flags, validationFlags }]) => ({
|
|
209923
|
+
environmentName,
|
|
209924
|
+
flags,
|
|
209925
|
+
validationFlags,
|
|
209926
|
+
storeAuthSession: this.storeAuthSessionFromCache(validationFlags, storeAuthSessionsByStore)
|
|
209927
|
+
}));
|
|
209928
|
+
for (let { environmentName, flags, validationFlags, storeAuthSession } of entriesWithStoreAuthSessions) {
|
|
209929
|
+
let validationResult = this.validConfig(validationFlags, requiredFlags, environmentName, storeAuthSession);
|
|
209273
209930
|
if (validationResult !== !0) {
|
|
209274
209931
|
let missingFlagsText = validationResult.join(", ");
|
|
209275
209932
|
invalid.push({ environment: environmentName, reason: `Missing flags: ${missingFlagsText}` });
|
|
209276
209933
|
continue;
|
|
209277
209934
|
}
|
|
209278
|
-
valid.push({ environment: environmentName, flags, requiresAuth });
|
|
209935
|
+
valid.push({ environment: environmentName, flags, requiresAuth, storeAuthSession });
|
|
209279
209936
|
}
|
|
209280
209937
|
return { valid, invalid };
|
|
209281
209938
|
}
|
|
@@ -209320,13 +209977,13 @@ var ThemeCommand = class extends base_command_default {
|
|
|
209320
209977
|
let abortController = new AbortController2(), stores = validEnvironments.map((env) => env.flags.store), uniqueStores = new Set(stores), runGroups = stores.length === uniqueStores.size ? [validEnvironments] : this.createSequentialGroups(validEnvironments);
|
|
209321
209978
|
for (let runGroup of runGroups)
|
|
209322
209979
|
await renderConcurrent({
|
|
209323
|
-
processes: runGroup.map(({ environment, flags, requiresAuth }) => ({
|
|
209980
|
+
processes: runGroup.map(({ environment, flags, requiresAuth, storeAuthSession }) => ({
|
|
209324
209981
|
prefix: environment,
|
|
209325
209982
|
action: async (stdout, stderr, _signal) => {
|
|
209326
209983
|
try {
|
|
209327
209984
|
let store = flags.store;
|
|
209328
209985
|
await useThemeStoreContext(store, async () => {
|
|
209329
|
-
let session = requiresAuth ? await this.createSession(flags) : void 0, commandName = this.constructor.name.toLowerCase();
|
|
209986
|
+
let session = requiresAuth ? await this.createSession(flags, storeAuthSession) : void 0, commandName = this.constructor.name.toLowerCase();
|
|
209330
209987
|
recordEvent(`theme-command:${commandName}:multi-env:authenticated`);
|
|
209331
209988
|
try {
|
|
209332
209989
|
await this.command(flags, session, !0, {}, { stdout, stderr });
|
|
@@ -209364,9 +210021,53 @@ ${error.message}`, renderError({ body: [error.message] }));
|
|
|
209364
210021
|
* @param flags - The environment flags containing store and password
|
|
209365
210022
|
* @returns The unauthenticated session object
|
|
209366
210023
|
*/
|
|
209367
|
-
async createSession(flags) {
|
|
209368
|
-
let store = flags.store, password = flags.password;
|
|
209369
|
-
return await ensureAuthenticatedThemes(
|
|
210024
|
+
async createSession(flags, storeAuthSession) {
|
|
210025
|
+
let store = ensureThemeStore({ store: flags.store }), password = flags.password;
|
|
210026
|
+
return password ? await ensureAuthenticatedThemes(store, password) : storeAuthSession ?? await this.storeAuthSessionForTheme({ store }) ?? await ensureAuthenticatedThemes(store, password);
|
|
210027
|
+
}
|
|
210028
|
+
async storeAuthSessionForTheme(flags) {
|
|
210029
|
+
let store = typeof flags.store == "string" ? flags.store : void 0, password = flags.password;
|
|
210030
|
+
if (!store || password)
|
|
210031
|
+
return;
|
|
210032
|
+
let storeFqdn = normalizeStoreFqdn(store), storedSession = getCurrentStoredStoreAppSession(storeFqdn);
|
|
210033
|
+
if (storedSession)
|
|
210034
|
+
return this.adminSessionFromStoreAuthSession(storedSession, storeFqdn);
|
|
210035
|
+
}
|
|
210036
|
+
storeAuthSessionsForTheme(flagsList) {
|
|
210037
|
+
let stores = new Set(flagsList.filter(({ store, password }) => typeof store == "string" && !password).map(({ store }) => normalizeStoreFqdn(store)));
|
|
210038
|
+
return stores.size === 0 ? /* @__PURE__ */ new Map() : new Map(listCurrentStoredStoreAppSessions().map((storedSession) => {
|
|
210039
|
+
let storeFqdn = normalizeStoreFqdn(storedSession.store);
|
|
210040
|
+
if (!stores.has(storeFqdn))
|
|
210041
|
+
return;
|
|
210042
|
+
let session = this.adminSessionFromStoreAuthSession(storedSession, storeFqdn);
|
|
210043
|
+
return session ? [storeFqdn, session] : void 0;
|
|
210044
|
+
}).filter((entry) => entry !== void 0));
|
|
210045
|
+
}
|
|
210046
|
+
storeAuthSessionFromCache(flags, storeAuthSessionsByStore) {
|
|
210047
|
+
let store = typeof flags.store == "string" ? flags.store : void 0, password = flags.password;
|
|
210048
|
+
if (!(!store || password))
|
|
210049
|
+
return storeAuthSessionsByStore.get(normalizeStoreFqdn(store));
|
|
210050
|
+
}
|
|
210051
|
+
adminSessionFromStoreAuthSession(storedSession, storeFqdn) {
|
|
210052
|
+
if (this.hasRequiredStoreAuthScopes(storedSession.scopes))
|
|
210053
|
+
return setLastSeenUserId(storedSession.userId), {
|
|
210054
|
+
token: storedSession.accessToken,
|
|
210055
|
+
storeFqdn
|
|
210056
|
+
};
|
|
210057
|
+
}
|
|
210058
|
+
expandImpliedStoreAuthScopes(scopes) {
|
|
210059
|
+
let expandedScopes = new Set(scopes);
|
|
210060
|
+
for (let scope of scopes) {
|
|
210061
|
+
let matches2 = scope.match(/^(unauthenticated_)?write_(.*)$/);
|
|
210062
|
+
matches2 && expandedScopes.add(`${matches2[1] ?? ""}read_${matches2[2]}`);
|
|
210063
|
+
}
|
|
210064
|
+
return expandedScopes;
|
|
210065
|
+
}
|
|
210066
|
+
hasRequiredStoreAuthScopes(scopes) {
|
|
210067
|
+
if (scopes.length === 0)
|
|
210068
|
+
return !0;
|
|
210069
|
+
let expandedScopes = this.expandImpliedStoreAuthScopes(scopes);
|
|
210070
|
+
return this.storeAuthScopes().every((scope) => expandedScopes.has(scope));
|
|
209370
210071
|
}
|
|
209371
210072
|
/**
|
|
209372
210073
|
* Ensure that all required flags are present
|
|
@@ -209375,8 +210076,8 @@ ${error.message}`, renderError({ body: [error.message] }));
|
|
|
209375
210076
|
* @param environmentName - The name of the environment
|
|
209376
210077
|
* @returns The missing flags or true if the environment has all required flags
|
|
209377
210078
|
*/
|
|
209378
|
-
validConfig(environmentFlags, requiredFlags, environmentName) {
|
|
209379
|
-
let missingFlags = requiredFlags.filter((flag) => Array.isArray(flag) ? !flag.some((flag2) => environmentFlags
|
|
210079
|
+
validConfig(environmentFlags, requiredFlags, environmentName, storeAuthSession) {
|
|
210080
|
+
let missingFlags = requiredFlags.filter((flag) => Array.isArray(flag) ? !flag.some((flag2) => this.hasRequiredFlag(environmentFlags, flag2, storeAuthSession)) : !this.hasRequiredFlag(environmentFlags, flag, storeAuthSession)).map((flag) => Array.isArray(flag) ? flag.join(" or ") : flag);
|
|
209380
210081
|
return missingFlags.length > 0 ? (renderWarning({
|
|
209381
210082
|
body: [
|
|
209382
210083
|
`Missing required flags in environment configuration${environmentName ? ` for ${environmentName}` : ""}:`,
|
|
@@ -209384,6 +210085,9 @@ ${error.message}`, renderError({ body: [error.message] }));
|
|
|
209384
210085
|
]
|
|
209385
210086
|
}), missingFlags) : !0;
|
|
209386
210087
|
}
|
|
210088
|
+
hasRequiredFlag(environmentFlags, flag, storeAuthSession) {
|
|
210089
|
+
return flag === "password" && storeAuthSession ? !0 : !!environmentFlags[flag];
|
|
210090
|
+
}
|
|
209387
210091
|
/**
|
|
209388
210092
|
* Error if the --path flag is provided via CLI when running a multi environment command
|
|
209389
210093
|
* Commands that act on local files require each environment to specify its own path in the shopify.theme.toml
|
|
@@ -209749,14 +210453,15 @@ var ShopifyEssentialError = class extends AbortError {
|
|
|
209749
210453
|
async function isStorefrontPasswordProtected(session) {
|
|
209750
210454
|
return passwordProtected(session);
|
|
209751
210455
|
}
|
|
209752
|
-
async function isStorefrontPasswordCorrect(password, store) {
|
|
210456
|
+
async function isStorefrontPasswordCorrect(password, store, crawlerSignatureHeaders) {
|
|
209753
210457
|
let storeUrl = prependHttps(store), params = new URLSearchParams();
|
|
209754
210458
|
params.append("form_type", "storefront_password"), params.append("utf8", "\u2713"), params.append("password", password ?? ""), recordEvent("theme-service:storefront-session:check-storefront-password");
|
|
209755
|
-
let
|
|
209756
|
-
|
|
209757
|
-
|
|
209758
|
-
|
|
209759
|
-
|
|
210459
|
+
let requestHeaders = {
|
|
210460
|
+
"cache-control": "no-cache",
|
|
210461
|
+
"content-type": "application/x-www-form-urlencoded",
|
|
210462
|
+
...crawlerSignatureHeaders
|
|
210463
|
+
}, response = await shopifyFetch(`${storeUrl}/password`, {
|
|
210464
|
+
headers: requestHeaders,
|
|
209760
210465
|
body: params.toString(),
|
|
209761
210466
|
method: "POST",
|
|
209762
210467
|
redirect: "manual"
|
|
@@ -209779,13 +210484,13 @@ async function sessionEssentialCookie(storeUrl, themeId, headers, retries = 1) {
|
|
|
209779
210484
|
pb: "0"
|
|
209780
210485
|
}), url = `${storeUrl}?${params}`;
|
|
209781
210486
|
recordEvent("theme-service:storefront-session:get-session-essential-cookie");
|
|
209782
|
-
let
|
|
210487
|
+
let requestHeaders = {
|
|
210488
|
+
...headers,
|
|
210489
|
+
...defaultHeaders()
|
|
210490
|
+
}, response = await shopifyFetch(url, {
|
|
209783
210491
|
method: "HEAD",
|
|
209784
210492
|
redirect: "manual",
|
|
209785
|
-
headers:
|
|
209786
|
-
...headers,
|
|
209787
|
-
...defaultHeaders()
|
|
209788
|
-
}
|
|
210493
|
+
headers: requestHeaders
|
|
209789
210494
|
}), setCookies = response.headers.raw()["set-cookie"] ?? [], shopifyEssential = getCookie(setCookies, "_shopify_essential");
|
|
209790
210495
|
if (!shopifyEssential) {
|
|
209791
210496
|
if (outputDebug(`Failed to obtain _shopify_essential cookie.
|
|
@@ -209802,15 +210507,15 @@ async function sessionEssentialCookie(storeUrl, themeId, headers, retries = 1) {
|
|
|
209802
210507
|
return shopifyEssential;
|
|
209803
210508
|
}
|
|
209804
210509
|
async function enrichSessionWithStorefrontPassword(shopifyEssential, storeUrl, storeOrigin, password, headers) {
|
|
209805
|
-
let params = new URLSearchParams({ password }),
|
|
210510
|
+
let params = new URLSearchParams({ password }), requestHeaders = {
|
|
210511
|
+
...headers,
|
|
210512
|
+
...defaultHeaders(),
|
|
210513
|
+
Cookie: serializeCookies({ _shopify_essential: shopifyEssential })
|
|
210514
|
+
}, response = await shopifyFetch(`${storeUrl}/password`, {
|
|
209806
210515
|
method: "POST",
|
|
209807
210516
|
redirect: "manual",
|
|
209808
210517
|
body: params,
|
|
209809
|
-
headers:
|
|
209810
|
-
...headers,
|
|
209811
|
-
...defaultHeaders(),
|
|
209812
|
-
Cookie: serializeCookies({ _shopify_essential: shopifyEssential })
|
|
209813
|
-
}
|
|
210518
|
+
headers: requestHeaders
|
|
209814
210519
|
});
|
|
209815
210520
|
if (!redirectsToStorefront(response, storeOrigin))
|
|
209816
210521
|
throw recordError(new AbortError("Your development session could not be created because the store password is invalid. Please, retry with a different password."));
|
|
@@ -209900,7 +210605,7 @@ function storePasswordPage(store) {
|
|
|
209900
210605
|
}
|
|
209901
210606
|
|
|
209902
210607
|
// ../theme/dist/cli/utilities/theme-environment/storefront-password-prompt.js
|
|
209903
|
-
async function ensureValidPassword(password, store) {
|
|
210608
|
+
async function ensureValidPassword(password, store, crawlerSignatureHeaders) {
|
|
209904
210609
|
getThemeStore() || ensureThemeStore({ store });
|
|
209905
210610
|
let finalPassword = password ?? getStorefrontPassword() ?? await promptPassword([
|
|
209906
210611
|
"Enter your",
|
|
@@ -209911,7 +210616,7 @@ async function ensureValidPassword(password, store) {
|
|
|
209911
210616
|
}
|
|
209912
210617
|
}
|
|
209913
210618
|
]), isPasswordRemoved = !1;
|
|
209914
|
-
for (; !await isStorefrontPasswordCorrect(finalPassword, store); )
|
|
210619
|
+
for (; !await isStorefrontPasswordCorrect(finalPassword, store, crawlerSignatureHeaders); )
|
|
209915
210620
|
isPasswordRemoved || (removeStorefrontPassword(), isPasswordRemoved = !0), finalPassword = await promptPassword([
|
|
209916
210621
|
"Incorrect",
|
|
209917
210622
|
{
|
|
@@ -211405,7 +212110,10 @@ URL: ${error.data.url}`);
|
|
|
211405
212110
|
|
|
211406
212111
|
// ../theme/dist/cli/utilities/theme-environment/storefront-renderer.js
|
|
211407
212112
|
async function render2(session, context) {
|
|
211408
|
-
let url = buildStorefrontUrl(session, context),
|
|
212113
|
+
let url = buildStorefrontUrl(session, context), requestHeaders = {
|
|
212114
|
+
...await buildHeaders2(session, context),
|
|
212115
|
+
...defaultHeaders()
|
|
212116
|
+
}, response, replaceTemplates = Object.keys({ ...context.replaceTemplates, ...context.replaceExtensionTemplates });
|
|
211409
212117
|
if (replaceTemplates.length > 0) {
|
|
211410
212118
|
outputDebug(`\u2192 Rendering ${url} (with ${replaceTemplates})...`);
|
|
211411
212119
|
let bodyParams = storefrontReplaceTemplatesParams(context);
|
|
@@ -211413,10 +212121,7 @@ async function render2(session, context) {
|
|
|
211413
212121
|
method: "POST",
|
|
211414
212122
|
body: bodyParams,
|
|
211415
212123
|
redirect: "manual",
|
|
211416
|
-
headers:
|
|
211417
|
-
...headers,
|
|
211418
|
-
...defaultHeaders()
|
|
211419
|
-
}
|
|
212124
|
+
headers: requestHeaders
|
|
211420
212125
|
}).catch((error) => {
|
|
211421
212126
|
throw createFetchError(recordError(error), url);
|
|
211422
212127
|
});
|
|
@@ -211424,10 +212129,7 @@ async function render2(session, context) {
|
|
|
211424
212129
|
outputDebug(`\u2192 Rendering ${url}...`), response = await fetch(url, {
|
|
211425
212130
|
method: context.method,
|
|
211426
212131
|
redirect: "manual",
|
|
211427
|
-
headers:
|
|
211428
|
-
...headers,
|
|
211429
|
-
...defaultHeaders()
|
|
211430
|
-
}
|
|
212132
|
+
headers: requestHeaders
|
|
211431
212133
|
}).catch((error) => {
|
|
211432
212134
|
throw createFetchError(recordError(error), url);
|
|
211433
212135
|
});
|
|
@@ -211443,6 +212145,7 @@ async function buildStandardHeaders(session, context) {
|
|
|
211443
212145
|
let cookies = await buildCookies(session, context), storefrontToken = session.storefrontToken;
|
|
211444
212146
|
return cleanHeader({
|
|
211445
212147
|
...context.headers,
|
|
212148
|
+
...session.crawlerSignatureHeaders,
|
|
211446
212149
|
Authorization: `Bearer ${storefrontToken}`,
|
|
211447
212150
|
Cookie: cookies
|
|
211448
212151
|
});
|
|
@@ -211454,6 +212157,7 @@ async function buildThemeAccessHeaders(session, context) {
|
|
|
211454
212157
|
return cleanHeader({
|
|
211455
212158
|
...filteredHeaders,
|
|
211456
212159
|
...themeAccessHeaders2(session),
|
|
212160
|
+
...session.crawlerSignatureHeaders,
|
|
211457
212161
|
Authorization: `Bearer ${storefrontToken}`,
|
|
211458
212162
|
Cookie: cookies
|
|
211459
212163
|
});
|
|
@@ -211642,34 +212346,129 @@ function hasDelimiter(input) {
|
|
|
211642
212346
|
|
|
211643
212347
|
// ../theme/dist/cli/utilities/theme-environment/dev-server-session.js
|
|
211644
212348
|
init_cjs_shims();
|
|
212349
|
+
|
|
212350
|
+
// ../theme/dist/cli/utilities/theme-environment/crawler-signature.js
|
|
212351
|
+
init_cjs_shims();
|
|
212352
|
+
var CRAWLER_SIGNATURE_NAME = "Shopify CLI", CRAWLER_SIGNATURE_TTL_SECONDS = 720 * 60 * 60, CRAWLER_SIGNATURE_HEADER_NAMES = ["Signature", "Signature-Input", "Signature-Agent"], ADMIN_API_VERSION = "unstable", STOREFRONT_CRAWLER_SIGNATURES_QUERY = `
|
|
212353
|
+
query StorefrontCrawlerSignatures($first: Int!, $expired: Boolean, $cli: Boolean, $domain: String) {
|
|
212354
|
+
storefrontCrawlerSignatures(first: $first, expired: $expired, cli: $cli, domain: $domain) {
|
|
212355
|
+
edges {
|
|
212356
|
+
node {
|
|
212357
|
+
id
|
|
212358
|
+
name
|
|
212359
|
+
domainHost
|
|
212360
|
+
signature
|
|
212361
|
+
signatureInput
|
|
212362
|
+
signatureAgent
|
|
212363
|
+
expiresAt
|
|
212364
|
+
}
|
|
212365
|
+
}
|
|
212366
|
+
}
|
|
212367
|
+
}
|
|
212368
|
+
`, STOREFRONT_CRAWLER_SIGNATURE_GENERATE_MUTATION = `
|
|
212369
|
+
mutation StorefrontCrawlerSignatureGenerate($timeToLive: Int!, $name: String!, $domainHost: String!, $cli: Boolean) {
|
|
212370
|
+
storefrontCrawlerSignatureGenerate(timeToLive: $timeToLive, name: $name, domainHost: $domainHost, cli: $cli) {
|
|
212371
|
+
id
|
|
212372
|
+
signature
|
|
212373
|
+
signatureInput
|
|
212374
|
+
signatureAgent
|
|
212375
|
+
name
|
|
212376
|
+
expiresAt
|
|
212377
|
+
domainHost
|
|
212378
|
+
userErrors {
|
|
212379
|
+
field
|
|
212380
|
+
message
|
|
212381
|
+
code
|
|
212382
|
+
}
|
|
212383
|
+
}
|
|
212384
|
+
}
|
|
212385
|
+
`;
|
|
212386
|
+
async function fetchOrCreateCrawlerSignatureHeaders(adminSession, domainHost = adminSession.storeFqdn) {
|
|
212387
|
+
try {
|
|
212388
|
+
let connection = (await adminRequest(STOREFRONT_CRAWLER_SIGNATURES_QUERY, adminSession, {
|
|
212389
|
+
first: 1,
|
|
212390
|
+
expired: !1,
|
|
212391
|
+
cli: !0,
|
|
212392
|
+
domain: domainHost
|
|
212393
|
+
}, ADMIN_API_VERSION)).storefrontCrawlerSignatures;
|
|
212394
|
+
if (!connection)
|
|
212395
|
+
throw recordError(new AbortError("Could not fetch Shopify CLI crawler signatures."));
|
|
212396
|
+
let existingSignature = connection.edges[0]?.node;
|
|
212397
|
+
if (existingSignature) {
|
|
212398
|
+
recordEvent("theme-service:crawler-signature:reused");
|
|
212399
|
+
let headers2 = crawlerSignatureHeadersFromSignature(existingSignature);
|
|
212400
|
+
return outputDebug(`Reusing crawler signature "${CRAWLER_SIGNATURE_NAME}" for ${existingSignature.domainHost} (${crawlerSignatureHeaderDebugSummary(headers2)}).`), headers2;
|
|
212401
|
+
}
|
|
212402
|
+
let createdSignature = (await adminRequest(STOREFRONT_CRAWLER_SIGNATURE_GENERATE_MUTATION, adminSession, {
|
|
212403
|
+
timeToLive: CRAWLER_SIGNATURE_TTL_SECONDS,
|
|
212404
|
+
name: CRAWLER_SIGNATURE_NAME,
|
|
212405
|
+
domainHost,
|
|
212406
|
+
cli: !0
|
|
212407
|
+
}, ADMIN_API_VERSION)).storefrontCrawlerSignatureGenerate;
|
|
212408
|
+
if (!createdSignature)
|
|
212409
|
+
throw recordError(new AbortError("Could not create a Shopify CLI crawler signature."));
|
|
212410
|
+
if (createdSignature.userErrors.length > 0) {
|
|
212411
|
+
let userErrorMessages = createdSignature.userErrors.map((error) => {
|
|
212412
|
+
let field = error.field?.join(".");
|
|
212413
|
+
return field ? `${field}: ${error.message}` : error.message;
|
|
212414
|
+
}).join(`
|
|
212415
|
+
`);
|
|
212416
|
+
throw recordError(new AbortError("Could not create a Shopify CLI crawler signature.", userErrorMessages));
|
|
212417
|
+
}
|
|
212418
|
+
recordEvent("theme-service:crawler-signature:created");
|
|
212419
|
+
let headers = crawlerSignatureHeadersFromSignature(createdSignature);
|
|
212420
|
+
return outputDebug(`Created crawler signature "${CRAWLER_SIGNATURE_NAME}" for ${createdSignature.domainHost} expiring at ${createdSignature.expiresAt} (${crawlerSignatureHeaderDebugSummary(headers)}).`), headers;
|
|
212421
|
+
} catch (error) {
|
|
212422
|
+
let message = error instanceof Error ? error.message : String(error);
|
|
212423
|
+
outputDebug(`Could not obtain crawler signature headers; continuing without them. ${message}`);
|
|
212424
|
+
return;
|
|
212425
|
+
}
|
|
212426
|
+
}
|
|
212427
|
+
function crawlerSignatureHeaderDebugSummary(headers) {
|
|
212428
|
+
let headerNames = Object.keys(headers), present = CRAWLER_SIGNATURE_HEADER_NAMES.filter((crawlerHeaderName) => headerNames.some((headerName) => headerName.toLowerCase() === crawlerHeaderName.toLowerCase())), missing = CRAWLER_SIGNATURE_HEADER_NAMES.filter((crawlerHeaderName) => !present.includes(crawlerHeaderName));
|
|
212429
|
+
return `present: ${present.join(", ") || "none"}; missing: ${missing.join(", ") || "none"}`;
|
|
212430
|
+
}
|
|
212431
|
+
function crawlerSignatureHeadersFromSignature(signature) {
|
|
212432
|
+
if (!signature.signature || !signature.signatureInput || !signature.signatureAgent)
|
|
212433
|
+
throw recordError(new AbortError("The Shopify CLI crawler signature response did not include all required headers."));
|
|
212434
|
+
return {
|
|
212435
|
+
Signature: signature.signature,
|
|
212436
|
+
"Signature-Input": signature.signatureInput,
|
|
212437
|
+
"Signature-Agent": signature.signatureAgent
|
|
212438
|
+
};
|
|
212439
|
+
}
|
|
212440
|
+
|
|
212441
|
+
// ../theme/dist/cli/utilities/theme-environment/dev-server-session.js
|
|
211645
212442
|
var SESSION_TIMEOUT_IN_MS = 1800 * 1e3, REQUIRED_THEME_FILES = ["layout/theme.liquid", "config/settings_schema.json"];
|
|
211646
|
-
async function initializeDevServerSession(themeId, adminSession, adminPassword, storefrontPassword) {
|
|
211647
|
-
let session = await fetchDevServerSession(themeId, adminSession, adminPassword, storefrontPassword);
|
|
212443
|
+
async function initializeDevServerSession(themeId, adminSession, adminPassword, storefrontPassword, crawlerSignatureHeaders) {
|
|
212444
|
+
let session = await fetchDevServerSession(themeId, adminSession, adminPassword, storefrontPassword, crawlerSignatureHeaders);
|
|
211648
212445
|
return session.refresh = async () => {
|
|
211649
212446
|
outputDebug("Refreshing theme session...");
|
|
211650
|
-
let newSession = await fetchDevServerSession(themeId, adminSession, adminPassword, storefrontPassword);
|
|
212447
|
+
let newSession = await fetchDevServerSession(themeId, adminSession, adminPassword, storefrontPassword, session.crawlerSignatureHeaders);
|
|
211651
212448
|
return recordEvent("theme-service:session:refreshed"), Object.assign(session, newSession), newSession;
|
|
211652
212449
|
}, setInterval(() => {
|
|
211653
212450
|
session.refresh && session.refresh().then(() => outputDebug("Refreshed theme session via auto-refresher...")).catch(() => outputDebug("Session could not be refreshed."));
|
|
211654
212451
|
}, SESSION_TIMEOUT_IN_MS), session;
|
|
211655
212452
|
}
|
|
211656
|
-
async function fetchDevServerSession(themeId, adminSession, adminPassword, storefrontPassword) {
|
|
211657
|
-
let baseUrl = buildBaseStorefrontUrl(adminSession), session = await ensureAuthenticatedThemes(adminSession.storeFqdn, adminPassword, [], {
|
|
212453
|
+
async function fetchDevServerSession(themeId, adminSession, adminPassword, storefrontPassword, crawlerSignatureHeaders) {
|
|
212454
|
+
let baseUrl = buildBaseStorefrontUrl(adminSession), sessionCrawlerSignatureHeaders = crawlerSignatureHeaders ?? await fetchOrCreateCrawlerSignatureHeaders(adminSession), session = await ensureAuthenticatedThemes(adminSession.storeFqdn, adminPassword, [], {
|
|
211658
212455
|
forceRefresh: !1,
|
|
211659
212456
|
noPrompt: !0
|
|
211660
|
-
}), storefrontToken = await ensureAuthenticatedStorefront([], adminPassword, { forceRefresh: !1, noPrompt: !0 }), sessionCookies = await getStorefrontSessionCookiesWithVerification(baseUrl, themeId, adminSession, storefrontToken, storefrontPassword);
|
|
212457
|
+
}), storefrontToken = await ensureAuthenticatedStorefront([], adminPassword, { forceRefresh: !1, noPrompt: !0 }), sessionCookies = await getStorefrontSessionCookiesWithVerification(baseUrl, themeId, adminSession, storefrontToken, storefrontPassword, sessionCrawlerSignatureHeaders);
|
|
211661
212458
|
return {
|
|
211662
212459
|
...session,
|
|
211663
212460
|
sessionCookies,
|
|
211664
|
-
storefrontToken
|
|
212461
|
+
storefrontToken,
|
|
212462
|
+
crawlerSignatureHeaders: sessionCrawlerSignatureHeaders
|
|
211665
212463
|
};
|
|
211666
212464
|
}
|
|
211667
|
-
async function getStorefrontSessionCookiesWithVerification(storeUrl, themeId, adminSession, storefrontToken, storefrontPassword) {
|
|
212465
|
+
async function getStorefrontSessionCookiesWithVerification(storeUrl, themeId, adminSession, storefrontToken, storefrontPassword, crawlerSignatureHeaders) {
|
|
211668
212466
|
try {
|
|
211669
212467
|
return await getStorefrontSessionCookies(storeUrl, adminSession.storeFqdn, themeId, storefrontPassword, {
|
|
211670
212468
|
"X-Shopify-Shop": adminSession.storeFqdn,
|
|
211671
212469
|
"X-Shopify-Access-Token": adminSession.token,
|
|
211672
|
-
Authorization: `Bearer ${storefrontToken}
|
|
212470
|
+
Authorization: `Bearer ${storefrontToken}`,
|
|
212471
|
+
...crawlerSignatureHeaders
|
|
211673
212472
|
});
|
|
211674
212473
|
} catch (error) {
|
|
211675
212474
|
throw error instanceof ShopifyEssentialError && await abortOnMissingRequiredFile(themeId, adminSession), error;
|
|
@@ -212868,6 +213667,7 @@ function proxyStorefrontRequest(event, ctx) {
|
|
|
212868
213667
|
return isPassthroughRequest(event) || (/\/assets\/[^/]+\.(css|js)$/.test(url.pathname) && /\?\d+$/.test(url.search) && (url.search = `?v=${Date.now()}`), url.searchParams.set("_fd", "0"), url.searchParams.set("pb", "0"), headers = cleanHeader({
|
|
212869
213668
|
...headers,
|
|
212870
213669
|
...defaultHeaders(),
|
|
213670
|
+
...host === ctx.session.storeFqdn ? ctx.session.crawlerSignatureHeaders : {},
|
|
212871
213671
|
referer: url.origin,
|
|
212872
213672
|
Cookie: buildCookies(ctx.session, { headers }),
|
|
212873
213673
|
// Only include Authorization for theme dev, not theme-extensions
|
|
@@ -213229,9 +214029,9 @@ function createDevelopmentExtensionServer(theme, ctx) {
|
|
|
213229
214029
|
};
|
|
213230
214030
|
}
|
|
213231
214031
|
async function contextDevServerContext(theme, extensionContext) {
|
|
213232
|
-
let { adminSession, storefrontPassword, themeExtensionPort, themeExtensionDirectory: directory } = extensionContext, host = "127.0.0.1", port = themeExtensionPort ?? 9293, localThemeFileSystem = emptyThemeFileSystem(), localThemeExtensionFileSystem = mountThemeExtensionFileSystem(directory);
|
|
214032
|
+
let { adminSession, storefrontPassword, themeExtensionPort, themeExtensionDirectory: directory, crawlerSignatureHeaders } = extensionContext, host = "127.0.0.1", port = themeExtensionPort ?? 9293, localThemeFileSystem = emptyThemeFileSystem(), localThemeExtensionFileSystem = mountThemeExtensionFileSystem(directory);
|
|
213233
214033
|
return await localThemeExtensionFileSystem.ready(), {
|
|
213234
|
-
session: await initializeDevServerSession(theme.id.toString(), adminSession, void 0, storefrontPassword),
|
|
214034
|
+
session: await initializeDevServerSession(theme.id.toString(), adminSession, void 0, storefrontPassword, crawlerSignatureHeaders),
|
|
213235
214035
|
localThemeFileSystem,
|
|
213236
214036
|
localThemeExtensionFileSystem,
|
|
213237
214037
|
directory,
|
|
@@ -214382,7 +215182,10 @@ async function dev(options) {
|
|
|
214382
215182
|
url: "https://shopify.dev/docs/storefronts/themes/tools/theme-access"
|
|
214383
215183
|
}
|
|
214384
215184
|
}), options.listing && await ensureListingExists(options.directory, options.listing);
|
|
214385
|
-
let
|
|
215185
|
+
let [crawlerSignatureHeaders, isPasswordProtected] = await Promise.all([
|
|
215186
|
+
fetchOrCreateCrawlerSignatureHeaders(options.adminSession),
|
|
215187
|
+
isStorefrontPasswordProtected(options.adminSession)
|
|
215188
|
+
]), storefrontPassword = isPasswordProtected ? await ensureValidPassword(options.storePassword, options.adminSession.storeFqdn, crawlerSignatureHeaders) : void 0, localThemeExtensionFileSystem = emptyThemeExtFileSystem(), localThemeFileSystem = mountThemeFileSystem(options.directory, {
|
|
214386
215189
|
filters: options,
|
|
214387
215190
|
listing: options.listing,
|
|
214388
215191
|
noDelete: options.noDelete,
|
|
@@ -214399,8 +215202,8 @@ async function dev(options) {
|
|
|
214399
215202
|
giftCard: `http://${host}:${port}/gift_cards/[store_id]/preview`,
|
|
214400
215203
|
themeEditor: `https://${options.store}/admin/themes/${options.theme.id}/editor?hr=${port}`,
|
|
214401
215204
|
preview: `https://${options.store}/?preview_theme_id=${options.theme.id}`
|
|
214402
|
-
},
|
|
214403
|
-
session: await initializeDevServerSession(options.theme.id.toString(), options.adminSession, options.password, storefrontPassword),
|
|
215205
|
+
}, ctx = {
|
|
215206
|
+
session: await initializeDevServerSession(options.theme.id.toString(), options.adminSession, options.password, storefrontPassword, crawlerSignatureHeaders),
|
|
214404
215207
|
localThemeFileSystem,
|
|
214405
215208
|
localThemeExtensionFileSystem,
|
|
214406
215209
|
directory: options.directory,
|
|
@@ -215959,6 +216762,9 @@ var _a22, Pull = class extends ThemeCommand {
|
|
|
215959
216762
|
async command(flags, adminSession, multiEnvironment, _args, context) {
|
|
215960
216763
|
recordTiming("theme-command:pull"), await pull2({ ...flags, noColor: flags["no-color"] }, adminSession, multiEnvironment, context), recordTiming("theme-command:pull");
|
|
215961
216764
|
}
|
|
216765
|
+
storeAuthScopes() {
|
|
216766
|
+
return ["read_themes"];
|
|
216767
|
+
}
|
|
215962
216768
|
};
|
|
215963
216769
|
_a22 = Pull;
|
|
215964
216770
|
Pull.summary = "Download your remote theme files locally.";
|
|
@@ -216168,6 +216974,9 @@ var _a23, Push = class extends ThemeCommand {
|
|
|
216168
216974
|
developmentContext: flags["development-context"]
|
|
216169
216975
|
}, adminSession, multiEnvironment, context), recordTiming("theme-command:push");
|
|
216170
216976
|
}
|
|
216977
|
+
storeAuthScopes() {
|
|
216978
|
+
return ["read_themes", "write_themes"];
|
|
216979
|
+
}
|
|
216171
216980
|
};
|
|
216172
216981
|
_a23 = Push;
|
|
216173
216982
|
Push.summary = "Uploads your local theme files to the connected store, overwriting the remote version if specified.";
|
|
@@ -216383,7 +217192,10 @@ async function setupPreviewThemeAppExtensionsProcess(options) {
|
|
|
216383
217192
|
let themeExtensionDirectory = themeExtensions[0].directory, themeExtensionPort = options.themeExtensionPort ?? 9293, [adminSession, appUrl] = await Promise.all([
|
|
216384
217193
|
ensureAuthenticatedAdmin(options.storeFqdn),
|
|
216385
217194
|
buildAppUrl(remoteApp)
|
|
216386
|
-
]), storeFqdn = adminSession.storeFqdn,
|
|
217195
|
+
]), storeFqdn = adminSession.storeFqdn, [crawlerSignatureHeaders, isPasswordProtected] = await Promise.all([
|
|
217196
|
+
fetchOrCreateCrawlerSignatureHeaders(adminSession),
|
|
217197
|
+
isStorefrontPasswordProtected(adminSession)
|
|
217198
|
+
]), storefrontPassword = isPasswordProtected ? await ensureValidPassword(void 0, storeFqdn, crawlerSignatureHeaders) : void 0, theme = await findOrCreateHostTheme(adminSession, options.theme), themeId = theme.id.toString();
|
|
216387
217199
|
return renderInfo({
|
|
216388
217200
|
headline: "The theme app extension development server is ready.",
|
|
216389
217201
|
orderedNextSteps: !0,
|
|
@@ -216422,15 +217234,17 @@ async function setupPreviewThemeAppExtensionsProcess(options) {
|
|
|
216422
217234
|
theme,
|
|
216423
217235
|
adminSession,
|
|
216424
217236
|
storefrontPassword,
|
|
217237
|
+
crawlerSignatureHeaders,
|
|
216425
217238
|
themeExtensionDirectory,
|
|
216426
217239
|
themeExtensionPort
|
|
216427
217240
|
}
|
|
216428
217241
|
};
|
|
216429
217242
|
}
|
|
216430
|
-
var runThemeAppExtensionsServer = async (_2, { theme, adminSession, storefrontPassword, themeExtensionDirectory, themeExtensionPort }) => {
|
|
217243
|
+
var runThemeAppExtensionsServer = async (_2, { theme, adminSession, storefrontPassword, crawlerSignatureHeaders, themeExtensionDirectory, themeExtensionPort }) => {
|
|
216431
217244
|
await (await initializeDevelopmentExtensionServer(theme, {
|
|
216432
217245
|
adminSession,
|
|
216433
217246
|
storefrontPassword,
|
|
217247
|
+
crawlerSignatureHeaders,
|
|
216434
217248
|
themeExtensionDirectory,
|
|
216435
217249
|
themeExtensionPort
|
|
216436
217250
|
})).start();
|
|
@@ -217011,7 +217825,7 @@ init_cjs_shims();
|
|
|
217011
217825
|
|
|
217012
217826
|
// ../cli-kit/dist/public/node/liquid.js
|
|
217013
217827
|
init_cjs_shims();
|
|
217014
|
-
var import_liquidjs = __toESM(require_liquid_node());
|
|
217828
|
+
var import_liquidjs = __toESM(require_liquid_node(), 1);
|
|
217015
217829
|
function renderLiquidTemplate(templateContent, data) {
|
|
217016
217830
|
let engine = new import_liquidjs.Liquid();
|
|
217017
217831
|
return engine.render(engine.parse(templateContent), data);
|
|
@@ -217861,13 +218675,7 @@ function graphiqlTemplate({ apiVersion, apiVersions, appName, appUrl, key, store
|
|
|
217861
218675
|
import_polaris.Banner,
|
|
217862
218676
|
{ tone: "critical", onDismiss: () => {
|
|
217863
218677
|
}, icon: SvgDisabledIcon },
|
|
217864
|
-
import_react5.default.createElement(
|
|
217865
|
-
"p",
|
|
217866
|
-
null,
|
|
217867
|
-
"The server has been stopped. Restart ",
|
|
217868
|
-
import_react5.default.createElement("code", null, "dev"),
|
|
217869
|
-
" from the CLI."
|
|
217870
|
-
)
|
|
218678
|
+
import_react5.default.createElement("p", null, "The server has been stopped. Restart it from the CLI.")
|
|
217871
218679
|
)
|
|
217872
218680
|
)
|
|
217873
218681
|
)
|
|
@@ -221341,443 +222149,6 @@ init_cjs_shims();
|
|
|
221341
222149
|
|
|
221342
222150
|
// ../app/dist/cli/services/bulk-operations/execute-bulk-operation.js
|
|
221343
222151
|
init_cjs_shims();
|
|
221344
|
-
|
|
221345
|
-
// ../app/dist/cli/services/bulk-operations/run-query.js
|
|
221346
|
-
init_cjs_shims();
|
|
221347
|
-
|
|
221348
|
-
// ../app/dist/cli/api/graphql/bulk-operations/generated/bulk-operation-run-query.js
|
|
221349
|
-
init_cjs_shims();
|
|
221350
|
-
var BulkOperationRunQuery = {
|
|
221351
|
-
kind: "Document",
|
|
221352
|
-
definitions: [
|
|
221353
|
-
{
|
|
221354
|
-
kind: "OperationDefinition",
|
|
221355
|
-
operation: "mutation",
|
|
221356
|
-
name: { kind: "Name", value: "BulkOperationRunQuery" },
|
|
221357
|
-
variableDefinitions: [
|
|
221358
|
-
{
|
|
221359
|
-
kind: "VariableDefinition",
|
|
221360
|
-
variable: { kind: "Variable", name: { kind: "Name", value: "query" } },
|
|
221361
|
-
type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }
|
|
221362
|
-
}
|
|
221363
|
-
],
|
|
221364
|
-
selectionSet: {
|
|
221365
|
-
kind: "SelectionSet",
|
|
221366
|
-
selections: [
|
|
221367
|
-
{
|
|
221368
|
-
kind: "Field",
|
|
221369
|
-
name: { kind: "Name", value: "bulkOperationRunQuery" },
|
|
221370
|
-
arguments: [
|
|
221371
|
-
{
|
|
221372
|
-
kind: "Argument",
|
|
221373
|
-
name: { kind: "Name", value: "query" },
|
|
221374
|
-
value: { kind: "Variable", name: { kind: "Name", value: "query" } }
|
|
221375
|
-
}
|
|
221376
|
-
],
|
|
221377
|
-
selectionSet: {
|
|
221378
|
-
kind: "SelectionSet",
|
|
221379
|
-
selections: [
|
|
221380
|
-
{
|
|
221381
|
-
kind: "Field",
|
|
221382
|
-
name: { kind: "Name", value: "bulkOperation" },
|
|
221383
|
-
selectionSet: {
|
|
221384
|
-
kind: "SelectionSet",
|
|
221385
|
-
selections: [
|
|
221386
|
-
{ kind: "Field", name: { kind: "Name", value: "type" } },
|
|
221387
|
-
{ kind: "Field", name: { kind: "Name", value: "completedAt" } },
|
|
221388
|
-
{ kind: "Field", name: { kind: "Name", value: "createdAt" } },
|
|
221389
|
-
{ kind: "Field", name: { kind: "Name", value: "errorCode" } },
|
|
221390
|
-
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
|
221391
|
-
{ kind: "Field", name: { kind: "Name", value: "objectCount" } },
|
|
221392
|
-
{ kind: "Field", name: { kind: "Name", value: "partialDataUrl" } },
|
|
221393
|
-
{ kind: "Field", name: { kind: "Name", value: "status" } },
|
|
221394
|
-
{ kind: "Field", name: { kind: "Name", value: "url" } },
|
|
221395
|
-
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
221396
|
-
]
|
|
221397
|
-
}
|
|
221398
|
-
},
|
|
221399
|
-
{
|
|
221400
|
-
kind: "Field",
|
|
221401
|
-
name: { kind: "Name", value: "userErrors" },
|
|
221402
|
-
selectionSet: {
|
|
221403
|
-
kind: "SelectionSet",
|
|
221404
|
-
selections: [
|
|
221405
|
-
{ kind: "Field", name: { kind: "Name", value: "code" } },
|
|
221406
|
-
{ kind: "Field", name: { kind: "Name", value: "field" } },
|
|
221407
|
-
{ kind: "Field", name: { kind: "Name", value: "message" } },
|
|
221408
|
-
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
221409
|
-
]
|
|
221410
|
-
}
|
|
221411
|
-
},
|
|
221412
|
-
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
221413
|
-
]
|
|
221414
|
-
}
|
|
221415
|
-
}
|
|
221416
|
-
]
|
|
221417
|
-
}
|
|
221418
|
-
}
|
|
221419
|
-
]
|
|
221420
|
-
};
|
|
221421
|
-
|
|
221422
|
-
// ../app/dist/cli/services/bulk-operations/run-query.js
|
|
221423
|
-
async function runBulkOperationQuery(options) {
|
|
221424
|
-
let { adminSession, query, version } = options;
|
|
221425
|
-
return (await adminRequestDoc({
|
|
221426
|
-
query: BulkOperationRunQuery,
|
|
221427
|
-
session: adminSession,
|
|
221428
|
-
variables: { query },
|
|
221429
|
-
...version && { version }
|
|
221430
|
-
})).bulkOperationRunQuery;
|
|
221431
|
-
}
|
|
221432
|
-
|
|
221433
|
-
// ../app/dist/cli/services/bulk-operations/run-mutation.js
|
|
221434
|
-
init_cjs_shims();
|
|
221435
|
-
|
|
221436
|
-
// ../app/dist/cli/services/bulk-operations/stage-file.js
|
|
221437
|
-
init_cjs_shims();
|
|
221438
|
-
|
|
221439
|
-
// ../app/dist/cli/api/graphql/bulk-operations/generated/staged-uploads-create.js
|
|
221440
|
-
init_cjs_shims();
|
|
221441
|
-
var StagedUploadsCreate = {
|
|
221442
|
-
kind: "Document",
|
|
221443
|
-
definitions: [
|
|
221444
|
-
{
|
|
221445
|
-
kind: "OperationDefinition",
|
|
221446
|
-
operation: "mutation",
|
|
221447
|
-
name: { kind: "Name", value: "StagedUploadsCreate" },
|
|
221448
|
-
variableDefinitions: [
|
|
221449
|
-
{
|
|
221450
|
-
kind: "VariableDefinition",
|
|
221451
|
-
variable: { kind: "Variable", name: { kind: "Name", value: "input" } },
|
|
221452
|
-
type: {
|
|
221453
|
-
kind: "NonNullType",
|
|
221454
|
-
type: {
|
|
221455
|
-
kind: "ListType",
|
|
221456
|
-
type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "StagedUploadInput" } } }
|
|
221457
|
-
}
|
|
221458
|
-
}
|
|
221459
|
-
}
|
|
221460
|
-
],
|
|
221461
|
-
selectionSet: {
|
|
221462
|
-
kind: "SelectionSet",
|
|
221463
|
-
selections: [
|
|
221464
|
-
{
|
|
221465
|
-
kind: "Field",
|
|
221466
|
-
name: { kind: "Name", value: "stagedUploadsCreate" },
|
|
221467
|
-
arguments: [
|
|
221468
|
-
{
|
|
221469
|
-
kind: "Argument",
|
|
221470
|
-
name: { kind: "Name", value: "input" },
|
|
221471
|
-
value: { kind: "Variable", name: { kind: "Name", value: "input" } }
|
|
221472
|
-
}
|
|
221473
|
-
],
|
|
221474
|
-
selectionSet: {
|
|
221475
|
-
kind: "SelectionSet",
|
|
221476
|
-
selections: [
|
|
221477
|
-
{
|
|
221478
|
-
kind: "Field",
|
|
221479
|
-
name: { kind: "Name", value: "stagedTargets" },
|
|
221480
|
-
selectionSet: {
|
|
221481
|
-
kind: "SelectionSet",
|
|
221482
|
-
selections: [
|
|
221483
|
-
{ kind: "Field", name: { kind: "Name", value: "url" } },
|
|
221484
|
-
{ kind: "Field", name: { kind: "Name", value: "resourceUrl" } },
|
|
221485
|
-
{
|
|
221486
|
-
kind: "Field",
|
|
221487
|
-
name: { kind: "Name", value: "parameters" },
|
|
221488
|
-
selectionSet: {
|
|
221489
|
-
kind: "SelectionSet",
|
|
221490
|
-
selections: [
|
|
221491
|
-
{ kind: "Field", name: { kind: "Name", value: "name" } },
|
|
221492
|
-
{ kind: "Field", name: { kind: "Name", value: "value" } },
|
|
221493
|
-
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
221494
|
-
]
|
|
221495
|
-
}
|
|
221496
|
-
},
|
|
221497
|
-
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
221498
|
-
]
|
|
221499
|
-
}
|
|
221500
|
-
},
|
|
221501
|
-
{
|
|
221502
|
-
kind: "Field",
|
|
221503
|
-
name: { kind: "Name", value: "userErrors" },
|
|
221504
|
-
selectionSet: {
|
|
221505
|
-
kind: "SelectionSet",
|
|
221506
|
-
selections: [
|
|
221507
|
-
{ kind: "Field", name: { kind: "Name", value: "field" } },
|
|
221508
|
-
{ kind: "Field", name: { kind: "Name", value: "message" } },
|
|
221509
|
-
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
221510
|
-
]
|
|
221511
|
-
}
|
|
221512
|
-
},
|
|
221513
|
-
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
221514
|
-
]
|
|
221515
|
-
}
|
|
221516
|
-
}
|
|
221517
|
-
]
|
|
221518
|
-
}
|
|
221519
|
-
}
|
|
221520
|
-
]
|
|
221521
|
-
};
|
|
221522
|
-
|
|
221523
|
-
// ../app/dist/cli/services/bulk-operations/stage-file.js
|
|
221524
|
-
async function stageFile(options) {
|
|
221525
|
-
let { adminSession, variablesJsonl } = options, buffer = Buffer.from(variablesJsonl ?? "", "utf-8"), filename = "bulk-variables.jsonl", size = buffer.length, response = await requestStagedUpload(adminSession, filename, size), target = validateStagedUploadResponse(response);
|
|
221526
|
-
return await uploadFileToStagedUrl(buffer, target.url, target.parameters, filename), target.stagedUploadKey;
|
|
221527
|
-
}
|
|
221528
|
-
async function requestStagedUpload(adminSession, filename, size) {
|
|
221529
|
-
return adminRequestDoc({
|
|
221530
|
-
query: StagedUploadsCreate,
|
|
221531
|
-
session: adminSession,
|
|
221532
|
-
variables: {
|
|
221533
|
-
input: [
|
|
221534
|
-
{
|
|
221535
|
-
filename,
|
|
221536
|
-
fileSize: size.toString(),
|
|
221537
|
-
httpMethod: "POST",
|
|
221538
|
-
mimeType: "text/jsonl",
|
|
221539
|
-
resource: "BULK_MUTATION_VARIABLES"
|
|
221540
|
-
}
|
|
221541
|
-
]
|
|
221542
|
-
}
|
|
221543
|
-
});
|
|
221544
|
-
}
|
|
221545
|
-
function validateStagedUploadResponse(response) {
|
|
221546
|
-
if (!response.stagedUploadsCreate)
|
|
221547
|
-
throw new AbortError("No response received from stagedUploadsCreate mutation");
|
|
221548
|
-
if (response.stagedUploadsCreate.userErrors.length > 0) {
|
|
221549
|
-
let errors = response.stagedUploadsCreate.userErrors.map((error) => error.message).join(", ");
|
|
221550
|
-
throw new AbortError(`Failed to create staged upload: ${errors}`);
|
|
221551
|
-
}
|
|
221552
|
-
let target = response.stagedUploadsCreate.stagedTargets?.[0];
|
|
221553
|
-
if (!target)
|
|
221554
|
-
throw new AbortError("No staged upload target returned from Shopify");
|
|
221555
|
-
if (!target.url || !target.resourceUrl)
|
|
221556
|
-
throw new AbortError("Invalid staged upload target: missing required URLs");
|
|
221557
|
-
let stagedUploadKey = target.parameters.find((param) => param.name === "key")?.value;
|
|
221558
|
-
if (!stagedUploadKey)
|
|
221559
|
-
throw new AbortError("No key parameter found in staged upload target");
|
|
221560
|
-
return {
|
|
221561
|
-
url: target.url,
|
|
221562
|
-
resourceUrl: target.resourceUrl,
|
|
221563
|
-
parameters: target.parameters,
|
|
221564
|
-
stagedUploadKey
|
|
221565
|
-
};
|
|
221566
|
-
}
|
|
221567
|
-
async function uploadFileToStagedUrl(fileContents, uploadUrl, parameters, filename) {
|
|
221568
|
-
let form = new FormData();
|
|
221569
|
-
for (let param of parameters)
|
|
221570
|
-
form.append(param.name, param.value);
|
|
221571
|
-
form.append("file", new Blob([new Uint8Array(fileContents)], { type: "text/jsonl" }), filename);
|
|
221572
|
-
let uploadResponse = await renderSingleTask({
|
|
221573
|
-
title: outputContent`Uploading bulk operation variables`,
|
|
221574
|
-
task: async () => fetch2(uploadUrl, {
|
|
221575
|
-
method: "POST",
|
|
221576
|
-
body: form
|
|
221577
|
-
}, "slow-request"),
|
|
221578
|
-
renderOptions: { stdout: process.stderr }
|
|
221579
|
-
});
|
|
221580
|
-
if (!uploadResponse.ok) {
|
|
221581
|
-
let errorText = await uploadResponse.text();
|
|
221582
|
-
throw new AbortError(`Failed to upload file to staged URL: ${uploadResponse.statusText}
|
|
221583
|
-
${errorText}`);
|
|
221584
|
-
}
|
|
221585
|
-
}
|
|
221586
|
-
|
|
221587
|
-
// ../app/dist/cli/api/graphql/bulk-operations/generated/bulk-operation-run-mutation.js
|
|
221588
|
-
init_cjs_shims();
|
|
221589
|
-
var BulkOperationRunMutation = {
|
|
221590
|
-
kind: "Document",
|
|
221591
|
-
definitions: [
|
|
221592
|
-
{
|
|
221593
|
-
kind: "OperationDefinition",
|
|
221594
|
-
operation: "mutation",
|
|
221595
|
-
name: { kind: "Name", value: "BulkOperationRunMutation" },
|
|
221596
|
-
variableDefinitions: [
|
|
221597
|
-
{
|
|
221598
|
-
kind: "VariableDefinition",
|
|
221599
|
-
variable: { kind: "Variable", name: { kind: "Name", value: "mutation" } },
|
|
221600
|
-
type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }
|
|
221601
|
-
},
|
|
221602
|
-
{
|
|
221603
|
-
kind: "VariableDefinition",
|
|
221604
|
-
variable: { kind: "Variable", name: { kind: "Name", value: "stagedUploadPath" } },
|
|
221605
|
-
type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }
|
|
221606
|
-
},
|
|
221607
|
-
{
|
|
221608
|
-
kind: "VariableDefinition",
|
|
221609
|
-
variable: { kind: "Variable", name: { kind: "Name", value: "clientIdentifier" } },
|
|
221610
|
-
type: { kind: "NamedType", name: { kind: "Name", value: "String" } }
|
|
221611
|
-
}
|
|
221612
|
-
],
|
|
221613
|
-
selectionSet: {
|
|
221614
|
-
kind: "SelectionSet",
|
|
221615
|
-
selections: [
|
|
221616
|
-
{
|
|
221617
|
-
kind: "Field",
|
|
221618
|
-
name: { kind: "Name", value: "bulkOperationRunMutation" },
|
|
221619
|
-
arguments: [
|
|
221620
|
-
{
|
|
221621
|
-
kind: "Argument",
|
|
221622
|
-
name: { kind: "Name", value: "mutation" },
|
|
221623
|
-
value: { kind: "Variable", name: { kind: "Name", value: "mutation" } }
|
|
221624
|
-
},
|
|
221625
|
-
{
|
|
221626
|
-
kind: "Argument",
|
|
221627
|
-
name: { kind: "Name", value: "stagedUploadPath" },
|
|
221628
|
-
value: { kind: "Variable", name: { kind: "Name", value: "stagedUploadPath" } }
|
|
221629
|
-
},
|
|
221630
|
-
{
|
|
221631
|
-
kind: "Argument",
|
|
221632
|
-
name: { kind: "Name", value: "clientIdentifier" },
|
|
221633
|
-
value: { kind: "Variable", name: { kind: "Name", value: "clientIdentifier" } }
|
|
221634
|
-
}
|
|
221635
|
-
],
|
|
221636
|
-
selectionSet: {
|
|
221637
|
-
kind: "SelectionSet",
|
|
221638
|
-
selections: [
|
|
221639
|
-
{
|
|
221640
|
-
kind: "Field",
|
|
221641
|
-
name: { kind: "Name", value: "bulkOperation" },
|
|
221642
|
-
selectionSet: {
|
|
221643
|
-
kind: "SelectionSet",
|
|
221644
|
-
selections: [
|
|
221645
|
-
{ kind: "Field", name: { kind: "Name", value: "type" } },
|
|
221646
|
-
{ kind: "Field", name: { kind: "Name", value: "completedAt" } },
|
|
221647
|
-
{ kind: "Field", name: { kind: "Name", value: "createdAt" } },
|
|
221648
|
-
{ kind: "Field", name: { kind: "Name", value: "errorCode" } },
|
|
221649
|
-
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
|
221650
|
-
{ kind: "Field", name: { kind: "Name", value: "objectCount" } },
|
|
221651
|
-
{ kind: "Field", name: { kind: "Name", value: "partialDataUrl" } },
|
|
221652
|
-
{ kind: "Field", name: { kind: "Name", value: "status" } },
|
|
221653
|
-
{ kind: "Field", name: { kind: "Name", value: "url" } },
|
|
221654
|
-
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
221655
|
-
]
|
|
221656
|
-
}
|
|
221657
|
-
},
|
|
221658
|
-
{
|
|
221659
|
-
kind: "Field",
|
|
221660
|
-
name: { kind: "Name", value: "userErrors" },
|
|
221661
|
-
selectionSet: {
|
|
221662
|
-
kind: "SelectionSet",
|
|
221663
|
-
selections: [
|
|
221664
|
-
{ kind: "Field", name: { kind: "Name", value: "code" } },
|
|
221665
|
-
{ kind: "Field", name: { kind: "Name", value: "field" } },
|
|
221666
|
-
{ kind: "Field", name: { kind: "Name", value: "message" } },
|
|
221667
|
-
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
221668
|
-
]
|
|
221669
|
-
}
|
|
221670
|
-
},
|
|
221671
|
-
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
221672
|
-
]
|
|
221673
|
-
}
|
|
221674
|
-
}
|
|
221675
|
-
]
|
|
221676
|
-
}
|
|
221677
|
-
}
|
|
221678
|
-
]
|
|
221679
|
-
};
|
|
221680
|
-
|
|
221681
|
-
// ../app/dist/cli/services/bulk-operations/run-mutation.js
|
|
221682
|
-
async function runBulkOperationMutation(options) {
|
|
221683
|
-
let { adminSession, query: mutation, variablesJsonl, version } = options, stagedUploadPath = await stageFile({
|
|
221684
|
-
adminSession,
|
|
221685
|
-
variablesJsonl
|
|
221686
|
-
});
|
|
221687
|
-
return (await adminRequestDoc({
|
|
221688
|
-
query: BulkOperationRunMutation,
|
|
221689
|
-
session: adminSession,
|
|
221690
|
-
variables: {
|
|
221691
|
-
mutation,
|
|
221692
|
-
stagedUploadPath
|
|
221693
|
-
},
|
|
221694
|
-
...version && { version }
|
|
221695
|
-
})).bulkOperationRunMutation;
|
|
221696
|
-
}
|
|
221697
|
-
|
|
221698
|
-
// ../app/dist/cli/services/bulk-operations/watch-bulk-operation.js
|
|
221699
|
-
init_cjs_shims();
|
|
221700
|
-
var TERMINAL_STATUSES = ["COMPLETED", "FAILED", "CANCELED", "EXPIRED"], INITIAL_POLL_INTERVAL_SECONDS = 1, REGULAR_POLL_INTERVAL_SECONDS = 5, INITIAL_POLL_COUNT = 10, QUICK_WATCH_TIMEOUT_MS = 3e3, QUICK_WATCH_POLL_INTERVAL_MS = 300;
|
|
221701
|
-
async function shortBulkOperationPoll(adminSession, operationId) {
|
|
221702
|
-
return renderSingleTask({
|
|
221703
|
-
title: outputContent`Starting bulk operation`,
|
|
221704
|
-
task: async () => {
|
|
221705
|
-
let startTime = Date.now(), poller = pollBulkOperation({
|
|
221706
|
-
adminSession,
|
|
221707
|
-
operationId,
|
|
221708
|
-
pollIntervalSeconds: QUICK_WATCH_POLL_INTERVAL_MS / 1e3,
|
|
221709
|
-
useAdaptivePolling: !1
|
|
221710
|
-
}), latestOperationState;
|
|
221711
|
-
do {
|
|
221712
|
-
let { value, done } = await poller.next();
|
|
221713
|
-
if (latestOperationState = value, done)
|
|
221714
|
-
return latestOperationState;
|
|
221715
|
-
} while (Date.now() - startTime < QUICK_WATCH_TIMEOUT_MS);
|
|
221716
|
-
return latestOperationState;
|
|
221717
|
-
},
|
|
221718
|
-
renderOptions: { stdout: process.stderr }
|
|
221719
|
-
});
|
|
221720
|
-
}
|
|
221721
|
-
async function watchBulkOperation(adminSession, operationId, abortSignal, onAbort) {
|
|
221722
|
-
return renderSingleTask({
|
|
221723
|
-
title: outputContent`Polling bulk operation`,
|
|
221724
|
-
task: async (updateStatus) => {
|
|
221725
|
-
let poller = pollBulkOperation({
|
|
221726
|
-
adminSession,
|
|
221727
|
-
operationId,
|
|
221728
|
-
pollIntervalSeconds: REGULAR_POLL_INTERVAL_SECONDS,
|
|
221729
|
-
initialPollIntervalSeconds: INITIAL_POLL_INTERVAL_SECONDS,
|
|
221730
|
-
initialPollCount: INITIAL_POLL_COUNT,
|
|
221731
|
-
useAdaptivePolling: !0,
|
|
221732
|
-
abortSignal
|
|
221733
|
-
});
|
|
221734
|
-
for (; ; ) {
|
|
221735
|
-
let { value: latestOperationState, done } = await poller.next();
|
|
221736
|
-
if (done)
|
|
221737
|
-
return latestOperationState;
|
|
221738
|
-
updateStatus(formatBulkOperationStatus(latestOperationState));
|
|
221739
|
-
}
|
|
221740
|
-
},
|
|
221741
|
-
onAbort,
|
|
221742
|
-
renderOptions: { stdout: process.stderr }
|
|
221743
|
-
});
|
|
221744
|
-
}
|
|
221745
|
-
async function* pollBulkOperation({ adminSession, operationId, pollIntervalSeconds, useAdaptivePolling = !1, initialPollIntervalSeconds = INITIAL_POLL_INTERVAL_SECONDS, initialPollCount = INITIAL_POLL_COUNT, abortSignal }) {
|
|
221746
|
-
let pollCount = 0;
|
|
221747
|
-
for (; ; ) {
|
|
221748
|
-
let response = await fetchBulkOperation(adminSession, operationId);
|
|
221749
|
-
if (!response.bulkOperation)
|
|
221750
|
-
throw new Error("bulk operation not found");
|
|
221751
|
-
let latestOperationState = response.bulkOperation;
|
|
221752
|
-
if (TERMINAL_STATUSES.includes(latestOperationState.status) || abortSignal?.aborted)
|
|
221753
|
-
return latestOperationState;
|
|
221754
|
-
yield latestOperationState, pollCount++;
|
|
221755
|
-
let pollInterval = pollIntervalSeconds;
|
|
221756
|
-
useAdaptivePolling && pollCount <= initialPollCount && (pollInterval = initialPollIntervalSeconds), abortSignal ? await Promise.race([
|
|
221757
|
-
sleep(pollInterval),
|
|
221758
|
-
new Promise((resolve) => abortSignal.addEventListener("abort", resolve))
|
|
221759
|
-
]) : await sleep(pollInterval);
|
|
221760
|
-
}
|
|
221761
|
-
}
|
|
221762
|
-
async function fetchBulkOperation(adminSession, operationId) {
|
|
221763
|
-
return adminRequestDoc({
|
|
221764
|
-
query: GetBulkOperationById,
|
|
221765
|
-
session: adminSession,
|
|
221766
|
-
variables: { id: operationId },
|
|
221767
|
-
version: BULK_OPERATIONS_MIN_API_VERSION
|
|
221768
|
-
});
|
|
221769
|
-
}
|
|
221770
|
-
|
|
221771
|
-
// ../app/dist/cli/services/bulk-operations/download-bulk-operation-results.js
|
|
221772
|
-
init_cjs_shims();
|
|
221773
|
-
async function downloadBulkOperationResults(url) {
|
|
221774
|
-
let response = await fetch2(url);
|
|
221775
|
-
if (!response.ok)
|
|
221776
|
-
throw new AbortError(`Failed to download bulk operation results: ${response.statusText}`);
|
|
221777
|
-
return response.text();
|
|
221778
|
-
}
|
|
221779
|
-
|
|
221780
|
-
// ../app/dist/cli/services/bulk-operations/execute-bulk-operation.js
|
|
221781
222152
|
async function parseVariablesToJsonl(variables, variableFile) {
|
|
221782
222153
|
if (variables)
|
|
221783
222154
|
return variables.join(`
|
|
@@ -221891,16 +222262,6 @@ async function renderBulkOperationResult(operation, outputFile) {
|
|
|
221891
222262
|
break;
|
|
221892
222263
|
}
|
|
221893
222264
|
}
|
|
221894
|
-
function resultsContainUserErrors(results) {
|
|
221895
|
-
return results.trim().split(`
|
|
221896
|
-
`).some((line) => {
|
|
221897
|
-
let parsed = JSON.parse(line);
|
|
221898
|
-
if (!parsed.data)
|
|
221899
|
-
return !1;
|
|
221900
|
-
let result = Object.values(parsed.data)[0];
|
|
221901
|
-
return result?.userErrors !== void 0 && result.userErrors.length > 0;
|
|
221902
|
-
});
|
|
221903
|
-
}
|
|
221904
222265
|
function validateBulkOperationVariables(graphqlOperation, variablesJsonl) {
|
|
221905
222266
|
if (isMutation(graphqlOperation) && !variablesJsonl)
|
|
221906
222267
|
throw new AbortError(outputContent`Bulk mutations require variables. Provide a JSONL file with ${outputToken.yellow("--variable-file")} or individual JSON objects with ${outputToken.yellow("--variables")}.`);
|
|
@@ -222043,6 +222404,127 @@ Execute.flags = {
|
|
|
222043
222404
|
};
|
|
222044
222405
|
var execute_default2 = Execute;
|
|
222045
222406
|
|
|
222407
|
+
// ../app/dist/cli/commands/app/graphiql.js
|
|
222408
|
+
init_cjs_shims();
|
|
222409
|
+
|
|
222410
|
+
// ../app/dist/cli/services/app/graphiql.js
|
|
222411
|
+
init_cjs_shims();
|
|
222412
|
+
|
|
222413
|
+
// ../cli-kit/dist/public/node/graphiql/session.js
|
|
222414
|
+
init_cjs_shims();
|
|
222415
|
+
function buildGraphiQLUrl(options) {
|
|
222416
|
+
let url = new URL(`http://localhost:${options.port}/graphiql`);
|
|
222417
|
+
return url.searchParams.set("key", options.key), options.query && url.searchParams.set("query", options.query), options.variables && url.searchParams.set("variables", options.variables), options.apiVersion && url.searchParams.set("api_version", options.apiVersion), url.toString();
|
|
222418
|
+
}
|
|
222419
|
+
async function runGraphiQLSession(options) {
|
|
222420
|
+
let port = await getAvailableTCPPort(options.port), server = setupGraphiQLServer({
|
|
222421
|
+
stdout: options.stdout ?? process.stdout,
|
|
222422
|
+
port,
|
|
222423
|
+
storeFqdn: options.storeFqdn,
|
|
222424
|
+
tokenProvider: options.tokenProvider,
|
|
222425
|
+
key: options.key,
|
|
222426
|
+
appContext: options.appContext,
|
|
222427
|
+
protectMutations: options.protectMutations
|
|
222428
|
+
}), url = buildGraphiQLUrl({
|
|
222429
|
+
port,
|
|
222430
|
+
key: options.key,
|
|
222431
|
+
query: options.query,
|
|
222432
|
+
variables: options.variables,
|
|
222433
|
+
apiVersion: options.apiVersion
|
|
222434
|
+
});
|
|
222435
|
+
try {
|
|
222436
|
+
outputInfo(outputContent`GraphiQL is running at ${outputToken.link(url)}`), options.additionalReadyMessages?.forEach((message) => outputInfo(message)), outputInfo("Press Ctrl+C to stop."), await openURL(url) || outputWarn("Browser did not open automatically. Open the URL above manually."), await waitForGraphiQLAbort(options.abortSignal);
|
|
222437
|
+
} finally {
|
|
222438
|
+
server.close();
|
|
222439
|
+
}
|
|
222440
|
+
}
|
|
222441
|
+
async function waitForGraphiQLAbort(externalSignal) {
|
|
222442
|
+
let controller = new AbortController2(), onSigint = () => controller.abort();
|
|
222443
|
+
process.once("SIGINT", onSigint);
|
|
222444
|
+
try {
|
|
222445
|
+
await new Promise((resolve) => {
|
|
222446
|
+
if (controller.signal.aborted || externalSignal?.aborted) {
|
|
222447
|
+
resolve();
|
|
222448
|
+
return;
|
|
222449
|
+
}
|
|
222450
|
+
controller.signal.addEventListener("abort", () => resolve(), { once: !0 }), externalSignal?.addEventListener("abort", () => controller.abort(), { once: !0 });
|
|
222451
|
+
});
|
|
222452
|
+
} finally {
|
|
222453
|
+
process.removeListener("SIGINT", onSigint);
|
|
222454
|
+
}
|
|
222455
|
+
}
|
|
222456
|
+
|
|
222457
|
+
// ../app/dist/cli/services/app/graphiql.js
|
|
222458
|
+
async function openAppGraphiQL(options) {
|
|
222459
|
+
let apiSecret = options.remoteApp.apiSecretKeys[0]?.secret ?? "", key = resolveGraphiQLKey(void 0, apiSecret, options.store), tokenProvider = createClientCredentialsTokenProvider({
|
|
222460
|
+
apiKey: options.remoteApp.apiKey,
|
|
222461
|
+
apiSecret,
|
|
222462
|
+
storeFqdn: options.store
|
|
222463
|
+
}), adminDomain = await adminFqdn(), appUrl = buildAppURLForAdmin(options.store, options.remoteApp.apiKey, adminDomain);
|
|
222464
|
+
await runGraphiQLSession({
|
|
222465
|
+
port: options.port,
|
|
222466
|
+
storeFqdn: options.store,
|
|
222467
|
+
tokenProvider,
|
|
222468
|
+
key,
|
|
222469
|
+
appContext: {
|
|
222470
|
+
appName: options.remoteApp.title,
|
|
222471
|
+
appUrl,
|
|
222472
|
+
apiSecret
|
|
222473
|
+
},
|
|
222474
|
+
variables: options.variables,
|
|
222475
|
+
apiVersion: options.apiVersion,
|
|
222476
|
+
abortSignal: options.abortSignal
|
|
222477
|
+
});
|
|
222478
|
+
}
|
|
222479
|
+
|
|
222480
|
+
// ../app/dist/cli/commands/app/graphiql.js
|
|
222481
|
+
var import_core31 = __toESM(require_lib(), 1), _a33, AppGraphiQL = class extends AppLinkedCommand {
|
|
222482
|
+
async run() {
|
|
222483
|
+
let { flags } = await this.parse(_a33), { appContextResult, store } = await prepareAppStoreContext(flags);
|
|
222484
|
+
return await openAppGraphiQL({
|
|
222485
|
+
remoteApp: appContextResult.remoteApp,
|
|
222486
|
+
store: store.shopDomain,
|
|
222487
|
+
port: flags.port,
|
|
222488
|
+
variables: flags.variables,
|
|
222489
|
+
apiVersion: flags.version
|
|
222490
|
+
}), { app: appContextResult.app };
|
|
222491
|
+
}
|
|
222492
|
+
};
|
|
222493
|
+
_a33 = AppGraphiQL;
|
|
222494
|
+
AppGraphiQL.summary = "Open a local GraphiQL UI for your app and store.";
|
|
222495
|
+
AppGraphiQL.descriptionWithMarkdown = `Opens an authenticated Admin API GraphiQL UI for your app and selected store.
|
|
222496
|
+
|
|
222497
|
+
The app must be installed on the store.`;
|
|
222498
|
+
AppGraphiQL.description = _a33.descriptionWithoutMarkdown();
|
|
222499
|
+
AppGraphiQL.examples = [
|
|
222500
|
+
"<%= config.bin %> <%= command.id %> --store shop.myshopify.com",
|
|
222501
|
+
"<%= config.bin %> <%= command.id %> --store shop.myshopify.com --port 9123"
|
|
222502
|
+
];
|
|
222503
|
+
AppGraphiQL.flags = {
|
|
222504
|
+
...globalFlags,
|
|
222505
|
+
...appFlags,
|
|
222506
|
+
store: import_core31.Flags.string({
|
|
222507
|
+
char: "s",
|
|
222508
|
+
description: "The myshopify.com domain of the store to open GraphiQL against. The app must be installed on the store. If not specified, you will be prompted to select a store.",
|
|
222509
|
+
env: "SHOPIFY_FLAG_STORE",
|
|
222510
|
+
parse: async (input) => normalizeStoreFqdn(input)
|
|
222511
|
+
}),
|
|
222512
|
+
port: portFlag({
|
|
222513
|
+
description: "Local port for the GraphiQL server.",
|
|
222514
|
+
env: "SHOPIFY_FLAG_PORT"
|
|
222515
|
+
}),
|
|
222516
|
+
variables: import_core31.Flags.string({
|
|
222517
|
+
char: "v",
|
|
222518
|
+
description: "The values for any GraphQL variables in your query or mutation, in JSON format.",
|
|
222519
|
+
env: "SHOPIFY_FLAG_VARIABLES"
|
|
222520
|
+
}),
|
|
222521
|
+
version: import_core31.Flags.string({
|
|
222522
|
+
description: "The API version to use in GraphiQL. Defaults to the latest stable version.",
|
|
222523
|
+
env: "SHOPIFY_FLAG_VERSION"
|
|
222524
|
+
})
|
|
222525
|
+
};
|
|
222526
|
+
var graphiql_default = AppGraphiQL;
|
|
222527
|
+
|
|
222046
222528
|
// ../app/dist/cli/commands/app/function/build.js
|
|
222047
222529
|
init_cjs_shims();
|
|
222048
222530
|
|
|
@@ -222094,9 +222576,9 @@ async function generateSchemaFromApiType({ localIdentifier, developerPlatformCli
|
|
|
222094
222576
|
}
|
|
222095
222577
|
|
|
222096
222578
|
// ../app/dist/cli/services/function/common.js
|
|
222097
|
-
var
|
|
222579
|
+
var import_core32 = __toESM(require_lib(), 1);
|
|
222098
222580
|
var functionFlags = {
|
|
222099
|
-
path:
|
|
222581
|
+
path: import_core32.Flags.string({
|
|
222100
222582
|
hidden: !1,
|
|
222101
222583
|
description: "The path to your function directory.",
|
|
222102
222584
|
parse: async (input) => resolvePath(input),
|
|
@@ -222138,9 +222620,9 @@ async function getOrGenerateSchemaPath(extension, appDirectory, clientId, forceR
|
|
|
222138
222620
|
}
|
|
222139
222621
|
|
|
222140
222622
|
// ../app/dist/cli/commands/app/function/build.js
|
|
222141
|
-
var
|
|
222623
|
+
var _a34, FunctionBuild = class extends AppUnlinkedCommand {
|
|
222142
222624
|
async run() {
|
|
222143
|
-
let { flags } = await this.parse(
|
|
222625
|
+
let { flags } = await this.parse(_a34), { app } = await localAppContext({
|
|
222144
222626
|
directory: flags.path,
|
|
222145
222627
|
userProvidedConfigName: flags.config
|
|
222146
222628
|
}), ourFunction = await chooseFunction(app, flags.path);
|
|
@@ -222153,10 +222635,10 @@ var _a33, FunctionBuild = class extends AppUnlinkedCommand {
|
|
|
222153
222635
|
}), renderSuccess({ headline: "Function built successfully." }), { app };
|
|
222154
222636
|
}
|
|
222155
222637
|
};
|
|
222156
|
-
|
|
222638
|
+
_a34 = FunctionBuild;
|
|
222157
222639
|
FunctionBuild.summary = "Compile a function to wasm.";
|
|
222158
222640
|
FunctionBuild.descriptionWithMarkdown = "Compiles the function in your current directory to WebAssembly (Wasm) for testing purposes.";
|
|
222159
|
-
FunctionBuild.description =
|
|
222641
|
+
FunctionBuild.description = _a34.descriptionWithoutMarkdown();
|
|
222160
222642
|
FunctionBuild.flags = {
|
|
222161
222643
|
...globalFlags,
|
|
222162
222644
|
...appFlags,
|
|
@@ -222533,9 +223015,9 @@ function getAllFunctionRunFileNames(functionRunsDir) {
|
|
|
222533
223015
|
}
|
|
222534
223016
|
|
|
222535
223017
|
// ../app/dist/cli/commands/app/function/replay.js
|
|
222536
|
-
var
|
|
223018
|
+
var import_core33 = __toESM(require_lib(), 1), _a35, FunctionReplay = class extends AppLinkedCommand {
|
|
222537
223019
|
async run() {
|
|
222538
|
-
let { flags } = await this.parse(
|
|
223020
|
+
let { flags } = await this.parse(_a35), { app } = await linkedAppContext({
|
|
222539
223021
|
directory: flags.path,
|
|
222540
223022
|
clientId: flags["client-id"],
|
|
222541
223023
|
forceRelink: flags.reset,
|
|
@@ -222551,21 +223033,21 @@ var import_core32 = __toESM(require_lib(), 1), _a34, FunctionReplay = class exte
|
|
|
222551
223033
|
}), { app };
|
|
222552
223034
|
}
|
|
222553
223035
|
};
|
|
222554
|
-
|
|
223036
|
+
_a35 = FunctionReplay;
|
|
222555
223037
|
FunctionReplay.summary = "Replays a function run from an app log.";
|
|
222556
223038
|
FunctionReplay.descriptionWithMarkdown = "Runs the function from your current directory for [testing purposes](https://shopify.dev/docs/apps/functions/testing-and-debugging). To learn how you can monitor and debug functions when errors occur, refer to [Shopify Functions error handling](https://shopify.dev/docs/api/functions/errors).";
|
|
222557
|
-
FunctionReplay.description =
|
|
223039
|
+
FunctionReplay.description = _a35.descriptionWithoutMarkdown();
|
|
222558
223040
|
FunctionReplay.flags = {
|
|
222559
223041
|
...globalFlags,
|
|
222560
223042
|
...appFlags,
|
|
222561
223043
|
...functionFlags,
|
|
222562
223044
|
...jsonFlag,
|
|
222563
|
-
log:
|
|
223045
|
+
log: import_core33.Flags.string({
|
|
222564
223046
|
char: "l",
|
|
222565
223047
|
description: "Specifies a log identifier to replay instead of selecting from a list. The identifier is provided in the output of `shopify app dev` and is the suffix of the log file name.",
|
|
222566
223048
|
env: "SHOPIFY_FLAG_LOG"
|
|
222567
223049
|
}),
|
|
222568
|
-
watch:
|
|
223050
|
+
watch: import_core33.Flags.boolean({
|
|
222569
223051
|
char: "w",
|
|
222570
223052
|
hidden: !1,
|
|
222571
223053
|
allowNo: !0,
|
|
@@ -222578,10 +223060,10 @@ var replay_default = FunctionReplay;
|
|
|
222578
223060
|
|
|
222579
223061
|
// ../app/dist/cli/commands/app/function/run.js
|
|
222580
223062
|
init_cjs_shims();
|
|
222581
|
-
var
|
|
222582
|
-
var
|
|
223063
|
+
var import_core34 = __toESM(require_lib(), 1);
|
|
223064
|
+
var _a36, DEFAULT_FUNCTION_EXPORT = "_start", FunctionRun = class extends AppUnlinkedCommand {
|
|
222583
223065
|
async run() {
|
|
222584
|
-
let { flags } = await this.parse(
|
|
223066
|
+
let { flags } = await this.parse(_a36), functionExport = DEFAULT_FUNCTION_EXPORT, { app } = await localAppContext({
|
|
222585
223067
|
directory: flags.path,
|
|
222586
223068
|
userProvidedConfigName: flags.config
|
|
222587
223069
|
}), ourFunction = await chooseFunction(app, flags.path);
|
|
@@ -222615,21 +223097,21 @@ var _a35, DEFAULT_FUNCTION_EXPORT = "_start", FunctionRun = class extends AppUnl
|
|
|
222615
223097
|
}), { app };
|
|
222616
223098
|
}
|
|
222617
223099
|
};
|
|
222618
|
-
|
|
223100
|
+
_a36 = FunctionRun;
|
|
222619
223101
|
FunctionRun.summary = "Run a function locally for testing.";
|
|
222620
223102
|
FunctionRun.descriptionWithMarkdown = "Runs the function from your current directory for [testing purposes](https://shopify.dev/docs/apps/functions/testing-and-debugging). To learn how you can monitor and debug functions when errors occur, refer to [Shopify Functions error handling](https://shopify.dev/docs/api/functions/errors).";
|
|
222621
|
-
FunctionRun.description =
|
|
223103
|
+
FunctionRun.description = _a36.descriptionWithoutMarkdown();
|
|
222622
223104
|
FunctionRun.flags = {
|
|
222623
223105
|
...globalFlags,
|
|
222624
223106
|
...appFlags,
|
|
222625
223107
|
...functionFlags,
|
|
222626
223108
|
...jsonFlag,
|
|
222627
|
-
input:
|
|
223109
|
+
input: import_core34.Flags.string({
|
|
222628
223110
|
char: "i",
|
|
222629
223111
|
description: "The input JSON to pass to the function. If omitted, standard input is used.",
|
|
222630
223112
|
env: "SHOPIFY_FLAG_INPUT"
|
|
222631
223113
|
}),
|
|
222632
|
-
export:
|
|
223114
|
+
export: import_core34.Flags.string({
|
|
222633
223115
|
char: "e",
|
|
222634
223116
|
hidden: !1,
|
|
222635
223117
|
description: "Name of the WebAssembly export to invoke.",
|
|
@@ -222640,10 +223122,10 @@ var run_default = FunctionRun;
|
|
|
222640
223122
|
|
|
222641
223123
|
// ../app/dist/cli/commands/app/function/schema.js
|
|
222642
223124
|
init_cjs_shims();
|
|
222643
|
-
var
|
|
222644
|
-
var
|
|
223125
|
+
var import_core35 = __toESM(require_lib(), 1);
|
|
223126
|
+
var _a37, FetchSchema = class extends AppLinkedCommand {
|
|
222645
223127
|
async run() {
|
|
222646
|
-
let { flags } = await this.parse(
|
|
223128
|
+
let { flags } = await this.parse(_a37), { app, developerPlatformClient, organization } = await linkedAppContext({
|
|
222647
223129
|
directory: flags.path,
|
|
222648
223130
|
clientId: flags["client-id"],
|
|
222649
223131
|
forceRelink: flags.reset,
|
|
@@ -222658,15 +223140,15 @@ var _a36, FetchSchema = class extends AppLinkedCommand {
|
|
|
222658
223140
|
}), { app };
|
|
222659
223141
|
}
|
|
222660
223142
|
};
|
|
222661
|
-
|
|
223143
|
+
_a37 = FetchSchema;
|
|
222662
223144
|
FetchSchema.summary = "Fetch the latest GraphQL schema for a function.";
|
|
222663
223145
|
FetchSchema.descriptionWithMarkdown = "Generates the latest [GraphQL schema](https://shopify.dev/docs/apps/functions/input-output#graphql-schema) for a function in your app. Run this command from the function directory.\n\n This command uses the API type and version of your function, as defined in your extension TOML file, to generate the latest GraphQL schema. The schema is written to the `schema.graphql` file.";
|
|
222664
|
-
FetchSchema.description =
|
|
223146
|
+
FetchSchema.description = _a37.descriptionWithoutMarkdown();
|
|
222665
223147
|
FetchSchema.flags = {
|
|
222666
223148
|
...globalFlags,
|
|
222667
223149
|
...appFlags,
|
|
222668
223150
|
...functionFlags,
|
|
222669
|
-
stdout:
|
|
223151
|
+
stdout: import_core35.Flags.boolean({
|
|
222670
223152
|
description: "Output the schema to stdout instead of writing to a file.",
|
|
222671
223153
|
required: !1,
|
|
222672
223154
|
default: !1,
|
|
@@ -222677,19 +223159,19 @@ var schema_default = FetchSchema;
|
|
|
222677
223159
|
|
|
222678
223160
|
// ../app/dist/cli/commands/app/function/typegen.js
|
|
222679
223161
|
init_cjs_shims();
|
|
222680
|
-
var
|
|
223162
|
+
var _a38, FunctionTypegen = class extends AppUnlinkedCommand {
|
|
222681
223163
|
async run() {
|
|
222682
|
-
let { flags } = await this.parse(
|
|
223164
|
+
let { flags } = await this.parse(_a38), { app } = await localAppContext({
|
|
222683
223165
|
directory: flags.path,
|
|
222684
223166
|
userProvidedConfigName: flags.config
|
|
222685
223167
|
}), ourFunction = await chooseFunction(app, flags.path);
|
|
222686
223168
|
return await buildGraphqlTypes(ourFunction, { stdout: process.stdout, stderr: process.stderr, app }), renderSuccess({ headline: "GraphQL types generated successfully." }), { app };
|
|
222687
223169
|
}
|
|
222688
223170
|
};
|
|
222689
|
-
|
|
223171
|
+
_a38 = FunctionTypegen;
|
|
222690
223172
|
FunctionTypegen.summary = "Generate GraphQL types for a function.";
|
|
222691
223173
|
FunctionTypegen.descriptionWithMarkdown = "Creates GraphQL types based on your [input query](https://shopify.dev/docs/apps/functions/input-output#input) for a function. Supports JavaScript functions out of the box, or any language via the `build.typegen_command` configuration.";
|
|
222692
|
-
FunctionTypegen.description =
|
|
223174
|
+
FunctionTypegen.description = _a38.descriptionWithoutMarkdown();
|
|
222693
223175
|
FunctionTypegen.flags = {
|
|
222694
223176
|
...globalFlags,
|
|
222695
223177
|
...appFlags,
|
|
@@ -223037,10 +223519,10 @@ The following extension types are supported: ${allExternalTypes.join(", ")}`, tr
|
|
|
223037
223519
|
var generate_default = generate;
|
|
223038
223520
|
|
|
223039
223521
|
// ../app/dist/cli/commands/app/generate/extension.js
|
|
223040
|
-
var
|
|
223041
|
-
var
|
|
223522
|
+
var import_core36 = __toESM(require_lib(), 1);
|
|
223523
|
+
var _a39, AppGenerateExtension = class extends AppLinkedCommand {
|
|
223042
223524
|
async run() {
|
|
223043
|
-
let { flags } = await this.parse(
|
|
223525
|
+
let { flags } = await this.parse(_a39);
|
|
223044
223526
|
await metadata_default.addPublicMetadata(() => ({
|
|
223045
223527
|
cmd_scaffold_required_auth: !0,
|
|
223046
223528
|
cmd_scaffold_template_custom: flags["clone-url"] !== void 0,
|
|
@@ -223067,35 +223549,35 @@ var _a38, AppGenerateExtension = class extends AppLinkedCommand {
|
|
|
223067
223549
|
}), { app };
|
|
223068
223550
|
}
|
|
223069
223551
|
};
|
|
223070
|
-
|
|
223552
|
+
_a39 = AppGenerateExtension;
|
|
223071
223553
|
AppGenerateExtension.summary = "Generate a new app Extension.";
|
|
223072
223554
|
AppGenerateExtension.descriptionWithMarkdown = `Generates a new [app extension](https://shopify.dev/docs/apps/build/app-extensions). For a list of app extensions that you can generate using this command, refer to [Supported extensions](https://shopify.dev/docs/apps/build/app-extensions/list-of-app-extensions).
|
|
223073
223555
|
|
|
223074
223556
|
Each new app extension is created in a folder under \`extensions/\`. To learn more about the extensions file structure, refer to [App structure](https://shopify.dev/docs/apps/build/cli-for-apps/app-structure) and the documentation for your extension.
|
|
223075
223557
|
`;
|
|
223076
|
-
AppGenerateExtension.description =
|
|
223558
|
+
AppGenerateExtension.description = _a39.descriptionWithoutMarkdown();
|
|
223077
223559
|
AppGenerateExtension.flags = {
|
|
223078
223560
|
...globalFlags,
|
|
223079
223561
|
...appFlags,
|
|
223080
|
-
template:
|
|
223562
|
+
template: import_core36.Flags.string({
|
|
223081
223563
|
char: "t",
|
|
223082
223564
|
hidden: !1,
|
|
223083
223565
|
description: "Extension template",
|
|
223084
223566
|
env: "SHOPIFY_FLAG_EXTENSION_TEMPLATE"
|
|
223085
223567
|
}),
|
|
223086
|
-
name:
|
|
223568
|
+
name: import_core36.Flags.string({
|
|
223087
223569
|
char: "n",
|
|
223088
223570
|
hidden: !1,
|
|
223089
223571
|
description: "name of your Extension",
|
|
223090
223572
|
env: "SHOPIFY_FLAG_NAME"
|
|
223091
223573
|
}),
|
|
223092
|
-
"clone-url":
|
|
223574
|
+
"clone-url": import_core36.Flags.string({
|
|
223093
223575
|
hidden: !0,
|
|
223094
223576
|
char: "u",
|
|
223095
223577
|
description: "The Git URL to clone the function extensions templates from. Defaults to: https://github.com/Shopify/function-examples",
|
|
223096
223578
|
env: "SHOPIFY_FLAG_CLONE_URL"
|
|
223097
223579
|
}),
|
|
223098
|
-
flavor:
|
|
223580
|
+
flavor: import_core36.Flags.string({
|
|
223099
223581
|
hidden: !1,
|
|
223100
223582
|
description: "Choose a starting template for your extension, where applicable",
|
|
223101
223583
|
options: ["vanilla-js", "react", "typescript", "typescript-react", "wasm", "rust"],
|
|
@@ -223106,7 +223588,7 @@ var extension_default2 = AppGenerateExtension;
|
|
|
223106
223588
|
|
|
223107
223589
|
// ../app/dist/cli/commands/app/import-extensions.js
|
|
223108
223590
|
init_cjs_shims();
|
|
223109
|
-
var
|
|
223591
|
+
var import_core37 = __toESM(require_lib(), 1);
|
|
223110
223592
|
var ImportExtensions = class _ImportExtensions extends AppLinkedCommand {
|
|
223111
223593
|
async run() {
|
|
223112
223594
|
let { flags } = await this.parse(_ImportExtensions), appContext = await linkedAppContext({
|
|
@@ -223138,7 +223620,7 @@ ImportExtensions.description = "Import dashboard-managed extensions into your ap
|
|
|
223138
223620
|
ImportExtensions.flags = {
|
|
223139
223621
|
...globalFlags,
|
|
223140
223622
|
...appFlags,
|
|
223141
|
-
"client-id":
|
|
223623
|
+
"client-id": import_core37.Flags.string({
|
|
223142
223624
|
hidden: !1,
|
|
223143
223625
|
description: "The Client ID of your app.",
|
|
223144
223626
|
env: "SHOPIFY_FLAG_CLIENT_ID",
|
|
@@ -223321,10 +223803,10 @@ Directory components`.toUpperCase(),
|
|
|
223321
223803
|
};
|
|
223322
223804
|
|
|
223323
223805
|
// ../app/dist/cli/commands/app/info.js
|
|
223324
|
-
var
|
|
223325
|
-
var
|
|
223806
|
+
var import_core38 = __toESM(require_lib(), 1);
|
|
223807
|
+
var _a40, AppInfo2 = class extends AppLinkedCommand {
|
|
223326
223808
|
async run() {
|
|
223327
|
-
let { flags } = await this.parse(
|
|
223809
|
+
let { flags } = await this.parse(_a40), { app, project, remoteApp, organization, developerPlatformClient } = await linkedAppContext({
|
|
223328
223810
|
directory: flags.path,
|
|
223329
223811
|
clientId: flags["client-id"],
|
|
223330
223812
|
forceRelink: flags.reset,
|
|
@@ -223339,7 +223821,7 @@ var _a39, AppInfo2 = class extends AppLinkedCommand {
|
|
|
223339
223821
|
return typeof results == "string" || "value" in results ? outputResult(results) : renderInfo({ customSections: results }), app.errors.isEmpty() || process.exit(2), { app };
|
|
223340
223822
|
}
|
|
223341
223823
|
};
|
|
223342
|
-
|
|
223824
|
+
_a40 = AppInfo2;
|
|
223343
223825
|
AppInfo2.summary = "Print basic information about your app and extensions.";
|
|
223344
223826
|
AppInfo2.descriptionWithMarkdown = `The information returned includes the following:
|
|
223345
223827
|
|
|
@@ -223347,12 +223829,12 @@ AppInfo2.descriptionWithMarkdown = `The information returned includes the follow
|
|
|
223347
223829
|
- The [structure](https://shopify.dev/docs/apps/tools/cli/structure) of your app project.
|
|
223348
223830
|
- The [access scopes](https://shopify.dev/docs/api/usage) your app has requested.
|
|
223349
223831
|
- System information, including the package manager and version of Shopify CLI used in the project.`;
|
|
223350
|
-
AppInfo2.description =
|
|
223832
|
+
AppInfo2.description = _a40.descriptionWithoutMarkdown();
|
|
223351
223833
|
AppInfo2.flags = {
|
|
223352
223834
|
...globalFlags,
|
|
223353
223835
|
...appFlags,
|
|
223354
223836
|
...jsonFlag,
|
|
223355
|
-
"web-env":
|
|
223837
|
+
"web-env": import_core38.Flags.boolean({
|
|
223356
223838
|
hidden: !1,
|
|
223357
223839
|
description: "Outputs environment variables necessary for running and deploying web/.",
|
|
223358
223840
|
env: "SHOPIFY_FLAG_OUTPUT_WEB_ENV",
|
|
@@ -223716,10 +224198,10 @@ function validateFlavorValue(template, flavor) {
|
|
|
223716
224198
|
}
|
|
223717
224199
|
|
|
223718
224200
|
// ../app/dist/cli/commands/app/init.js
|
|
223719
|
-
var
|
|
223720
|
-
var
|
|
224201
|
+
var import_core39 = __toESM(require_lib(), 1);
|
|
224202
|
+
var _a41, Init2 = class extends AppLinkedCommand {
|
|
223721
224203
|
async run() {
|
|
223722
|
-
let { flags } = await this.parse(
|
|
224204
|
+
let { flags } = await this.parse(_a41);
|
|
223723
224205
|
if (validateTemplateValue(flags.template), validateFlavorValue(flags.template, flags.flavor), flags.name !== void 0 && flags.name.trim() === "")
|
|
223724
224206
|
throw new AbortError("The --name flag can't be empty", "Provide a valid app name, for example: --name my-app");
|
|
223725
224207
|
let inferredPackageManager = inferPackageManager(flags["package-manager"]), name = flags.name ?? await getAppName(flags.path), developerPlatformClient = selectDeveloperPlatformClient();
|
|
@@ -223757,52 +224239,52 @@ var _a40, Init2 = class extends AppLinkedCommand {
|
|
|
223757
224239
|
return { app };
|
|
223758
224240
|
}
|
|
223759
224241
|
};
|
|
223760
|
-
|
|
224242
|
+
_a41 = Init2;
|
|
223761
224243
|
Init2.summary = "Create a new app project";
|
|
223762
224244
|
Init2.flags = {
|
|
223763
224245
|
...globalFlags,
|
|
223764
|
-
name:
|
|
224246
|
+
name: import_core39.Flags.string({
|
|
223765
224247
|
char: "n",
|
|
223766
224248
|
env: "SHOPIFY_FLAG_NAME",
|
|
223767
224249
|
hidden: !1,
|
|
223768
224250
|
description: "The name for the new app. When provided, skips the app selection prompt and creates a new app with this name."
|
|
223769
224251
|
}),
|
|
223770
|
-
path:
|
|
224252
|
+
path: import_core39.Flags.string({
|
|
223771
224253
|
char: "p",
|
|
223772
224254
|
env: "SHOPIFY_FLAG_PATH",
|
|
223773
224255
|
parse: async (input) => resolvePath(input),
|
|
223774
224256
|
default: async () => cwd(),
|
|
223775
224257
|
hidden: !1
|
|
223776
224258
|
}),
|
|
223777
|
-
template:
|
|
224259
|
+
template: import_core39.Flags.string({
|
|
223778
224260
|
description: `The app template. Accepts one of the following:
|
|
223779
224261
|
- <${visibleTemplates.join("|")}>
|
|
223780
224262
|
- Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify/<repository>/[subpath]#[branch]`,
|
|
223781
224263
|
env: "SHOPIFY_FLAG_TEMPLATE"
|
|
223782
224264
|
}),
|
|
223783
|
-
flavor:
|
|
224265
|
+
flavor: import_core39.Flags.string({
|
|
223784
224266
|
description: "Which flavor of the given template to use.",
|
|
223785
224267
|
env: "SHOPIFY_FLAG_TEMPLATE_FLAVOR"
|
|
223786
224268
|
}),
|
|
223787
|
-
"package-manager":
|
|
224269
|
+
"package-manager": import_core39.Flags.string({
|
|
223788
224270
|
char: "d",
|
|
223789
224271
|
env: "SHOPIFY_FLAG_PACKAGE_MANAGER",
|
|
223790
224272
|
hidden: !1,
|
|
223791
224273
|
options: ["npm", "yarn", "pnpm", "bun"]
|
|
223792
224274
|
}),
|
|
223793
|
-
local:
|
|
224275
|
+
local: import_core39.Flags.boolean({
|
|
223794
224276
|
char: "l",
|
|
223795
224277
|
env: "SHOPIFY_FLAG_LOCAL",
|
|
223796
224278
|
default: !1,
|
|
223797
224279
|
hidden: !0
|
|
223798
224280
|
}),
|
|
223799
|
-
"client-id":
|
|
224281
|
+
"client-id": import_core39.Flags.string({
|
|
223800
224282
|
hidden: !1,
|
|
223801
224283
|
description: "The Client ID of your app. Use this to automatically link your new project to an existing app. Using this flag avoids the app selection prompt.",
|
|
223802
224284
|
env: "SHOPIFY_FLAG_CLIENT_ID",
|
|
223803
224285
|
exclusive: ["config"]
|
|
223804
224286
|
}),
|
|
223805
|
-
"organization-id":
|
|
224287
|
+
"organization-id": import_core39.Flags.string({
|
|
223806
224288
|
hidden: !1,
|
|
223807
224289
|
description: "The organization ID. Your organization ID can be found in your Dev Dashboard URL: https://dev.shopify.com/dashboard/<organization-id>",
|
|
223808
224290
|
env: "SHOPIFY_FLAG_ORGANIZATION_ID",
|
|
@@ -223869,7 +224351,7 @@ async function validateApp(app, options = { json: !1 }) {
|
|
|
223869
224351
|
}
|
|
223870
224352
|
|
|
223871
224353
|
// ../app/dist/cli/commands/app/config/validate.js
|
|
223872
|
-
var
|
|
224354
|
+
var _a42;
|
|
223873
224355
|
async function recordValidationFailure(issueCount, fileCount) {
|
|
223874
224356
|
await metadata_default.addPublicMetadata(() => ({
|
|
223875
224357
|
cmd_app_validate_valid: !1,
|
|
@@ -223879,7 +224361,7 @@ async function recordValidationFailure(issueCount, fileCount) {
|
|
|
223879
224361
|
}
|
|
223880
224362
|
var Validate = class extends AppLinkedCommand {
|
|
223881
224363
|
async run() {
|
|
223882
|
-
let { flags } = await this.parse(
|
|
224364
|
+
let { flags } = await this.parse(_a42);
|
|
223883
224365
|
await metadata_default.addPublicMetadata(() => ({
|
|
223884
224366
|
cmd_app_validate_json: flags.json
|
|
223885
224367
|
}));
|
|
@@ -223930,10 +224412,10 @@ var Validate = class extends AppLinkedCommand {
|
|
|
223930
224412
|
return await validateApp(app, { json: flags.json }), { app };
|
|
223931
224413
|
}
|
|
223932
224414
|
};
|
|
223933
|
-
|
|
224415
|
+
_a42 = Validate;
|
|
223934
224416
|
Validate.summary = "Validate your app configuration and extensions.";
|
|
223935
224417
|
Validate.descriptionWithMarkdown = "Validates the selected app configuration file and all extension configurations against their schemas and reports any errors found.";
|
|
223936
|
-
Validate.description =
|
|
224418
|
+
Validate.description = _a42.descriptionWithoutMarkdown();
|
|
223937
224419
|
Validate.flags = {
|
|
223938
224420
|
...globalFlags,
|
|
223939
224421
|
...appFlags,
|
|
@@ -224001,10 +224483,10 @@ ${versionDetails.message}` : ""
|
|
|
224001
224483
|
}
|
|
224002
224484
|
|
|
224003
224485
|
// ../app/dist/cli/commands/app/release.js
|
|
224004
|
-
var
|
|
224005
|
-
var
|
|
224486
|
+
var import_core40 = __toESM(require_lib(), 1);
|
|
224487
|
+
var _a43, Release = class extends AppLinkedCommand {
|
|
224006
224488
|
async run() {
|
|
224007
|
-
let { flags } = await this.parse(
|
|
224489
|
+
let { flags } = await this.parse(_a43), clientId = flags["client-id"];
|
|
224008
224490
|
await addPublicMetadata(() => ({
|
|
224009
224491
|
cmd_app_reset_used: flags.reset
|
|
224010
224492
|
}));
|
|
@@ -224027,25 +224509,25 @@ var _a42, Release = class extends AppLinkedCommand {
|
|
|
224027
224509
|
}), { app };
|
|
224028
224510
|
}
|
|
224029
224511
|
};
|
|
224030
|
-
|
|
224512
|
+
_a43 = Release;
|
|
224031
224513
|
Release.summary = "Release an app version.";
|
|
224032
224514
|
Release.usage = "app release --version <version>";
|
|
224033
224515
|
Release.descriptionWithMarkdown = "Releases an existing app version. Pass the name of the version that you want to release using the `--version` flag.";
|
|
224034
|
-
Release.description =
|
|
224516
|
+
Release.description = _a43.descriptionWithoutMarkdown();
|
|
224035
224517
|
Release.flags = {
|
|
224036
224518
|
...globalFlags,
|
|
224037
224519
|
...appFlags,
|
|
224038
|
-
"allow-updates":
|
|
224520
|
+
"allow-updates": import_core40.Flags.boolean({
|
|
224039
224521
|
hidden: !1,
|
|
224040
224522
|
description: "Allows adding and updating extensions and configuration without requiring user confirmation. Recommended option for CI/CD environments.",
|
|
224041
224523
|
env: "SHOPIFY_FLAG_ALLOW_UPDATES"
|
|
224042
224524
|
}),
|
|
224043
|
-
"allow-deletes":
|
|
224525
|
+
"allow-deletes": import_core40.Flags.boolean({
|
|
224044
224526
|
hidden: !1,
|
|
224045
224527
|
description: "Allows removing extensions and configuration without requiring user confirmation. For CI/CD environments, the recommended flag is --allow-updates.",
|
|
224046
224528
|
env: "SHOPIFY_FLAG_ALLOW_DELETES"
|
|
224047
224529
|
}),
|
|
224048
|
-
version:
|
|
224530
|
+
version: import_core40.Flags.string({
|
|
224049
224531
|
hidden: !1,
|
|
224050
224532
|
description: "The name of the app version to release.",
|
|
224051
224533
|
env: "SHOPIFY_FLAG_VERSION",
|
|
@@ -224119,9 +224601,9 @@ async function versionList(options) {
|
|
|
224119
224601
|
}
|
|
224120
224602
|
|
|
224121
224603
|
// ../app/dist/cli/commands/app/versions/list.js
|
|
224122
|
-
var
|
|
224604
|
+
var _a44, VersionsList = class extends AppLinkedCommand {
|
|
224123
224605
|
async run() {
|
|
224124
|
-
let { flags } = await this.parse(
|
|
224606
|
+
let { flags } = await this.parse(_a44), { app, remoteApp, developerPlatformClient, organization } = await linkedAppContext({
|
|
224125
224607
|
directory: flags.path,
|
|
224126
224608
|
clientId: flags["client-id"],
|
|
224127
224609
|
forceRelink: flags.reset,
|
|
@@ -224136,10 +224618,10 @@ var _a43, VersionsList = class extends AppLinkedCommand {
|
|
|
224136
224618
|
}), { app };
|
|
224137
224619
|
}
|
|
224138
224620
|
};
|
|
224139
|
-
|
|
224621
|
+
_a44 = VersionsList;
|
|
224140
224622
|
VersionsList.summary = "List deployed versions of your app.";
|
|
224141
224623
|
VersionsList.descriptionWithMarkdown = "Lists the deployed app versions. An app version is a snapshot of your app extensions.";
|
|
224142
|
-
VersionsList.description =
|
|
224624
|
+
VersionsList.description = _a44.descriptionWithoutMarkdown();
|
|
224143
224625
|
VersionsList.flags = {
|
|
224144
224626
|
...globalFlags,
|
|
224145
224627
|
...appFlags,
|
|
@@ -224282,9 +224764,9 @@ function formatErrors(errors) {
|
|
|
224282
224764
|
}
|
|
224283
224765
|
|
|
224284
224766
|
// ../app/dist/cli/commands/app/webhook/trigger.js
|
|
224285
|
-
var
|
|
224767
|
+
var import_core41 = __toESM(require_lib(), 1), _a45, WebhookTrigger = class extends AppLinkedCommand {
|
|
224286
224768
|
async run() {
|
|
224287
|
-
let { flags } = await this.parse(
|
|
224769
|
+
let { flags } = await this.parse(_a45), appContextResult = await linkedAppContext({
|
|
224288
224770
|
directory: flags.path,
|
|
224289
224771
|
clientId: flags["client-id"],
|
|
224290
224772
|
forceRelink: flags.reset,
|
|
@@ -224304,7 +224786,7 @@ var import_core40 = __toESM(require_lib(), 1), _a44, WebhookTrigger = class exte
|
|
|
224304
224786
|
return await webhookTriggerService(usedFlags), { app: appContextResult.app };
|
|
224305
224787
|
}
|
|
224306
224788
|
};
|
|
224307
|
-
|
|
224789
|
+
_a45 = WebhookTrigger;
|
|
224308
224790
|
WebhookTrigger.summary = "Trigger delivery of a sample webhook topic payload to a designated address.";
|
|
224309
224791
|
WebhookTrigger.descriptionWithMarkdown = `
|
|
224310
224792
|
Triggers the delivery of a sample Admin API event topic payload to a designated address.
|
|
@@ -224322,41 +224804,41 @@ WebhookTrigger.descriptionWithMarkdown = `
|
|
|
224322
224804
|
- Trigger requests are rate-limited using the [Partner API rate limit](https://shopify.dev/docs/api/partner#rate_limits).
|
|
224323
224805
|
- You can't use this method to validate your API webhook subscriptions.
|
|
224324
224806
|
`;
|
|
224325
|
-
WebhookTrigger.description =
|
|
224807
|
+
WebhookTrigger.description = _a45.descriptionWithoutMarkdown();
|
|
224326
224808
|
WebhookTrigger.flags = {
|
|
224327
224809
|
...appFlags,
|
|
224328
|
-
help:
|
|
224810
|
+
help: import_core41.Flags.help({
|
|
224329
224811
|
required: !1,
|
|
224330
224812
|
hidden: !1,
|
|
224331
224813
|
env: "SHOPIFY_FLAG_HELP",
|
|
224332
224814
|
description: "This help. When you run the trigger command the CLI will prompt you for any information that isn't passed using flags."
|
|
224333
224815
|
}),
|
|
224334
|
-
topic:
|
|
224816
|
+
topic: import_core41.Flags.string({
|
|
224335
224817
|
required: !1,
|
|
224336
224818
|
hidden: !1,
|
|
224337
224819
|
env: "SHOPIFY_FLAG_TOPIC",
|
|
224338
224820
|
description: "The requested webhook topic."
|
|
224339
224821
|
}),
|
|
224340
|
-
"api-version":
|
|
224822
|
+
"api-version": import_core41.Flags.string({
|
|
224341
224823
|
required: !1,
|
|
224342
224824
|
hidden: !1,
|
|
224343
224825
|
env: "SHOPIFY_FLAG_API_VERSION",
|
|
224344
224826
|
description: "The API Version of the webhook topic."
|
|
224345
224827
|
}),
|
|
224346
|
-
"delivery-method":
|
|
224828
|
+
"delivery-method": import_core41.Flags.string({
|
|
224347
224829
|
required: !1,
|
|
224348
224830
|
hidden: !1,
|
|
224349
224831
|
options: [DELIVERY_METHOD.HTTP, DELIVERY_METHOD.PUBSUB, DELIVERY_METHOD.EVENTBRIDGE],
|
|
224350
224832
|
env: "SHOPIFY_FLAG_DELIVERY_METHOD",
|
|
224351
224833
|
description: "Method chosen to deliver the topic payload. If not passed, it's inferred from the address."
|
|
224352
224834
|
}),
|
|
224353
|
-
"client-secret":
|
|
224835
|
+
"client-secret": import_core41.Flags.string({
|
|
224354
224836
|
required: !1,
|
|
224355
224837
|
hidden: !1,
|
|
224356
224838
|
env: "SHOPIFY_FLAG_CLIENT_SECRET",
|
|
224357
224839
|
description: "Your app's client secret. This secret allows us to return the X-Shopify-Hmac-SHA256 header that lets you validate the origin of the response that you receive."
|
|
224358
224840
|
}),
|
|
224359
|
-
address:
|
|
224841
|
+
address: import_core41.Flags.string({
|
|
224360
224842
|
required: !1,
|
|
224361
224843
|
hidden: !1,
|
|
224362
224844
|
env: "SHOPIFY_FLAG_ADDRESS",
|
|
@@ -224404,10 +224886,10 @@ async function devClean(options) {
|
|
|
224404
224886
|
}
|
|
224405
224887
|
|
|
224406
224888
|
// ../app/dist/cli/commands/app/dev/clean.js
|
|
224407
|
-
var
|
|
224408
|
-
var
|
|
224889
|
+
var import_core42 = __toESM(require_lib(), 1);
|
|
224890
|
+
var _a46, DevClean = class extends AppLinkedCommand {
|
|
224409
224891
|
async run() {
|
|
224410
|
-
let { flags } = await this.parse(
|
|
224892
|
+
let { flags } = await this.parse(_a46), appContextResult = await linkedAppContext({
|
|
224411
224893
|
directory: flags.path,
|
|
224412
224894
|
clientId: flags["client-id"],
|
|
224413
224895
|
forceRelink: flags.reset,
|
|
@@ -224420,17 +224902,17 @@ var _a45, DevClean = class extends AppLinkedCommand {
|
|
|
224420
224902
|
return await devClean({ appContextResult, store }), { app: appContextResult.app };
|
|
224421
224903
|
}
|
|
224422
224904
|
};
|
|
224423
|
-
|
|
224905
|
+
_a46 = DevClean;
|
|
224424
224906
|
DevClean.summary = "Cleans up the dev preview from the selected store.";
|
|
224425
224907
|
DevClean.descriptionWithMarkdown = `Stop the dev preview that was started with \`shopify app dev\`.
|
|
224426
224908
|
|
|
224427
224909
|
It restores the app's active version to the selected development store.
|
|
224428
224910
|
`;
|
|
224429
|
-
DevClean.description =
|
|
224911
|
+
DevClean.description = _a46.descriptionWithoutMarkdown();
|
|
224430
224912
|
DevClean.flags = {
|
|
224431
224913
|
...globalFlags,
|
|
224432
224914
|
...appFlags,
|
|
224433
|
-
store:
|
|
224915
|
+
store: import_core42.Flags.string({
|
|
224434
224916
|
hidden: !1,
|
|
224435
224917
|
char: "s",
|
|
224436
224918
|
description: "Store URL. Must be an existing development store.",
|
|
@@ -224529,9 +225011,9 @@ function functionInfo(ourFunction, options) {
|
|
|
224529
225011
|
}
|
|
224530
225012
|
|
|
224531
225013
|
// ../app/dist/cli/commands/app/function/info.js
|
|
224532
|
-
var
|
|
225014
|
+
var _a47, FunctionInfo = class extends AppUnlinkedCommand {
|
|
224533
225015
|
async run() {
|
|
224534
|
-
let { flags } = await this.parse(
|
|
225016
|
+
let { flags } = await this.parse(_a47), { app } = await localAppContext({
|
|
224535
225017
|
directory: flags.path,
|
|
224536
225018
|
userProvidedConfigName: flags.config
|
|
224537
225019
|
}), ourFunction = await chooseFunction(app, flags.path), functionRunner = functionRunnerBinary();
|
|
@@ -224546,7 +225028,7 @@ var _a46, FunctionInfo = class extends AppUnlinkedCommand {
|
|
|
224546
225028
|
}), { app };
|
|
224547
225029
|
}
|
|
224548
225030
|
};
|
|
224549
|
-
|
|
225031
|
+
_a47 = FunctionInfo;
|
|
224550
225032
|
FunctionInfo.summary = "Print basic information about your function.";
|
|
224551
225033
|
FunctionInfo.descriptionWithMarkdown = `The information returned includes the following:
|
|
224552
225034
|
|
|
@@ -224557,7 +225039,7 @@ FunctionInfo.descriptionWithMarkdown = `The information returned includes the fo
|
|
|
224557
225039
|
- The schema path
|
|
224558
225040
|
- The WASM path
|
|
224559
225041
|
- The function runner path`;
|
|
224560
|
-
FunctionInfo.description =
|
|
225042
|
+
FunctionInfo.description = _a47.descriptionWithoutMarkdown();
|
|
224561
225043
|
FunctionInfo.flags = {
|
|
224562
225044
|
...globalFlags,
|
|
224563
225045
|
...appFlags,
|
|
@@ -225332,13 +225814,13 @@ function cleanPatch(patch) {
|
|
|
225332
225814
|
}
|
|
225333
225815
|
|
|
225334
225816
|
// ../app/dist/cli/commands/app/import-custom-data-definitions.js
|
|
225335
|
-
var
|
|
225336
|
-
var
|
|
225817
|
+
var import_core43 = __toESM(require_lib(), 1);
|
|
225818
|
+
var _a48, ImportCustomDataDefinitions = class extends AppLinkedCommand {
|
|
225337
225819
|
async run() {
|
|
225338
225820
|
let { appContextResult, ...options } = await renderSingleTask({
|
|
225339
225821
|
title: outputContent`Loading application`,
|
|
225340
225822
|
task: async () => {
|
|
225341
|
-
let { flags } = await this.parse(
|
|
225823
|
+
let { flags } = await this.parse(_a48);
|
|
225342
225824
|
await checkFolderIsValidApp(flags.path);
|
|
225343
225825
|
let appContextResult2 = await linkedAppContext({
|
|
225344
225826
|
directory: flags.path,
|
|
@@ -225362,20 +225844,20 @@ var _a47, ImportCustomDataDefinitions = class extends AppLinkedCommand {
|
|
|
225362
225844
|
return await importDeclarativeDefinitions(options), { app: appContextResult.app };
|
|
225363
225845
|
}
|
|
225364
225846
|
};
|
|
225365
|
-
|
|
225847
|
+
_a48 = ImportCustomDataDefinitions;
|
|
225366
225848
|
ImportCustomDataDefinitions.summary = "Import metafield and metaobject definitions.";
|
|
225367
225849
|
ImportCustomDataDefinitions.descriptionWithMarkdown = "Import metafield and metaobject definitions from your development store. [Read more about declarative custom data definitions](https://shopify.dev/docs/apps/build/custom-data/declarative-custom-data-definitions).";
|
|
225368
|
-
ImportCustomDataDefinitions.description =
|
|
225850
|
+
ImportCustomDataDefinitions.description = _a48.descriptionWithoutMarkdown();
|
|
225369
225851
|
ImportCustomDataDefinitions.flags = {
|
|
225370
225852
|
...globalFlags,
|
|
225371
225853
|
...appFlags,
|
|
225372
|
-
store:
|
|
225854
|
+
store: import_core43.Flags.string({
|
|
225373
225855
|
char: "s",
|
|
225374
225856
|
description: "Store URL. Must be an existing development or Shopify Plus sandbox store.",
|
|
225375
225857
|
env: "SHOPIFY_FLAG_STORE",
|
|
225376
225858
|
parse: async (input) => normalizeStoreFqdn(input)
|
|
225377
225859
|
}),
|
|
225378
|
-
"include-existing":
|
|
225860
|
+
"include-existing": import_core43.Flags.boolean({
|
|
225379
225861
|
description: "Include existing declared definitions in the output.",
|
|
225380
225862
|
default: !1,
|
|
225381
225863
|
env: "SHOPIFY_FLAG_INCLUDE_EXISTING"
|
|
@@ -225427,16 +225909,16 @@ function renderOrganizationsTable(organizations) {
|
|
|
225427
225909
|
}
|
|
225428
225910
|
|
|
225429
225911
|
// ../app/dist/cli/commands/organization/list.js
|
|
225430
|
-
var
|
|
225912
|
+
var _a49, OrganizationList = class extends base_command_default {
|
|
225431
225913
|
async run() {
|
|
225432
|
-
let { flags } = await this.parse(
|
|
225914
|
+
let { flags } = await this.parse(_a49);
|
|
225433
225915
|
await organizationList({ json: flags.json });
|
|
225434
225916
|
}
|
|
225435
225917
|
};
|
|
225436
|
-
|
|
225918
|
+
_a49 = OrganizationList;
|
|
225437
225919
|
OrganizationList.summary = "List Shopify organizations you have access to.";
|
|
225438
225920
|
OrganizationList.descriptionWithMarkdown = "Lists the Shopify organizations that you have access to, along with their organization IDs.";
|
|
225439
|
-
OrganizationList.description =
|
|
225921
|
+
OrganizationList.description = _a49.descriptionWithoutMarkdown();
|
|
225440
225922
|
OrganizationList.flags = {
|
|
225441
225923
|
...globalFlags,
|
|
225442
225924
|
...jsonFlag
|
|
@@ -225465,6 +225947,7 @@ var commands = {
|
|
|
225465
225947
|
"app:env:pull": pull_default4,
|
|
225466
225948
|
"app:env:show": show_default,
|
|
225467
225949
|
"app:execute": execute_default2,
|
|
225950
|
+
"app:graphiql": graphiql_default,
|
|
225468
225951
|
"app:bulk:execute": execute_default,
|
|
225469
225952
|
"app:function:build": build_default3,
|
|
225470
225953
|
"app:function:replay": replay_default,
|