@shopify/cli 3.90.0 → 3.90.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-O74JPOMN.js → chunk-2TMOMDXO.js} +5 -5
- package/dist/{chunk-ELXP2SNA.js → chunk-3AF66HDC.js} +3 -3
- package/dist/{chunk-3AY5VBOI.js → chunk-3VKS4374.js} +5 -5
- package/dist/{chunk-5OJ67VLD.js → chunk-4BBQTKIZ.js} +4 -4
- package/dist/{chunk-ITXKKYMN.js → chunk-4TOZOCIV.js} +3 -3
- package/dist/{chunk-LKMGT2DW.js → chunk-5SJCPOBW.js} +3 -3
- package/dist/{chunk-SE3EASHO.js → chunk-6MYWZ7MP.js} +7 -7
- package/dist/{chunk-66SSN4NK.js → chunk-6ONJ77I7.js} +2 -2
- package/dist/{chunk-4K7TRR4V.js → chunk-7FIBLDM2.js} +3 -3
- package/dist/{chunk-B2EZE3X5.js → chunk-C5STUYKR.js} +3 -3
- package/dist/{chunk-XUHEOC7Y.js → chunk-CYPBBNM2.js} +6 -6
- package/dist/{chunk-U52M2SBG.js → chunk-DOZD5WAI.js} +5 -5
- package/dist/{chunk-GH4DMIMI.js → chunk-H3SSAPRP.js} +3 -3
- package/dist/{chunk-3OKBQXPB.js → chunk-HV4MPORZ.js} +5 -5
- package/dist/{chunk-A7QWFDBY.js → chunk-IEPPQIPW.js} +2 -2
- package/dist/{chunk-FPXVU77M.js → chunk-IYNLJNFT.js} +3 -3
- package/dist/{chunk-LSGITB3O.js → chunk-J2CFMYG5.js} +4 -4
- package/dist/{chunk-MZX7G4LN.js → chunk-JRFL7VGC.js} +3 -3
- package/dist/{chunk-HVSHUE2B.js → chunk-KC6KOCJ5.js} +5 -5
- package/dist/{chunk-R2VQQFNU.js → chunk-OTD3FRPC.js} +2 -2
- package/dist/{chunk-A2DCUFP3.js → chunk-OZPZBNSB.js} +2 -2
- package/dist/{chunk-6DIWINGB.js → chunk-PAU7LKSJ.js} +3 -3
- package/dist/{chunk-BDQNCT7P.js → chunk-PUMWL67K.js} +3 -3
- package/dist/{chunk-ERCZ3NEG.js → chunk-RHYTM4FE.js} +2 -2
- package/dist/{chunk-AJVHCUVQ.js → chunk-SG2A4CTL.js} +3 -3
- package/dist/{chunk-K2EOH7QQ.js → chunk-SGU7BPE4.js} +3 -3
- package/dist/{chunk-RYFPG44L.js → chunk-TGDLXF4K.js} +2 -2
- package/dist/{chunk-GY37RRX5.js → chunk-TIYR37XP.js} +4 -4
- package/dist/{chunk-UISDI2NJ.js → chunk-UHBL2XEG.js} +2 -2
- package/dist/{chunk-6OAKJOUE.js → chunk-W65CJE3X.js} +6 -6
- package/dist/{chunk-5MLYI7UO.js → chunk-WYVKPOTO.js} +4 -4
- package/dist/{chunk-L5BSIB4A.js → chunk-X7CGUWBF.js} +3 -3
- package/dist/{chunk-QHDQYVAG.js → chunk-ZZNQWJUM.js} +2 -2
- package/dist/cli/commands/auth/login.js +8 -8
- package/dist/cli/commands/auth/login.test.js +9 -9
- package/dist/cli/commands/auth/logout.js +8 -8
- package/dist/cli/commands/auth/logout.test.js +9 -9
- package/dist/cli/commands/cache/clear.js +8 -8
- package/dist/cli/commands/debug/command-flags.js +8 -8
- package/dist/cli/commands/docs/generate.js +8 -8
- package/dist/cli/commands/docs/generate.test.js +8 -8
- package/dist/cli/commands/help.js +8 -8
- package/dist/cli/commands/kitchen-sink/async.js +9 -9
- package/dist/cli/commands/kitchen-sink/async.test.js +9 -9
- package/dist/cli/commands/kitchen-sink/index.js +11 -11
- package/dist/cli/commands/kitchen-sink/index.test.js +11 -11
- package/dist/cli/commands/kitchen-sink/prompts.js +9 -9
- package/dist/cli/commands/kitchen-sink/prompts.test.js +9 -9
- package/dist/cli/commands/kitchen-sink/static.js +9 -9
- package/dist/cli/commands/kitchen-sink/static.test.js +9 -9
- package/dist/cli/commands/notifications/generate.js +9 -9
- package/dist/cli/commands/notifications/list.js +9 -9
- package/dist/cli/commands/search.js +9 -9
- package/dist/cli/commands/upgrade.js +9 -9
- package/dist/cli/commands/version.js +9 -9
- package/dist/cli/commands/version.test.js +9 -9
- package/dist/cli/services/commands/notifications.js +6 -6
- package/dist/cli/services/commands/search.js +2 -2
- package/dist/cli/services/commands/search.test.js +2 -2
- package/dist/cli/services/commands/version.js +3 -3
- package/dist/cli/services/commands/version.test.js +4 -4
- package/dist/cli/services/kitchen-sink/async.js +2 -2
- package/dist/cli/services/kitchen-sink/prompts.js +2 -2
- package/dist/cli/services/kitchen-sink/static.js +2 -2
- package/dist/cli/services/upgrade.js +3 -3
- package/dist/cli/services/upgrade.test.js +4 -4
- package/dist/{custom-oclif-loader-H4CDTFND.js → custom-oclif-loader-RINU7HR3.js} +2 -2
- package/dist/{error-handler-JLUD7HQX.js → error-handler-CWNDOJLB.js} +6 -6
- package/dist/hooks/postrun.js +5 -5
- package/dist/hooks/prerun.js +6 -6
- package/dist/index.js +478 -477
- package/dist/{local-Q5P3JTHB.js → local-FQVEYJ4K.js} +2 -2
- package/dist/{node-package-manager-JQCYAVNE.js → node-package-manager-XIE2HZEQ.js} +3 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-2P2WEBXY.js → ui-UAEFJEFY.js} +2 -2
- package/dist/{workerd-5QLA2QUA.js → workerd-EPURL4IC.js} +9 -9
- package/oclif.manifest.json +8 -9
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -116,7 +116,7 @@ import {
|
|
|
116
116
|
supressNodeExperimentalWarnings,
|
|
117
117
|
unsetStorefront,
|
|
118
118
|
waitForJob
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-DOZD5WAI.js";
|
|
120
120
|
import {
|
|
121
121
|
require_normalize_path
|
|
122
122
|
} from "./chunk-X7YTIMNN.js";
|
|
@@ -129,83 +129,83 @@ import {
|
|
|
129
129
|
import "./chunk-EFOOQV72.js";
|
|
130
130
|
import {
|
|
131
131
|
postRunHookHasCompleted
|
|
132
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-JRFL7VGC.js";
|
|
133
133
|
import {
|
|
134
134
|
import_websocket_server
|
|
135
135
|
} from "./chunk-3GXB4ZRP.js";
|
|
136
136
|
import {
|
|
137
137
|
Generate
|
|
138
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-PUMWL67K.js";
|
|
139
139
|
import {
|
|
140
140
|
List
|
|
141
|
-
} from "./chunk-
|
|
142
|
-
import "./chunk-
|
|
141
|
+
} from "./chunk-J2CFMYG5.js";
|
|
142
|
+
import "./chunk-HV4MPORZ.js";
|
|
143
143
|
import {
|
|
144
144
|
Search
|
|
145
|
-
} from "./chunk-
|
|
146
|
-
import "./chunk-
|
|
145
|
+
} from "./chunk-3AF66HDC.js";
|
|
146
|
+
import "./chunk-IEPPQIPW.js";
|
|
147
147
|
import {
|
|
148
148
|
Upgrade
|
|
149
|
-
} from "./chunk-
|
|
150
|
-
import "./chunk-
|
|
149
|
+
} from "./chunk-WYVKPOTO.js";
|
|
150
|
+
import "./chunk-IYNLJNFT.js";
|
|
151
151
|
import {
|
|
152
152
|
Version
|
|
153
|
-
} from "./chunk-
|
|
154
|
-
import "./chunk-
|
|
153
|
+
} from "./chunk-PAU7LKSJ.js";
|
|
154
|
+
import "./chunk-C5STUYKR.js";
|
|
155
155
|
import {
|
|
156
156
|
HelpCommand
|
|
157
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-UHBL2XEG.js";
|
|
158
158
|
import {
|
|
159
159
|
KitchenSinkAsync
|
|
160
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-4TOZOCIV.js";
|
|
161
161
|
import {
|
|
162
162
|
KitchenSinkAll
|
|
163
|
-
} from "./chunk-
|
|
164
|
-
import "./chunk-
|
|
163
|
+
} from "./chunk-KC6KOCJ5.js";
|
|
164
|
+
import "./chunk-RHYTM4FE.js";
|
|
165
165
|
import {
|
|
166
166
|
KitchenSinkPrompts
|
|
167
|
-
} from "./chunk-
|
|
168
|
-
import "./chunk-
|
|
167
|
+
} from "./chunk-H3SSAPRP.js";
|
|
168
|
+
import "./chunk-6ONJ77I7.js";
|
|
169
169
|
import {
|
|
170
170
|
KitchenSinkStatic
|
|
171
|
-
} from "./chunk-
|
|
172
|
-
import "./chunk-
|
|
171
|
+
} from "./chunk-X7CGUWBF.js";
|
|
172
|
+
import "./chunk-OZPZBNSB.js";
|
|
173
173
|
import {
|
|
174
174
|
Login
|
|
175
|
-
} from "./chunk-
|
|
175
|
+
} from "./chunk-2TMOMDXO.js";
|
|
176
176
|
import {
|
|
177
177
|
Logout
|
|
178
|
-
} from "./chunk-
|
|
178
|
+
} from "./chunk-TIYR37XP.js";
|
|
179
179
|
import {
|
|
180
180
|
ClearCache,
|
|
181
181
|
globalFlags,
|
|
182
182
|
jsonFlag,
|
|
183
183
|
runCLI
|
|
184
|
-
} from "./chunk-
|
|
184
|
+
} from "./chunk-6MYWZ7MP.js";
|
|
185
185
|
import {
|
|
186
186
|
CommandFlags
|
|
187
|
-
} from "./chunk-
|
|
187
|
+
} from "./chunk-SG2A4CTL.js";
|
|
188
188
|
import {
|
|
189
189
|
DocsGenerate
|
|
190
|
-
} from "./chunk-
|
|
190
|
+
} from "./chunk-7FIBLDM2.js";
|
|
191
191
|
import {
|
|
192
192
|
base_command_default,
|
|
193
193
|
decodeToml,
|
|
194
194
|
encodeToml,
|
|
195
195
|
loadEnvironment,
|
|
196
196
|
noDefaultsOptions
|
|
197
|
-
} from "./chunk-
|
|
197
|
+
} from "./chunk-3VKS4374.js";
|
|
198
198
|
import {
|
|
199
199
|
require_bugsnag,
|
|
200
200
|
require_end_of_stream,
|
|
201
201
|
require_pump
|
|
202
|
-
} from "./chunk-
|
|
202
|
+
} from "./chunk-W65CJE3X.js";
|
|
203
203
|
import {
|
|
204
204
|
require_once
|
|
205
205
|
} from "./chunk-SHWOPMLQ.js";
|
|
206
206
|
import {
|
|
207
207
|
showNotificationsIfNeeded
|
|
208
|
-
} from "./chunk-
|
|
208
|
+
} from "./chunk-CYPBBNM2.js";
|
|
209
209
|
import {
|
|
210
210
|
ClientError,
|
|
211
211
|
DevServerCore,
|
|
@@ -286,7 +286,7 @@ import {
|
|
|
286
286
|
setPathValue,
|
|
287
287
|
shopifyFetch,
|
|
288
288
|
z
|
|
289
|
-
} from "./chunk-
|
|
289
|
+
} from "./chunk-4BBQTKIZ.js";
|
|
290
290
|
import "./chunk-XD3LXUGW.js";
|
|
291
291
|
import {
|
|
292
292
|
LocalStorage,
|
|
@@ -310,10 +310,10 @@ import {
|
|
|
310
310
|
usesWorkspaces,
|
|
311
311
|
versionSatisfies,
|
|
312
312
|
writePackageJSON
|
|
313
|
-
} from "./chunk-
|
|
313
|
+
} from "./chunk-ZZNQWJUM.js";
|
|
314
314
|
import {
|
|
315
315
|
CLI_KIT_VERSION
|
|
316
|
-
} from "./chunk-
|
|
316
|
+
} from "./chunk-OTD3FRPC.js";
|
|
317
317
|
import {
|
|
318
318
|
AbortController as AbortController2,
|
|
319
319
|
AbortError,
|
|
@@ -506,7 +506,7 @@ import {
|
|
|
506
506
|
wrapAnsi,
|
|
507
507
|
writeFile,
|
|
508
508
|
writeFileSync
|
|
509
|
-
} from "./chunk-
|
|
509
|
+
} from "./chunk-5SJCPOBW.js";
|
|
510
510
|
import {
|
|
511
511
|
require_ansis,
|
|
512
512
|
require_commonjs,
|
|
@@ -3596,13 +3596,13 @@ var require_json = __commonJS({
|
|
|
3596
3596
|
}
|
|
3597
3597
|
exports.nodeAtPath = nodeAtPath;
|
|
3598
3598
|
function getLocStart(node) {
|
|
3599
|
-
var
|
|
3600
|
-
return (_b = (
|
|
3599
|
+
var _a50, _b;
|
|
3600
|
+
return (_b = (_a50 = node.loc) === null || _a50 === void 0 ? void 0 : _a50.start.offset) !== null && _b !== void 0 ? _b : 0;
|
|
3601
3601
|
}
|
|
3602
3602
|
exports.getLocStart = getLocStart;
|
|
3603
3603
|
function getLocEnd(node) {
|
|
3604
|
-
var
|
|
3605
|
-
return (_b = (
|
|
3604
|
+
var _a50, _b;
|
|
3605
|
+
return (_b = (_a50 = node.loc) === null || _a50 === void 0 ? void 0 : _a50.end.offset) !== null && _b !== void 0 ? _b : 0;
|
|
3606
3606
|
}
|
|
3607
3607
|
exports.getLocEnd = getLocEnd;
|
|
3608
3608
|
}
|
|
@@ -3681,7 +3681,7 @@ var require_block = __commonJS({
|
|
|
3681
3681
|
exports.validateBlockFileExistence = exports.reportWarning = exports.validateNestedBlocks = exports.isInvalidDefaultBlock = exports.isInvalidPresetBlock = exports.getBlocks = void 0;
|
|
3682
3682
|
var json_1 = require_json(), file_utils_1 = require_file_utils();
|
|
3683
3683
|
function getBlocks(validSchema) {
|
|
3684
|
-
var
|
|
3684
|
+
var _a50, _b;
|
|
3685
3685
|
let rootLevelThemeBlocks = [], rootLevelLocalBlocks = [], presetLevelBlocks = {}, defaultLevelBlocks = [], rootLevelBlocks = validSchema.blocks, presets = validSchema.presets;
|
|
3686
3686
|
function categorizeRootLevelBlocks(block, index) {
|
|
3687
3687
|
if (!block)
|
|
@@ -3718,7 +3718,7 @@ var require_block = __commonJS({
|
|
|
3718
3718
|
}) : typeof preset.blocks == "object" && Object.entries(preset.blocks).forEach(([key, block]) => {
|
|
3719
3719
|
categorizePresetLevelBlocks(block, ["presets", String(presetIndex), "blocks", key], 0);
|
|
3720
3720
|
}));
|
|
3721
|
-
}), "default" in validSchema && ((_b = (
|
|
3721
|
+
}), "default" in validSchema && ((_b = (_a50 = validSchema.default) === null || _a50 === void 0 ? void 0 : _a50.blocks) === null || _b === void 0 || _b.forEach((block, index) => {
|
|
3722
3722
|
categorizeDefaultLevelBlocks(block, index);
|
|
3723
3723
|
})), {
|
|
3724
3724
|
rootLevelThemeBlocks,
|
|
@@ -3752,10 +3752,10 @@ var require_block = __commonJS({
|
|
|
3752
3752
|
"blocks" in nestedBlock && nestedBlock.blocks && validateNestedBlocks(context, nestedBlock, nestedBlock.blocks, nestedPath.slice(0, -1), offset, ast);
|
|
3753
3753
|
}
|
|
3754
3754
|
async function validateNestedBlocks(context, parentNode, nestedBlocks, currentPath, offset, ast) {
|
|
3755
|
-
var
|
|
3755
|
+
var _a50;
|
|
3756
3756
|
if (!nestedBlocks)
|
|
3757
3757
|
return;
|
|
3758
|
-
let parentSchema = await ((
|
|
3758
|
+
let parentSchema = await ((_a50 = context.getBlockSchema) === null || _a50 === void 0 ? void 0 : _a50.call(context, parentNode.type));
|
|
3759
3759
|
if (!parentSchema || parentSchema instanceof Error)
|
|
3760
3760
|
return;
|
|
3761
3761
|
let { validSchema, staticBlockDefs } = parentSchema;
|
|
@@ -4176,9 +4176,9 @@ var DocumentUri, URI, integer, uinteger, Position, Range, Location, LocationLink
|
|
|
4176
4176
|
}
|
|
4177
4177
|
Diagnostic3.create = create2;
|
|
4178
4178
|
function is(value) {
|
|
4179
|
-
var
|
|
4179
|
+
var _a50;
|
|
4180
4180
|
let candidate = value;
|
|
4181
|
-
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((
|
|
4181
|
+
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));
|
|
4182
4182
|
}
|
|
4183
4183
|
Diagnostic3.is = is;
|
|
4184
4184
|
})(Diagnostic || (Diagnostic = {}));
|
|
@@ -8764,8 +8764,8 @@ var require_JSONValidator = __commonJS({
|
|
|
8764
8764
|
});
|
|
8765
8765
|
}
|
|
8766
8766
|
async getSchemaForURI(uri) {
|
|
8767
|
-
var
|
|
8768
|
-
let schema = (
|
|
8767
|
+
var _a50;
|
|
8768
|
+
let schema = (_a50 = this.schemas[uri]) === null || _a50 === void 0 ? void 0 : _a50.schema;
|
|
8769
8769
|
return schema || `No schema for '${uri}' found`;
|
|
8770
8770
|
}
|
|
8771
8771
|
};
|
|
@@ -16691,12 +16691,12 @@ var require_stage_1_cst = __commonJS({
|
|
|
16691
16691
|
whitespaceStart: (tokens) => tokens[0].children[1].sourceString,
|
|
16692
16692
|
whitespaceEnd: (tokens) => tokens[0].children[7].sourceString,
|
|
16693
16693
|
delimiterWhitespaceStart: (tokens) => {
|
|
16694
|
-
var
|
|
16695
|
-
return ((
|
|
16694
|
+
var _a50;
|
|
16695
|
+
return ((_a50 = tokens[2].children[1]) === null || _a50 === void 0 ? void 0 : _a50.sourceString) || "";
|
|
16696
16696
|
},
|
|
16697
16697
|
delimiterWhitespaceEnd: (tokens) => {
|
|
16698
|
-
var
|
|
16699
|
-
return ((
|
|
16698
|
+
var _a50;
|
|
16699
|
+
return ((_a50 = tokens[2].children[7]) === null || _a50 === void 0 ? void 0 : _a50.sourceString) || "";
|
|
16700
16700
|
},
|
|
16701
16701
|
locStart,
|
|
16702
16702
|
locEnd,
|
|
@@ -17504,7 +17504,7 @@ var require_stage_2_ast = __commonJS({
|
|
|
17504
17504
|
this.current.push(node);
|
|
17505
17505
|
}
|
|
17506
17506
|
close(node, nodeType) {
|
|
17507
|
-
var
|
|
17507
|
+
var _a50, _b;
|
|
17508
17508
|
if (isLiquidBranch(this.parent) && (this.parent.blockEndPosition = { start: node.locStart, end: node.locStart }, this.closeParentWith(node)), !this.parent)
|
|
17509
17509
|
throw new errors_1.LiquidHTMLASTParsingError(`Attempting to close ${nodeType} '${getName2(node)}' before it was opened`, this.source, node.locStart, node.locEnd);
|
|
17510
17510
|
if (getName2(this.parent) !== getName2(node) || this.parent.type !== nodeType) {
|
|
@@ -17515,7 +17515,7 @@ var require_stage_2_ast = __commonJS({
|
|
|
17515
17515
|
else
|
|
17516
17516
|
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));
|
|
17517
17517
|
}
|
|
17518
|
-
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 = (
|
|
17518
|
+
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();
|
|
17519
17519
|
}
|
|
17520
17520
|
// This function performs the following tasks:
|
|
17521
17521
|
// - Tries to find a parent branch to close when pushing a new branch.
|
|
@@ -17571,17 +17571,17 @@ var require_stage_2_ast = __commonJS({
|
|
|
17571
17571
|
}
|
|
17572
17572
|
exports.getName = getName2;
|
|
17573
17573
|
function cstToAst(cst, options) {
|
|
17574
|
-
var
|
|
17574
|
+
var _a50;
|
|
17575
17575
|
if (cst.length === 0)
|
|
17576
17576
|
return [];
|
|
17577
17577
|
let builder = buildAst(cst, options);
|
|
17578
17578
|
if (!options.allowUnclosedDocumentNode && builder.cursor.length !== 0)
|
|
17579
|
-
throw new errors_1.LiquidHTMLASTParsingError(`Attempting to end parsing before ${(
|
|
17579
|
+
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));
|
|
17580
17580
|
return builder.ast;
|
|
17581
17581
|
}
|
|
17582
17582
|
exports.cstToAst = cstToAst;
|
|
17583
17583
|
function buildAst(cst, options) {
|
|
17584
|
-
var
|
|
17584
|
+
var _a50, _b, _c, _d;
|
|
17585
17585
|
let builder = new ASTBuilder(cst[0].source);
|
|
17586
17586
|
for (let i = 0; i < cst.length; i++) {
|
|
17587
17587
|
let node = cst[i];
|
|
@@ -17612,7 +17612,7 @@ var require_stage_2_ast = __commonJS({
|
|
|
17612
17612
|
markup: markup(node.name, node.markup),
|
|
17613
17613
|
name: node.name,
|
|
17614
17614
|
body: toRawMarkup(node, options),
|
|
17615
|
-
whitespaceStart: (
|
|
17615
|
+
whitespaceStart: (_a50 = node.whitespaceStart) !== null && _a50 !== void 0 ? _a50 : "",
|
|
17616
17616
|
whitespaceEnd: (_b = node.whitespaceEnd) !== null && _b !== void 0 ? _b : "",
|
|
17617
17617
|
delimiterWhitespaceStart: (_c = node.delimiterWhitespaceStart) !== null && _c !== void 0 ? _c : "",
|
|
17618
17618
|
delimiterWhitespaceEnd: (_d = node.delimiterWhitespaceEnd) !== null && _d !== void 0 ? _d : "",
|
|
@@ -17795,23 +17795,23 @@ var require_stage_2_ast = __commonJS({
|
|
|
17795
17795
|
return cstToAst(attrList, options);
|
|
17796
17796
|
}
|
|
17797
17797
|
function liquidTagBaseAttributes(node) {
|
|
17798
|
-
var
|
|
17798
|
+
var _a50, _b;
|
|
17799
17799
|
return {
|
|
17800
17800
|
type: types_1.NodeTypes.LiquidTag,
|
|
17801
17801
|
position: position(node),
|
|
17802
|
-
whitespaceStart: (
|
|
17802
|
+
whitespaceStart: (_a50 = node.whitespaceStart) !== null && _a50 !== void 0 ? _a50 : "",
|
|
17803
17803
|
whitespaceEnd: (_b = node.whitespaceEnd) !== null && _b !== void 0 ? _b : "",
|
|
17804
17804
|
blockStartPosition: position(node),
|
|
17805
17805
|
source: node.source
|
|
17806
17806
|
};
|
|
17807
17807
|
}
|
|
17808
17808
|
function liquidBranchBaseAttributes(node) {
|
|
17809
|
-
var
|
|
17809
|
+
var _a50, _b;
|
|
17810
17810
|
return {
|
|
17811
17811
|
type: types_1.NodeTypes.LiquidBranch,
|
|
17812
17812
|
children: [],
|
|
17813
17813
|
position: position(node),
|
|
17814
|
-
whitespaceStart: (
|
|
17814
|
+
whitespaceStart: (_a50 = node.whitespaceStart) !== null && _a50 !== void 0 ? _a50 : "",
|
|
17815
17815
|
whitespaceEnd: (_b = node.whitespaceEnd) !== null && _b !== void 0 ? _b : "",
|
|
17816
17816
|
blockStartPosition: position(node),
|
|
17817
17817
|
blockEndPosition: { start: -1, end: -1 },
|
|
@@ -17951,7 +17951,7 @@ var require_stage_2_ast = __commonJS({
|
|
|
17951
17951
|
}
|
|
17952
17952
|
}
|
|
17953
17953
|
function toNamedLiquidBranchBaseCase(node) {
|
|
17954
|
-
var
|
|
17954
|
+
var _a50, _b;
|
|
17955
17955
|
return {
|
|
17956
17956
|
name: node.name,
|
|
17957
17957
|
type: types_1.NodeTypes.LiquidBranch,
|
|
@@ -17960,7 +17960,7 @@ var require_stage_2_ast = __commonJS({
|
|
|
17960
17960
|
children: [],
|
|
17961
17961
|
blockStartPosition: { start: node.locStart, end: node.locEnd },
|
|
17962
17962
|
blockEndPosition: { start: -1, end: -1 },
|
|
17963
|
-
whitespaceStart: (
|
|
17963
|
+
whitespaceStart: (_a50 = node.whitespaceStart) !== null && _a50 !== void 0 ? _a50 : "",
|
|
17964
17964
|
whitespaceEnd: (_b = node.whitespaceEnd) !== null && _b !== void 0 ? _b : "",
|
|
17965
17965
|
source: node.source
|
|
17966
17966
|
};
|
|
@@ -18043,10 +18043,10 @@ var require_stage_2_ast = __commonJS({
|
|
|
18043
18043
|
}
|
|
18044
18044
|
var liquidToken = /(\{%|\{\{)-?/g;
|
|
18045
18045
|
function toRawMarkupKindFromHtmlNode(node) {
|
|
18046
|
-
var
|
|
18046
|
+
var _a50;
|
|
18047
18047
|
switch (node.name) {
|
|
18048
18048
|
case "script": {
|
|
18049
|
-
let scriptAttr = (
|
|
18049
|
+
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");
|
|
18050
18050
|
if (!scriptAttr || !("value" in scriptAttr) || scriptAttr.value.length === 0 || scriptAttr.value[0].type !== stage_1_cst_1.ConcreteNodeTypes.TextNode)
|
|
18051
18051
|
return RawMarkupKinds.javascript;
|
|
18052
18052
|
let type = scriptAttr.value[0].value;
|
|
@@ -18160,11 +18160,11 @@ var require_stage_2_ast = __commonJS({
|
|
|
18160
18160
|
};
|
|
18161
18161
|
}
|
|
18162
18162
|
function toLiquidVariableOutput(node) {
|
|
18163
|
-
var
|
|
18163
|
+
var _a50, _b;
|
|
18164
18164
|
return {
|
|
18165
18165
|
type: types_1.NodeTypes.LiquidVariableOutput,
|
|
18166
18166
|
markup: typeof node.markup == "string" ? node.markup : toLiquidVariable(node.markup),
|
|
18167
|
-
whitespaceStart: (
|
|
18167
|
+
whitespaceStart: (_a50 = node.whitespaceStart) !== null && _a50 !== void 0 ? _a50 : "",
|
|
18168
18168
|
whitespaceEnd: (_b = node.whitespaceEnd) !== null && _b !== void 0 ? _b : "",
|
|
18169
18169
|
position: position(node),
|
|
18170
18170
|
source: node.source
|
|
@@ -18351,11 +18351,11 @@ var require_stage_2_ast = __commonJS({
|
|
|
18351
18351
|
}
|
|
18352
18352
|
exports.isLiquidHtmlNode = isLiquidHtmlNode;
|
|
18353
18353
|
function getUnclosed(node, parentNode) {
|
|
18354
|
-
var
|
|
18354
|
+
var _a50;
|
|
18355
18355
|
if (node)
|
|
18356
18356
|
return getName2(node) === null && parentNode && (node = parentNode), {
|
|
18357
18357
|
type: node.type,
|
|
18358
|
-
name: (
|
|
18358
|
+
name: (_a50 = getName2(node)) !== null && _a50 !== void 0 ? _a50 : "",
|
|
18359
18359
|
blockStartPosition: "blockStartPosition" in node ? node.blockStartPosition : node.position
|
|
18360
18360
|
};
|
|
18361
18361
|
}
|
|
@@ -18670,8 +18670,8 @@ var require_context_utils = __commonJS({
|
|
|
18670
18670
|
};
|
|
18671
18671
|
}
|
|
18672
18672
|
async function getDefaultLocaleFile(fs7, rootUri, postfix = ".default.json") {
|
|
18673
|
-
var
|
|
18674
|
-
return (
|
|
18673
|
+
var _a50;
|
|
18674
|
+
return (_a50 = (await fs7.readDirectory((0, path_1.join)(rootUri, "locales"))).find(([uri]) => uri.endsWith(postfix))) === null || _a50 === void 0 ? void 0 : _a50[0];
|
|
18675
18675
|
}
|
|
18676
18676
|
async function getDefaultLocale(fs7, rootUri, postfix) {
|
|
18677
18677
|
try {
|
|
@@ -18832,8 +18832,8 @@ var require_visitor = __commonJS({
|
|
|
18832
18832
|
return node.position.end - node.position.start;
|
|
18833
18833
|
}
|
|
18834
18834
|
function isUnclosed(node) {
|
|
18835
|
-
var
|
|
18836
|
-
return "blockEndPosition" in node ? ((
|
|
18835
|
+
var _a50;
|
|
18836
|
+
return "blockEndPosition" in node ? ((_a50 = node.blockEndPosition) === null || _a50 === void 0 ? void 0 : _a50.end) === -1 : "children" in node ? node.children.length > 0 : !1;
|
|
18837
18837
|
}
|
|
18838
18838
|
function findJSONNode(ast, cursorPosition) {
|
|
18839
18839
|
let prev, current = ast, ancestors = [], offset = cursorPosition;
|
|
@@ -18932,8 +18932,8 @@ var require_ignore2 = __commonJS({
|
|
|
18932
18932
|
}
|
|
18933
18933
|
exports.isIgnored = isIgnored;
|
|
18934
18934
|
function checkIgnorePatterns(checkDef, config2) {
|
|
18935
|
-
var
|
|
18936
|
-
return checkDef ? asArray((
|
|
18935
|
+
var _a50;
|
|
18936
|
+
return checkDef ? asArray((_a50 = config2.settings[checkDef.meta.code]) === null || _a50 === void 0 ? void 0 : _a50.ignore) : [];
|
|
18937
18937
|
}
|
|
18938
18938
|
function asArray(x) {
|
|
18939
18939
|
return x ?? [];
|
|
@@ -19166,10 +19166,10 @@ var require_asset_preload = __commonJS({
|
|
|
19166
19166
|
create(context) {
|
|
19167
19167
|
return {
|
|
19168
19168
|
async HtmlVoidElement(node) {
|
|
19169
|
-
var
|
|
19169
|
+
var _a50;
|
|
19170
19170
|
let preloadLinkAttr = node.attributes.find((attr) => (0, utils_1.isValuedHtmlAttribute)(attr) && isPreload(attr));
|
|
19171
19171
|
if (node.name === "link" && preloadLinkAttr) {
|
|
19172
|
-
let asAttr = node.attributes.filter(utils_1.isValuedHtmlAttribute).find((attr) => (0, utils_1.isAttr)(attr, "as")), assetType = (
|
|
19172
|
+
let asAttr = node.attributes.filter(utils_1.isValuedHtmlAttribute).find((attr) => (0, utils_1.isAttr)(attr, "as")), assetType = (_a50 = asAttr?.value.find((node2) => (0, utils_1.isNodeOfType)(liquid_html_parser_1.NodeTypes.TextNode, node2))) === null || _a50 === void 0 ? void 0 : _a50.value, message = "";
|
|
19173
19173
|
assetType === "style" ? message = "For better performance, prefer using the preload argument of the stylesheet_tag filter" : assetType === "image" ? message = "For better performance, prefer using the preload argument of the image_tag filter" : message = "For better performance, prefer using the preload_tag filter", context.report({
|
|
19174
19174
|
message,
|
|
19175
19175
|
startIndex: node.position.start,
|
|
@@ -19967,10 +19967,10 @@ var require_parse = __commonJS({
|
|
|
19967
19967
|
}
|
|
19968
19968
|
}
|
|
19969
19969
|
function objectToObjectNode(node) {
|
|
19970
|
-
var
|
|
19970
|
+
var _a50;
|
|
19971
19971
|
return {
|
|
19972
19972
|
type: "Object",
|
|
19973
|
-
children: ((
|
|
19973
|
+
children: ((_a50 = node.children) !== null && _a50 !== void 0 ? _a50 : []).map(jsoncToJsonAst),
|
|
19974
19974
|
loc: (0, exports.location)(node.offset, node.offset + node.length)
|
|
19975
19975
|
};
|
|
19976
19976
|
}
|
|
@@ -20179,13 +20179,13 @@ var require_to_schema = __commonJS({
|
|
|
20179
20179
|
}
|
|
20180
20180
|
exports.toAppBlockSchema = toAppBlockSchema;
|
|
20181
20181
|
function toSchemaNode(ast) {
|
|
20182
|
-
var
|
|
20183
|
-
return ast instanceof Error ? ast : (
|
|
20182
|
+
var _a50;
|
|
20183
|
+
return ast instanceof Error ? ast : (_a50 = (0, visitor_1.visit)(ast, {
|
|
20184
20184
|
LiquidRawTag(node) {
|
|
20185
20185
|
if (node.name === "schema")
|
|
20186
20186
|
return node;
|
|
20187
20187
|
}
|
|
20188
|
-
})[0]) !== null &&
|
|
20188
|
+
})[0]) !== null && _a50 !== void 0 ? _a50 : new Error("No schema tag found");
|
|
20189
20189
|
}
|
|
20190
20190
|
function toStaticBlockDefs(ast) {
|
|
20191
20191
|
return ast instanceof Error ? [] : (0, visitor_1.visit)(ast, {
|
|
@@ -20205,11 +20205,11 @@ var require_to_schema = __commonJS({
|
|
|
20205
20205
|
});
|
|
20206
20206
|
}
|
|
20207
20207
|
function getSchema(context) {
|
|
20208
|
-
var
|
|
20208
|
+
var _a50, _b;
|
|
20209
20209
|
let name = path3.basename(context.file.uri, ".liquid");
|
|
20210
20210
|
switch (!0) {
|
|
20211
20211
|
case isBlock(context.file.uri):
|
|
20212
|
-
return (
|
|
20212
|
+
return (_a50 = context.getBlockSchema) === null || _a50 === void 0 ? void 0 : _a50.call(context, name);
|
|
20213
20213
|
case isSection(context.file.uri):
|
|
20214
20214
|
return (_b = context.getSectionSchema) === null || _b === void 0 ? void 0 : _b.call(context, name);
|
|
20215
20215
|
default:
|
|
@@ -21642,29 +21642,29 @@ var require_deprecated_fonts_on_sections_and_blocks = __commonJS({
|
|
|
21642
21642
|
});
|
|
21643
21643
|
}
|
|
21644
21644
|
async function checkPresetsForDeprecatedFonts(schema, offset, ast, context) {
|
|
21645
|
-
var
|
|
21645
|
+
var _a50;
|
|
21646
21646
|
let presets = schema.presets;
|
|
21647
21647
|
if (presets)
|
|
21648
21648
|
for (let [preset_index, preset] of presets.entries()) {
|
|
21649
21649
|
let warningAstPath = ["presets", String(preset_index)];
|
|
21650
|
-
await checkSettingsAndBlocksForDeprecatedFonts((
|
|
21650
|
+
await checkSettingsAndBlocksForDeprecatedFonts((_a50 = preset.settings) !== null && _a50 !== void 0 ? _a50 : {}, "blocks" in preset ? preset.blocks : void 0, schema, offset, ast, warningAstPath, context);
|
|
21651
21651
|
}
|
|
21652
21652
|
}
|
|
21653
21653
|
async function checkSettingsAndBlocksForDeprecatedFonts(settings, blocks2, schema, offset, ast, warningAstPath, context) {
|
|
21654
21654
|
settings && typeof settings == "object" && Object.entries(settings).forEach(([settingKey, settingValue]) => {
|
|
21655
|
-
var
|
|
21656
|
-
if (isFontPickerType((
|
|
21655
|
+
var _a50;
|
|
21656
|
+
if (isFontPickerType((_a50 = schema.settings) !== null && _a50 !== void 0 ? _a50 : [], settingKey) && deprecated_fonts_data_1.DEPRECATED_FONT_HANDLES.has(settingValue)) {
|
|
21657
21657
|
let currentPath = warningAstPath.concat(["settings", settingKey]);
|
|
21658
21658
|
reportWarning(context, offset, ast, currentPath, `setting '${settingKey}' is using deprecated font '${settingValue}'`);
|
|
21659
21659
|
}
|
|
21660
21660
|
}), blocks2 && await checkBlocksForDeprecatedFonts(blocks2, schema, offset, ast, context, warningAstPath);
|
|
21661
21661
|
}
|
|
21662
21662
|
async function checkBlocksForDeprecatedFonts(blocks2, schema, offset, ast, context, nodePath2) {
|
|
21663
|
-
var
|
|
21663
|
+
var _a50, _b, _c, _d;
|
|
21664
21664
|
let iterator = Array.isArray(blocks2) ? blocks2.entries() : Object.entries(blocks2);
|
|
21665
21665
|
for (let [keyOrIndex, block] of iterator) {
|
|
21666
21666
|
let currentPath = nodePath2.concat(["blocks", String(keyOrIndex)]), validSchema = null;
|
|
21667
|
-
if ((
|
|
21667
|
+
if ((_a50 = schema.blocks) === null || _a50 === void 0 || _a50.forEach((schemaBlock) => {
|
|
21668
21668
|
schemaBlock.type === block.type && "name" in schemaBlock && (validSchema = schemaBlock);
|
|
21669
21669
|
}), !validSchema) {
|
|
21670
21670
|
let blockSchema = await ((_b = context.getBlockSchema) === null || _b === void 0 ? void 0 : _b.call(context, block.type));
|
|
@@ -21677,12 +21677,12 @@ var require_deprecated_fonts_on_sections_and_blocks = __commonJS({
|
|
|
21677
21677
|
}
|
|
21678
21678
|
}
|
|
21679
21679
|
async function checkSchemaDefaultForDeprecatedFonts(schema, offset, ast, context) {
|
|
21680
|
-
var
|
|
21680
|
+
var _a50;
|
|
21681
21681
|
let defaultValues = schema.default;
|
|
21682
21682
|
if (!defaultValues || typeof defaultValues != "object")
|
|
21683
21683
|
return;
|
|
21684
21684
|
let warningAstPath = ["default"];
|
|
21685
|
-
await checkSettingsAndBlocksForDeprecatedFonts((
|
|
21685
|
+
await checkSettingsAndBlocksForDeprecatedFonts((_a50 = defaultValues.settings) !== null && _a50 !== void 0 ? _a50 : {}, "blocks" in defaultValues ? defaultValues.blocks : void 0, schema, offset, ast, warningAstPath, context);
|
|
21686
21686
|
}
|
|
21687
21687
|
function isFontPickerType(settings, settingKey) {
|
|
21688
21688
|
return settings.some((setting) => setting.id === settingKey && setting.type === "font_picker");
|
|
@@ -21981,10 +21981,10 @@ var require_arguments = __commonJS({
|
|
|
21981
21981
|
return node.args.length == 1 || arg.position.start == node.args[node.args.length - 1].position.start;
|
|
21982
21982
|
}
|
|
21983
21983
|
function getBlockName(node) {
|
|
21984
|
-
var
|
|
21984
|
+
var _a50;
|
|
21985
21985
|
if (node.contentForType.value !== "block")
|
|
21986
21986
|
return;
|
|
21987
|
-
let contentForTypeArg = (
|
|
21987
|
+
let contentForTypeArg = (_a50 = node.args.find((arg) => arg.name == "type")) === null || _a50 === void 0 ? void 0 : _a50.value;
|
|
21988
21988
|
if (!(!contentForTypeArg || !(0, utils_2.isLiquidString)(contentForTypeArg)))
|
|
21989
21989
|
return contentForTypeArg.value;
|
|
21990
21990
|
}
|
|
@@ -21995,9 +21995,9 @@ var require_arguments = __commonJS({
|
|
|
21995
21995
|
}
|
|
21996
21996
|
exports.getSnippetName = getSnippetName;
|
|
21997
21997
|
async function getLiquidDocParams(context, relativePath2) {
|
|
21998
|
-
var
|
|
21998
|
+
var _a50;
|
|
21999
21999
|
let docDefinition = context.getDocDefinition && await context.getDocDefinition(relativePath2);
|
|
22000
|
-
if (!((
|
|
22000
|
+
if (!((_a50 = docDefinition?.liquidDoc) === null || _a50 === void 0) && _a50.parameters)
|
|
22001
22001
|
return new Map(docDefinition.liquidDoc.parameters.map((p) => [p.name, p]));
|
|
22002
22002
|
}
|
|
22003
22003
|
exports.getLiquidDocParams = getLiquidDocParams;
|
|
@@ -22049,12 +22049,12 @@ var require_duplicate_render_snippet_arguments = __commonJS({
|
|
|
22049
22049
|
create(context) {
|
|
22050
22050
|
return {
|
|
22051
22051
|
async RenderMarkup(node) {
|
|
22052
|
-
var
|
|
22052
|
+
var _a50;
|
|
22053
22053
|
let snippetName = (0, arguments_1.getSnippetName)(node);
|
|
22054
22054
|
if (!snippetName)
|
|
22055
22055
|
return;
|
|
22056
22056
|
let encounteredArgNames = /* @__PURE__ */ new Set(), duplicateArgs = [];
|
|
22057
|
-
!((
|
|
22057
|
+
!((_a50 = node.alias) === null || _a50 === void 0) && _a50.value && encounteredArgNames.add(node.alias.value);
|
|
22058
22058
|
for (let param of node.args)
|
|
22059
22059
|
encounteredArgNames.has(param.name) && duplicateArgs.push(param), encounteredArgNames.add(param.name);
|
|
22060
22060
|
(0, arguments_1.reportDuplicateArguments)(context, node, duplicateArgs, snippetName);
|
|
@@ -22307,11 +22307,11 @@ var require_missing_block_utils = __commonJS({
|
|
|
22307
22307
|
return await (0, file_utils_1.doesFileExist)(context, blockPath);
|
|
22308
22308
|
}
|
|
22309
22309
|
async function getThemeBlocks(sectionType, currentPath, context) {
|
|
22310
|
-
var
|
|
22310
|
+
var _a50, _b;
|
|
22311
22311
|
let themeBlocks = [];
|
|
22312
22312
|
if (!sectionType)
|
|
22313
22313
|
return themeBlocks;
|
|
22314
|
-
let schema = isNestedBlock(currentPath) ? await ((
|
|
22314
|
+
let schema = isNestedBlock(currentPath) ? await ((_a50 = context.getBlockSchema) === null || _a50 === void 0 ? void 0 : _a50.call(context, sectionType)) : await ((_b = context.getSectionSchema) === null || _b === void 0 ? void 0 : _b.call(context, sectionType));
|
|
22315
22315
|
if (!schema || schema instanceof Error)
|
|
22316
22316
|
return themeBlocks;
|
|
22317
22317
|
let { validSchema } = schema;
|
|
@@ -22530,9 +22530,9 @@ var require_liquid_free_settings = __commonJS({
|
|
|
22530
22530
|
}
|
|
22531
22531
|
function isInArrayWithParentKey(ancestors, parentKey) {
|
|
22532
22532
|
return ancestors.some((ancestor, index) => {
|
|
22533
|
-
var
|
|
22533
|
+
var _a50;
|
|
22534
22534
|
let parent = ancestors[index - 1];
|
|
22535
|
-
return (ancestor.type === "Array" || ancestor.type === "Object") && parent?.type === "Property" && ((
|
|
22535
|
+
return (ancestor.type === "Array" || ancestor.type === "Object") && parent?.type === "Property" && ((_a50 = parent.key) === null || _a50 === void 0 ? void 0 : _a50.value) === parentKey;
|
|
22536
22536
|
});
|
|
22537
22537
|
}
|
|
22538
22538
|
}
|
|
@@ -22592,7 +22592,7 @@ var require_MultipleAssignValues = __commonJS({
|
|
|
22592
22592
|
exports.detectMultipleAssignValues = void 0;
|
|
22593
22593
|
var utils_1 = require_utils5();
|
|
22594
22594
|
function detectMultipleAssignValues(node) {
|
|
22595
|
-
var
|
|
22595
|
+
var _a50;
|
|
22596
22596
|
let ASSIGN_MARKUP_REGEX = /([^=]+)(=\s*)([^|]+)(?:\s*\|\s*.*)?$/m;
|
|
22597
22597
|
if (node.name !== "assign")
|
|
22598
22598
|
return;
|
|
@@ -22611,7 +22611,7 @@ var require_MultipleAssignValues = __commonJS({
|
|
|
22611
22611
|
assignmentOperator,
|
|
22612
22612
|
// '"123" something'
|
|
22613
22613
|
assignmentValue
|
|
22614
|
-
] = match2, firstAssignmentValue = (
|
|
22614
|
+
] = match2, firstAssignmentValue = (_a50 = (0, utils_1.getValuesInMarkup)(assignmentValue).at(0)) === null || _a50 === void 0 ? void 0 : _a50.value;
|
|
22615
22615
|
if (!firstAssignmentValue)
|
|
22616
22616
|
return;
|
|
22617
22617
|
let removalIndices = (source, startingIndex) => {
|
|
@@ -22670,7 +22670,7 @@ var require_InvalidEchoValue = __commonJS({
|
|
|
22670
22670
|
exports.detectInvalidEchoValue = void 0;
|
|
22671
22671
|
var liquid_html_parser_1 = require_dist2(), utils_1 = require_utils5();
|
|
22672
22672
|
function detectInvalidEchoValue(node) {
|
|
22673
|
-
var
|
|
22673
|
+
var _a50;
|
|
22674
22674
|
let ECHO_MARKUP_REGEX = /([^|]*)(?:\s*\|\s*.*)?$/m;
|
|
22675
22675
|
if (node.type === liquid_html_parser_1.NodeTypes.LiquidTag && node.name !== "echo")
|
|
22676
22676
|
return;
|
|
@@ -22682,7 +22682,7 @@ var require_InvalidEchoValue = __commonJS({
|
|
|
22682
22682
|
let match2 = markup.match(ECHO_MARKUP_REGEX);
|
|
22683
22683
|
if (!match2)
|
|
22684
22684
|
return;
|
|
22685
|
-
let [, echoValue] = match2, firstEchoValue = (
|
|
22685
|
+
let [, echoValue] = match2, firstEchoValue = (_a50 = (0, utils_1.getValuesInMarkup)(echoValue).at(0)) === null || _a50 === void 0 ? void 0 : _a50.value;
|
|
22686
22686
|
if (!firstEchoValue) {
|
|
22687
22687
|
let startIndex2 = node.source.indexOf(markup, node.position.start), endIndex2 = startIndex2 + markup.length;
|
|
22688
22688
|
return {
|
|
@@ -22787,12 +22787,12 @@ var require_InvalidConditionalNode = __commonJS({
|
|
|
22787
22787
|
return null;
|
|
22788
22788
|
}
|
|
22789
22789
|
function checkLaxParsingIssues(tokens) {
|
|
22790
|
-
var
|
|
22790
|
+
var _a50;
|
|
22791
22791
|
for (let i = 0; i < tokens.length - 1; i++) {
|
|
22792
22792
|
let current = tokens[i], next = tokens[i + 1];
|
|
22793
22793
|
if (current.type === "literal" && !isOperatorToken(next)) {
|
|
22794
22794
|
let remaining = tokens.slice(i + 1);
|
|
22795
|
-
if (!(((
|
|
22795
|
+
if (!(((_a50 = remaining[0]) === null || _a50 === void 0 ? void 0 : _a50.type) === "variable" && remaining.some(isOperatorToken))) {
|
|
22796
22796
|
let ignored = remaining.map((t18) => t18.value).join(" ");
|
|
22797
22797
|
return /&&|\|\|/.test(ignored) ? {
|
|
22798
22798
|
message: `Expression stops at truthy value '${current.value}', and will ignore: '${ignored}'. Use 'and'/'or' instead of '&&'/'||' for multiple conditions`,
|
|
@@ -22911,8 +22911,8 @@ var require_InvalidLoopArguments = __commonJS({
|
|
|
22911
22911
|
}
|
|
22912
22912
|
exports.detectInvalidLoopArguments = detectInvalidLoopArguments;
|
|
22913
22913
|
function isSupportedTagArgument(tags, tagName, key, positional) {
|
|
22914
|
-
var
|
|
22915
|
-
return ((_b = (
|
|
22914
|
+
var _a50, _b;
|
|
22915
|
+
return ((_b = (_a50 = tags.find((tag) => tag.name === tagName)) === null || _a50 === void 0 ? void 0 : _a50.parameters) === null || _b === void 0 ? void 0 : _b.some((parameter) => parameter.name === key && parameter.positional === positional)) || !1;
|
|
22916
22916
|
}
|
|
22917
22917
|
}
|
|
22918
22918
|
});
|
|
@@ -22969,13 +22969,13 @@ var require_InvalidFilterName = __commonJS({
|
|
|
22969
22969
|
}
|
|
22970
22970
|
exports.detectInvalidFilterName = detectInvalidFilterName;
|
|
22971
22971
|
async function detectInvalidFilterNameInMarkup(node, markup, filters) {
|
|
22972
|
-
var
|
|
22972
|
+
var _a50;
|
|
22973
22973
|
let knownFilters = filters, trimmedMarkup = markup.trim(), problems = [], filterPattern = /\|\s*([a-zA-Z][a-zA-Z0-9_]*)/g, matches2 = Array.from(trimmedMarkup.matchAll(filterPattern));
|
|
22974
22974
|
for (let match2 of matches2) {
|
|
22975
22975
|
let filterName = match2[1];
|
|
22976
22976
|
if (!knownFilters.some((filter) => filter.name === filterName))
|
|
22977
22977
|
continue;
|
|
22978
|
-
let filterEndIndex = match2.index + match2[0].length, invalidSegment = (
|
|
22978
|
+
let filterEndIndex = match2.index + match2[0].length, invalidSegment = (_a50 = trimmedMarkup.slice(filterEndIndex).match(/^(?!\s*(?::|$|\|\s*[a-zA-Z]|\|\s*\||\s*\|\s*(?:[}%]|$)))([^:|]+?)(?=\s*(?::|$|\|))/)) === null || _a50 === void 0 ? void 0 : _a50[1];
|
|
22979
22979
|
if (!invalidSegment)
|
|
22980
22980
|
continue;
|
|
22981
22981
|
let trailingStartInSource = node.source.indexOf(markup, node.position.start) + filterEndIndex, trailingEndInSource = trailingStartInSource + invalidSegment.length;
|
|
@@ -23080,8 +23080,8 @@ var require_liquid_html_syntax_error = __commonJS({
|
|
|
23080
23080
|
targets: []
|
|
23081
23081
|
},
|
|
23082
23082
|
create(context) {
|
|
23083
|
-
var
|
|
23084
|
-
let ast = context.file.ast, filtersPromise = (
|
|
23083
|
+
var _a50, _b;
|
|
23084
|
+
let ast = context.file.ast, filtersPromise = (_a50 = context.themeDocset) === null || _a50 === void 0 ? void 0 : _a50.filters(), tagsPromise = (_b = context.themeDocset) === null || _b === void 0 ? void 0 : _b.tags();
|
|
23085
23085
|
return (0, utils_1.isError)(ast) ? {
|
|
23086
23086
|
async onCodePathStart(file) {
|
|
23087
23087
|
if (isParsingErrorWithLocation(ast)) {
|
|
@@ -23171,8 +23171,8 @@ var require_matching_translations = __commonJS({
|
|
|
23171
23171
|
if (!isLocaleFile || isDefaultTranslationsFile || ast instanceof Error)
|
|
23172
23172
|
return {};
|
|
23173
23173
|
let hasDefaultTranslations = () => defaultTranslations.size > 0, isTerminalNode = ({ type }) => type === "Literal", isPluralizationNode = (node) => PLURALIZATION_KEYS.has(node.key.value), isShopifyPath = (path3) => path3.startsWith("shopify."), hasDefaultTranslation = (translationPath) => {
|
|
23174
|
-
var
|
|
23175
|
-
return (
|
|
23174
|
+
var _a50;
|
|
23175
|
+
return (_a50 = defaultTranslations.has(translationPath)) !== null && _a50 !== void 0 ? _a50 : !1;
|
|
23176
23176
|
}, isPluralizationPath = (path3) => [...PLURALIZATION_KEYS].some((key) => path3.endsWith(key)), jsonPaths = (json) => Object.keys(json).reduce((acc, key) => {
|
|
23177
23177
|
if (typeof json[key] != "object")
|
|
23178
23178
|
return acc.concat(key);
|
|
@@ -23185,13 +23185,13 @@ var require_matching_translations = __commonJS({
|
|
|
23185
23185
|
return i;
|
|
23186
23186
|
return minLength;
|
|
23187
23187
|
}, closestTranslationKey = (translationKey) => {
|
|
23188
|
-
var
|
|
23188
|
+
var _a50;
|
|
23189
23189
|
let translationKeyParts = translationKey.split("."), closestMatch = "", maxCommonParts = 0;
|
|
23190
23190
|
for (let path3 of nodesByPath.keys()) {
|
|
23191
23191
|
let pathParts = path3.split("."), commonParts = countCommonParts(pathParts, translationKeyParts);
|
|
23192
23192
|
commonParts > maxCommonParts && (maxCommonParts = commonParts, closestMatch = path3);
|
|
23193
23193
|
}
|
|
23194
|
-
return (
|
|
23194
|
+
return (_a50 = nodesByPath.get(closestMatch)) !== null && _a50 !== void 0 ? _a50 : ast;
|
|
23195
23195
|
};
|
|
23196
23196
|
return {
|
|
23197
23197
|
async onCodePathStart() {
|
|
@@ -23352,8 +23352,8 @@ var require_missing_render_snippet_arguments = __commonJS({
|
|
|
23352
23352
|
if (!liquidDocParameters)
|
|
23353
23353
|
return;
|
|
23354
23354
|
let providedParams = new Map(node.args.map((arg) => [arg.name, arg])), missingRequiredParams = Array.from(liquidDocParameters.values()).filter((p) => {
|
|
23355
|
-
var
|
|
23356
|
-
return p.required && !providedParams.has(p.name) && p.name !== ((
|
|
23355
|
+
var _a50;
|
|
23356
|
+
return p.required && !providedParams.has(p.name) && p.name !== ((_a50 = node.alias) === null || _a50 === void 0 ? void 0 : _a50.value);
|
|
23357
23357
|
});
|
|
23358
23358
|
(0, arguments_1.reportMissingArguments)(context, node, missingRequiredParams, snippetName);
|
|
23359
23359
|
}
|
|
@@ -23543,8 +23543,8 @@ var require_suggestions = __commonJS({
|
|
|
23543
23543
|
var utils_1 = require_utils(), suggestionMessage = (attr) => `Use an HTML script tag with the ${attr} attribute instead`, liquidFilterSuggestion = (attr, node, parentNode, grandParentNode) => ({
|
|
23544
23544
|
message: suggestionMessage(attr),
|
|
23545
23545
|
fix(corrector) {
|
|
23546
|
-
var
|
|
23547
|
-
let url = `{{ ${node.source.slice(parentNode.expression.position.start, (_b = (
|
|
23546
|
+
var _a50, _b;
|
|
23547
|
+
let url = `{{ ${node.source.slice(parentNode.expression.position.start, (_b = (_a50 = (0, utils_1.last)(parentNode.filters, -1)) === null || _a50 === void 0 ? void 0 : _a50.position.end) !== null && _b !== void 0 ? _b : node.position.start)} }}`;
|
|
23548
23548
|
corrector.replace(grandParentNode.position.start, grandParentNode.position.end, `<script src="${url}" ${attr}></script>`);
|
|
23549
23549
|
}
|
|
23550
23550
|
});
|
|
@@ -23741,10 +23741,10 @@ var require_schema_presets_static_blocks = __commonJS({
|
|
|
23741
23741
|
}
|
|
23742
23742
|
return {
|
|
23743
23743
|
async LiquidTag(node) {
|
|
23744
|
-
var
|
|
23744
|
+
var _a50, _b;
|
|
23745
23745
|
if (node.name !== liquid_html_parser_1.NamedTags.content_for || !(0, markup_1.isContentForBlock)(node.markup))
|
|
23746
23746
|
return;
|
|
23747
|
-
let idValue = (
|
|
23747
|
+
let idValue = (_a50 = node.markup.args.find((arg) => arg.name === "id")) === null || _a50 === void 0 ? void 0 : _a50.value, typeArg = (_b = node.markup.args.find((arg) => arg.name === "type")) === null || _b === void 0 ? void 0 : _b.value;
|
|
23748
23748
|
if (!typeArg || typeArg.type !== liquid_html_parser_1.NodeTypes.String)
|
|
23749
23749
|
return;
|
|
23750
23750
|
let typeValue = typeArg.value;
|
|
@@ -23969,13 +23969,13 @@ var require_required_layout_theme_object = __commonJS({
|
|
|
23969
23969
|
(0, utils_1.isHtmlTag)(node, "head") ? headTag = node : (0, utils_1.isHtmlTag)(node, "body") && (bodyTag = node);
|
|
23970
23970
|
},
|
|
23971
23971
|
async onCodePathEnd() {
|
|
23972
|
-
var
|
|
23972
|
+
var _a50, _b;
|
|
23973
23973
|
for (let requiredObject of requiredObjects)
|
|
23974
23974
|
if (!foundObjects.has(requiredObject)) {
|
|
23975
23975
|
let message = `The required object '{{ ${requiredObject} }}' is missing in layout/theme.liquid`, insertionNode = requiredObject === "content_for_header" ? headTag : bodyTag, fixInsertPosition = insertionNode?.blockEndPosition.start;
|
|
23976
23976
|
context.report({
|
|
23977
23977
|
message,
|
|
23978
|
-
startIndex: (
|
|
23978
|
+
startIndex: (_a50 = insertionNode?.position.start) !== null && _a50 !== void 0 ? _a50 : 0,
|
|
23979
23979
|
endIndex: (_b = insertionNode?.position.end) !== null && _b !== void 0 ? _b : 0,
|
|
23980
23980
|
fix: fixInsertPosition !== void 0 ? (corrector) => corrector.insert(fixInsertPosition, `{{ ${requiredObject} }}`) : void 0
|
|
23981
23981
|
});
|
|
@@ -24151,15 +24151,15 @@ var require_translation_key_exists = __commonJS({
|
|
|
24151
24151
|
});
|
|
24152
24152
|
},
|
|
24153
24153
|
async LiquidRawTag(node) {
|
|
24154
|
-
var
|
|
24154
|
+
var _a50;
|
|
24155
24155
|
if (node.name !== "schema" || node.body.kind !== "json")
|
|
24156
24156
|
return;
|
|
24157
24157
|
let defaultLocale = await context.getDefaultLocale(), schema = (0, json_1.parseJSON)(node.body.value);
|
|
24158
|
-
(0, utils_1.isError)(schema) && schema instanceof SyntaxError || (schemaLocales = (
|
|
24158
|
+
(0, utils_1.isError)(schema) && schema instanceof SyntaxError || (schemaLocales = (_a50 = schema.locales) === null || _a50 === void 0 ? void 0 : _a50[defaultLocale]);
|
|
24159
24159
|
},
|
|
24160
24160
|
async onCodePathEnd() {
|
|
24161
|
-
var
|
|
24162
|
-
let defaultTranslations = await context.getDefaultTranslations(), defaultLocale = await context.getDefaultLocale(), systemTranslations = await ((
|
|
24161
|
+
var _a50;
|
|
24162
|
+
let defaultTranslations = await context.getDefaultTranslations(), defaultLocale = await context.getDefaultLocale(), systemTranslations = await ((_a50 = context.themeDocset) === null || _a50 === void 0 ? void 0 : _a50.systemTranslations()), systemTranslationsKeys = Object.keys(systemTranslations ?? {});
|
|
24163
24163
|
!defaultTranslations && systemTranslationsKeys.length === 0 || nodes.forEach(({ translationKey, startIndex, endIndex }) => {
|
|
24164
24164
|
if (keyExists(translationKey, defaultTranslations) || keyExists(translationKey, schemaLocales) || systemTranslationsKeys.includes(translationKey))
|
|
24165
24165
|
return;
|
|
@@ -24236,10 +24236,10 @@ var require_unclosed_html_element = __commonJS({
|
|
|
24236
24236
|
stacks.identifiers.add(identifier), stacks.close.has(identifier) || stacks.close.set(identifier, []), stacks.close.get(identifier).push(node);
|
|
24237
24237
|
},
|
|
24238
24238
|
async onCodePathEnd() {
|
|
24239
|
-
var
|
|
24239
|
+
var _a50, _b;
|
|
24240
24240
|
for (let [grandparent, stacks] of stacksByGrandparent)
|
|
24241
24241
|
for (let identifier of stacks.identifiers) {
|
|
24242
|
-
let openNodes = (
|
|
24242
|
+
let openNodes = (_a50 = stacks.open.get(identifier)) !== null && _a50 !== void 0 ? _a50 : [], closeNodes = (_b = stacks.close.get(identifier)) !== null && _b !== void 0 ? _b : [], nodes = [].concat(openNodes, closeNodes).sort((a3, b) => a3.position.start - b.position.start), stack = [];
|
|
24243
24243
|
for (let node of nodes)
|
|
24244
24244
|
node.type === liquid_html_parser_1.NodeTypes.HtmlElement ? stack.push(node) : stack.length > 0 && getName2(node) === getName2(stack.at(-1)) && stack.at(-1).type === liquid_html_parser_1.NodeTypes.HtmlElement && node.type === liquid_html_parser_1.NodeTypes.HtmlDanglingMarkerClose ? stack.pop() : stack.push(node);
|
|
24245
24245
|
for (let node of stack)
|
|
@@ -24294,7 +24294,7 @@ var require_unclosed_html_element = __commonJS({
|
|
|
24294
24294
|
return typeof conditions == "string" ? conditions : conditions.map(getConditionIdentifierForMarkup).join(" or ");
|
|
24295
24295
|
}
|
|
24296
24296
|
function getConditionIdentifierForMarkup(condition) {
|
|
24297
|
-
var
|
|
24297
|
+
var _a50;
|
|
24298
24298
|
if (typeof condition == "string")
|
|
24299
24299
|
return condition;
|
|
24300
24300
|
switch (condition.type) {
|
|
@@ -24305,7 +24305,7 @@ var require_unclosed_html_element = __commonJS({
|
|
|
24305
24305
|
case liquid_html_parser_1.NodeTypes.Number:
|
|
24306
24306
|
return condition.value;
|
|
24307
24307
|
case liquid_html_parser_1.NodeTypes.VariableLookup:
|
|
24308
|
-
return `${(
|
|
24308
|
+
return `${(_a50 = condition.name) !== null && _a50 !== void 0 ? _a50 : ""}${condition.lookups.map((expression) => `[${getConditionIdentifierForMarkup(expression)}]`)}`;
|
|
24309
24309
|
case liquid_html_parser_1.NodeTypes.Range:
|
|
24310
24310
|
return `(${getConditionIdentifierForMarkup(condition.start)}..${getConditionIdentifierForMarkup(condition.end)})`;
|
|
24311
24311
|
case liquid_html_parser_1.NodeTypes.Comparison:
|
|
@@ -24356,10 +24356,10 @@ var require_liquidDoc = __commonJS({
|
|
|
24356
24356
|
node.name === "doc" && (hasDocTag = !0);
|
|
24357
24357
|
},
|
|
24358
24358
|
LiquidDocParamNode(node) {
|
|
24359
|
-
var
|
|
24359
|
+
var _a50, _b, _c, _d;
|
|
24360
24360
|
return {
|
|
24361
24361
|
name: node.paramName.value,
|
|
24362
|
-
description: (_b = (
|
|
24362
|
+
description: (_b = (_a50 = node.paramDescription) === null || _a50 === void 0 ? void 0 : _a50.value) !== null && _b !== void 0 ? _b : null,
|
|
24363
24363
|
type: (_d = (_c = node.paramType) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : null,
|
|
24364
24364
|
required: node.required,
|
|
24365
24365
|
nodeType: "param"
|
|
@@ -24448,24 +24448,24 @@ var require_undefined_object = __commonJS({
|
|
|
24448
24448
|
return {};
|
|
24449
24449
|
let themeDocset = context.themeDocset, scopedVariables = /* @__PURE__ */ new Map(), fileScopedVariables = /* @__PURE__ */ new Set(), variables = [];
|
|
24450
24450
|
function indexVariableScope(variableName, scope) {
|
|
24451
|
-
var
|
|
24451
|
+
var _a50;
|
|
24452
24452
|
if (!variableName)
|
|
24453
24453
|
return;
|
|
24454
|
-
let indexedScope = (
|
|
24454
|
+
let indexedScope = (_a50 = scopedVariables.get(variableName)) !== null && _a50 !== void 0 ? _a50 : [];
|
|
24455
24455
|
scopedVariables.set(variableName, indexedScope.concat(scope));
|
|
24456
24456
|
}
|
|
24457
24457
|
return {
|
|
24458
24458
|
async LiquidDocParamNode(node) {
|
|
24459
|
-
var
|
|
24460
|
-
let paramName = (
|
|
24459
|
+
var _a50;
|
|
24460
|
+
let paramName = (_a50 = node.paramName) === null || _a50 === void 0 ? void 0 : _a50.value;
|
|
24461
24461
|
paramName && fileScopedVariables.add(paramName);
|
|
24462
24462
|
},
|
|
24463
24463
|
async LiquidTag(node, ancestors) {
|
|
24464
|
-
var
|
|
24464
|
+
var _a50, _b, _c, _d;
|
|
24465
24465
|
(0, utils_2.isWithinRawTagThatDoesNotParseItsContents)(ancestors) || (isLiquidTagAssign(node) && indexVariableScope(node.markup.name, {
|
|
24466
24466
|
start: node.blockStartPosition.end
|
|
24467
24467
|
}), isLiquidTagCapture(node) && indexVariableScope(node.markup.name, {
|
|
24468
|
-
start: (
|
|
24468
|
+
start: (_a50 = node.blockEndPosition) === null || _a50 === void 0 ? void 0 : _a50.end
|
|
24469
24469
|
}), ["form", "paginate"].includes(node.name) && indexVariableScope(node.name, {
|
|
24470
24470
|
start: node.blockStartPosition.end,
|
|
24471
24471
|
end: (_b = node.blockEndPosition) === null || _b === void 0 ? void 0 : _b.start
|
|
@@ -25383,8 +25383,8 @@ var require_valid_render_snippet_argument_types = __commonJS({
|
|
|
25383
25383
|
},
|
|
25384
25384
|
create(context) {
|
|
25385
25385
|
function findAndReportAliasType(node, liquidDocParameters) {
|
|
25386
|
-
var
|
|
25387
|
-
if (node.alias && (!((
|
|
25386
|
+
var _a50, _b, _c;
|
|
25387
|
+
if (node.alias && (!((_a50 = node.variable) === null || _a50 === void 0) && _a50.name) && node.variable.name.type !== liquid_html_parser_1.NodeTypes.VariableLookup) {
|
|
25388
25388
|
let paramIsDefinedWithType = (_c = (_b = liquidDocParameters.get(node.alias.value)) === null || _b === void 0 ? void 0 : _b.type) === null || _c === void 0 ? void 0 : _c.toLowerCase();
|
|
25389
25389
|
if (paramIsDefinedWithType) {
|
|
25390
25390
|
let providedParamType = (0, utils_1.inferArgumentType)(node.variable.name);
|
|
@@ -25542,7 +25542,7 @@ var require_valid_settings_key = __commonJS({
|
|
|
25542
25542
|
create(context) {
|
|
25543
25543
|
return {
|
|
25544
25544
|
async LiquidRawTag(node) {
|
|
25545
|
-
var
|
|
25545
|
+
var _a50;
|
|
25546
25546
|
if (node.name !== "schema" || node.body.kind !== "json")
|
|
25547
25547
|
return;
|
|
25548
25548
|
let offset = node.blockStartPosition.end, schema = await (0, to_schema_1.getSchema)(context), { validSchema, ast } = schema ?? {};
|
|
@@ -25556,7 +25556,7 @@ var require_valid_settings_key = __commonJS({
|
|
|
25556
25556
|
}
|
|
25557
25557
|
if ((0, to_schema_1.isSectionSchema)(schema) && "default" in validSchema && validSchema.default) {
|
|
25558
25558
|
let settingsNode = (0, json_1.nodeAtPath)(ast, ["default", "settings"]);
|
|
25559
|
-
validateSettingsKey(context, offset, settingsNode, validSchema.settings), (
|
|
25559
|
+
validateSettingsKey(context, offset, settingsNode, validSchema.settings), (_a50 = validSchema.default.blocks) === null || _a50 === void 0 || _a50.forEach((block, i) => {
|
|
25560
25560
|
let settingsNode2 = (0, json_1.nodeAtPath)(ast, ["default", "blocks", i, "settings"]);
|
|
25561
25561
|
validateReferencedBlock(context, offset, settingsNode2, rootLevelLocalBlocks, block);
|
|
25562
25562
|
});
|
|
@@ -25571,7 +25571,7 @@ var require_valid_settings_key = __commonJS({
|
|
|
25571
25571
|
}
|
|
25572
25572
|
};
|
|
25573
25573
|
async function validateReferencedBlock(context, offset, settingsNode, localBlocks, referencedBlock) {
|
|
25574
|
-
var
|
|
25574
|
+
var _a50;
|
|
25575
25575
|
if (localBlocks.length > 0) {
|
|
25576
25576
|
let localBlock = localBlocks.find((localBlock2) => localBlock2.node.type === referencedBlock.type);
|
|
25577
25577
|
if (!localBlock)
|
|
@@ -25579,7 +25579,7 @@ var require_valid_settings_key = __commonJS({
|
|
|
25579
25579
|
let localBlockNode = localBlock.node;
|
|
25580
25580
|
validateSettingsKey(context, offset, settingsNode, localBlockNode.settings);
|
|
25581
25581
|
} else {
|
|
25582
|
-
let blockSchema = await ((
|
|
25582
|
+
let blockSchema = await ((_a50 = context.getBlockSchema) === null || _a50 === void 0 ? void 0 : _a50.call(context, referencedBlock.type)), { validSchema: validBlockSchema } = blockSchema ?? {};
|
|
25583
25583
|
if (!validBlockSchema || validBlockSchema instanceof Error)
|
|
25584
25584
|
return;
|
|
25585
25585
|
validateSettingsKey(context, offset, settingsNode, validBlockSchema.settings, referencedBlock);
|
|
@@ -25754,11 +25754,11 @@ var require_valid_visible_if = __commonJS({
|
|
|
25754
25754
|
create(context) {
|
|
25755
25755
|
return {
|
|
25756
25756
|
async LiquidRawTag(node) {
|
|
25757
|
-
var
|
|
25757
|
+
var _a50;
|
|
25758
25758
|
if (node.name !== "schema" || node.body.kind !== "json")
|
|
25759
25759
|
return;
|
|
25760
25760
|
let schema = await (0, to_schema_1.getSchema)(context), { validSchema, ast } = schema ?? {};
|
|
25761
|
-
if (!validSchema || validSchema instanceof Error || !(!((
|
|
25761
|
+
if (!validSchema || validSchema instanceof Error || !(!((_a50 = validSchema.settings) === null || _a50 === void 0) && _a50.some((setting) => "visible_if" in setting)) || !ast || ast instanceof Error)
|
|
25762
25762
|
return;
|
|
25763
25763
|
let offset = node.blockStartPosition.end, settings = Object.fromEntries((await (0, visible_if_utils_1.getGlobalSettings)(context)).map((s) => [s, !0])), currentFileSettings = Object.fromEntries(validSchema.settings.map((setting) => [setting.id, !0])), vars = { settings };
|
|
25764
25764
|
(0, to_schema_1.isSectionSchema)(schema) ? vars.section = { settings: currentFileSettings } : (0, to_schema_1.isBlockSchema)(schema) && (vars.block = { settings: currentFileSettings });
|
|
@@ -30143,7 +30143,7 @@ var require_dist3 = __commonJS({
|
|
|
30143
30143
|
var defaultErrorHandler = (_error) => {
|
|
30144
30144
|
};
|
|
30145
30145
|
async function check2(theme, config2, injectedDependencies) {
|
|
30146
|
-
var
|
|
30146
|
+
var _a50;
|
|
30147
30147
|
let pipelines = [], offenses = [], { fs: fs7 } = injectedDependencies, { rootUri } = config2, dependencies = {
|
|
30148
30148
|
...injectedDependencies,
|
|
30149
30149
|
mode: config2.context,
|
|
@@ -30153,7 +30153,7 @@ var require_dist3 = __commonJS({
|
|
|
30153
30153
|
getDefaultTranslations: (0, context_utils_1.makeGetDefaultTranslations)(fs7, theme, rootUri),
|
|
30154
30154
|
getDefaultSchemaLocale: (0, context_utils_1.makeGetDefaultSchemaLocale)(fs7, rootUri),
|
|
30155
30155
|
getDefaultSchemaTranslations: (0, context_utils_1.makeGetDefaultSchemaTranslations)(fs7, theme, rootUri),
|
|
30156
|
-
getMetafieldDefinitions: (
|
|
30156
|
+
getMetafieldDefinitions: (_a50 = injectedDependencies.getMetafieldDefinitions) !== null && _a50 !== void 0 ? _a50 : (0, context_utils_1.makeGetMetafieldDefinitions)(fs7)
|
|
30157
30157
|
}, { DisabledChecksVisitor, isDisabled } = (0, disabled_checks_1.createDisabledChecksModule)(), jsonValidator = await JSONValidator_1.JSONValidator.create(dependencies.jsonValidationSet, config2), validateJSON = jsonValidator?.validate;
|
|
30158
30158
|
dependencies.themeDocset && !dependencies.themeDocset.isAugmented && (dependencies.themeDocset = new AugmentedThemeDocset_1.AugmentedThemeDocset(dependencies.themeDocset));
|
|
30159
30159
|
for (let type of Object.values(types_1.SourceCodeType))
|
|
@@ -30194,13 +30194,13 @@ var require_dist3 = __commonJS({
|
|
|
30194
30194
|
toUri: (relativePath2) => path3.join(config2.rootUri, ...relativePath2.split("/")),
|
|
30195
30195
|
toRelativePath: (uri) => path3.relative(uri, config2.rootUri),
|
|
30196
30196
|
report(problem) {
|
|
30197
|
-
var
|
|
30197
|
+
var _a50;
|
|
30198
30198
|
offenses.push({
|
|
30199
30199
|
type: check3.meta.type,
|
|
30200
30200
|
check: check3.meta.code,
|
|
30201
30201
|
message: problem.message,
|
|
30202
30202
|
uri: file.uri,
|
|
30203
|
-
severity: (
|
|
30203
|
+
severity: (_a50 = checkSettings?.severity) !== null && _a50 !== void 0 ? _a50 : check3.meta.severity,
|
|
30204
30204
|
start: (0, utils_1.getPosition)(file.source, problem.startIndex),
|
|
30205
30205
|
end: (0, utils_1.getPosition)(file.source, problem.endIndex),
|
|
30206
30206
|
fix: problem.fix,
|
|
@@ -30211,10 +30211,10 @@ var require_dist3 = __commonJS({
|
|
|
30211
30211
|
};
|
|
30212
30212
|
}
|
|
30213
30213
|
function createSettings(checkSettings, schema) {
|
|
30214
|
-
var
|
|
30214
|
+
var _a50;
|
|
30215
30215
|
let settings = {};
|
|
30216
30216
|
for (let [key, schemaProp] of Object.entries(schema))
|
|
30217
|
-
settings[key] = (
|
|
30217
|
+
settings[key] = (_a50 = checkSettings?.[key]) !== null && _a50 !== void 0 ? _a50 : schemaProp.defaultValue();
|
|
30218
30218
|
return settings;
|
|
30219
30219
|
}
|
|
30220
30220
|
function checksOfType(type, checks) {
|
|
@@ -30435,8 +30435,8 @@ var require_themeLiquidDocsManager = __commonJS({
|
|
|
30435
30435
|
});
|
|
30436
30436
|
}
|
|
30437
30437
|
async latestRevision() {
|
|
30438
|
-
var
|
|
30439
|
-
return (
|
|
30438
|
+
var _a50;
|
|
30439
|
+
return (_a50 = (await findSuitableResource([loader(() => this.load("latest"), "loadLatestRevision")], JSON.parse, {}, this.log)).revision) !== null && _a50 !== void 0 ? _a50 : "";
|
|
30440
30440
|
}
|
|
30441
30441
|
async loadResource(name) {
|
|
30442
30442
|
return await this.setup(), this.load(name).then((0, utils_1.tap)(() => this.log(`Loaded resource from ${(0, themeLiquidDocsDownloader_1.resourcePath)(name)}`)));
|
|
@@ -31677,7 +31677,7 @@ var require_load_config_description = __commonJS({
|
|
|
31677
31677
|
exports.loadConfigDescription = void 0;
|
|
31678
31678
|
var theme_check_common_1 = require_dist3(), node_path_1 = __importDefault(__require("node:path")), file_utils_1 = require_file_utils2(), installation_location_1 = require_installation_location(), load_third_party_checks_1 = require_load_third_party_checks(), vscode_uri_1 = require_umd(), flatten = (arrs) => arrs.flat();
|
|
31679
31679
|
async function loadConfigDescription(configDescription, root) {
|
|
31680
|
-
var
|
|
31680
|
+
var _a50;
|
|
31681
31681
|
let nodeModuleRoot = await findNodeModuleRoot(root), thirdPartyChecksPaths = await Promise.all([
|
|
31682
31682
|
(0, load_third_party_checks_1.findThirdPartyChecks)((0, installation_location_1.thisNodeModuleRoot)()),
|
|
31683
31683
|
(0, load_third_party_checks_1.findThirdPartyChecks)(nodeModuleRoot)
|
|
@@ -31687,7 +31687,7 @@ var require_load_config_description = __commonJS({
|
|
|
31687
31687
|
]), checks = theme_check_common_1.allChecks.concat(thirdPartyChecks).filter(isEnabledBy(configDescription)), rootUri = vscode_uri_1.URI.file(root);
|
|
31688
31688
|
return {
|
|
31689
31689
|
settings: unaliasedSettings(configDescription.checkSettings, checks),
|
|
31690
|
-
context: (
|
|
31690
|
+
context: (_a50 = configDescription.context) !== null && _a50 !== void 0 ? _a50 : "theme",
|
|
31691
31691
|
checks,
|
|
31692
31692
|
ignore: configDescription.ignore,
|
|
31693
31693
|
rootUri: resolveRoot(rootUri, configDescription.root)
|
|
@@ -31702,8 +31702,8 @@ var require_load_config_description = __commonJS({
|
|
|
31702
31702
|
return theme_check_common_1.path.resolve(root, pathLike);
|
|
31703
31703
|
}
|
|
31704
31704
|
var isEnabledBy = (config2) => (checkDefinition) => {
|
|
31705
|
-
var
|
|
31706
|
-
let checkSettings = (
|
|
31705
|
+
var _a50;
|
|
31706
|
+
let checkSettings = (_a50 = config2.checkSettings[checkDefinition.meta.code]) !== null && _a50 !== void 0 ? _a50 : aliasedSettings(config2, checkDefinition);
|
|
31707
31707
|
return checkSettings ? checkSettings.enabled : !1;
|
|
31708
31708
|
};
|
|
31709
31709
|
function aliasedSettings(config2, checkDefinition) {
|
|
@@ -31718,8 +31718,8 @@ var require_load_config_description = __commonJS({
|
|
|
31718
31718
|
}
|
|
31719
31719
|
function unaliasedCode(code, checks) {
|
|
31720
31720
|
let check2 = checks.find((check3) => {
|
|
31721
|
-
var
|
|
31722
|
-
return check3.meta.code === code || ((
|
|
31721
|
+
var _a50;
|
|
31722
|
+
return check3.meta.code === code || ((_a50 = check3.meta.aliases) === null || _a50 === void 0 ? void 0 : _a50.find((alias) => alias === code));
|
|
31723
31723
|
});
|
|
31724
31724
|
return check2?.meta.code;
|
|
31725
31725
|
}
|
|
@@ -37345,7 +37345,7 @@ var require_merge_fragments = __commonJS({
|
|
|
37345
37345
|
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
37346
37346
|
exports.mergeFragments = void 0;
|
|
37347
37347
|
function mergeFragments(baseConfigs, config2) {
|
|
37348
|
-
var
|
|
37348
|
+
var _a50;
|
|
37349
37349
|
return {
|
|
37350
37350
|
// we use the last one defined
|
|
37351
37351
|
root: selectLatest(baseConfigs.map((b) => b.root), config2.root),
|
|
@@ -37358,7 +37358,7 @@ var require_merge_fragments = __commonJS({
|
|
|
37358
37358
|
// we merge deep the settings
|
|
37359
37359
|
checkSettings: baseConfigs.map((b) => b.checkSettings).concat(config2.checkSettings).reduce(mergeDeep),
|
|
37360
37360
|
// We use the last one defined, or default to 'theme'
|
|
37361
|
-
context: (
|
|
37361
|
+
context: (_a50 = selectLatest(baseConfigs.map((b) => b.context), config2.context)) !== null && _a50 !== void 0 ? _a50 : "theme"
|
|
37362
37362
|
};
|
|
37363
37363
|
}
|
|
37364
37364
|
exports.mergeFragments = mergeFragments;
|
|
@@ -37657,20 +37657,20 @@ var require_dist6 = __commonJS({
|
|
|
37657
37657
|
// In the language server, this is memo'ed in DocumentManager, but we don't have that kind
|
|
37658
37658
|
// of luxury in CLI-mode.
|
|
37659
37659
|
getSectionSchema: async (name) => {
|
|
37660
|
-
var
|
|
37661
|
-
return (
|
|
37660
|
+
var _a50;
|
|
37661
|
+
return (_a50 = sectionSchemas.get(name)) === null || _a50 === void 0 ? void 0 : _a50();
|
|
37662
37662
|
},
|
|
37663
37663
|
getBlockSchema: async (name) => {
|
|
37664
|
-
var
|
|
37665
|
-
return (
|
|
37664
|
+
var _a50;
|
|
37665
|
+
return (_a50 = blockSchemas.get(name)) === null || _a50 === void 0 ? void 0 : _a50();
|
|
37666
37666
|
},
|
|
37667
37667
|
getAppBlockSchema: async (name) => {
|
|
37668
|
-
var
|
|
37669
|
-
return (
|
|
37668
|
+
var _a50;
|
|
37669
|
+
return (_a50 = blockSchemas.get(name)) === null || _a50 === void 0 ? void 0 : _a50();
|
|
37670
37670
|
},
|
|
37671
37671
|
getDocDefinition: async (relativePath2) => {
|
|
37672
|
-
var
|
|
37673
|
-
return (
|
|
37672
|
+
var _a50;
|
|
37673
|
+
return (_a50 = docDefinitions.get(relativePath2)) === null || _a50 === void 0 ? void 0 : _a50();
|
|
37674
37674
|
}
|
|
37675
37675
|
});
|
|
37676
37676
|
return {
|
|
@@ -37959,7 +37959,7 @@ var require_linkedMap = __commonJS({
|
|
|
37959
37959
|
"../../node_modules/.pnpm/vscode-jsonrpc@8.1.0/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(exports) {
|
|
37960
37960
|
"use strict";
|
|
37961
37961
|
init_cjs_shims();
|
|
37962
|
-
var
|
|
37962
|
+
var _a50;
|
|
37963
37963
|
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
37964
37964
|
exports.LRUCache = exports.LinkedMap = exports.Touch = void 0;
|
|
37965
37965
|
var Touch;
|
|
@@ -37968,7 +37968,7 @@ var require_linkedMap = __commonJS({
|
|
|
37968
37968
|
})(Touch = exports.Touch || (exports.Touch = {}));
|
|
37969
37969
|
var LinkedMap = class {
|
|
37970
37970
|
constructor() {
|
|
37971
|
-
this[
|
|
37971
|
+
this[_a50] = "LinkedMap", this._map = /* @__PURE__ */ new Map(), this._head = void 0, this._tail = void 0, this._size = 0, this._state = 0;
|
|
37972
37972
|
}
|
|
37973
37973
|
clear() {
|
|
37974
37974
|
this._map.clear(), this._head = void 0, this._tail = void 0, this._size = 0, this._state++;
|
|
@@ -38085,7 +38085,7 @@ var require_linkedMap = __commonJS({
|
|
|
38085
38085
|
};
|
|
38086
38086
|
return iterator;
|
|
38087
38087
|
}
|
|
38088
|
-
[(
|
|
38088
|
+
[(_a50 = Symbol.toStringTag, Symbol.iterator)]() {
|
|
38089
38089
|
return this.entries();
|
|
38090
38090
|
}
|
|
38091
38091
|
trimOld(newSize) {
|
|
@@ -40560,8 +40560,8 @@ var DocumentUri2, URI3, integer2, uinteger2, Position2, Range2, Location2, Locat
|
|
|
40560
40560
|
}
|
|
40561
40561
|
Diagnostic3.create = create2;
|
|
40562
40562
|
function is(value) {
|
|
40563
|
-
var
|
|
40564
|
-
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((
|
|
40563
|
+
var _a50, candidate = value;
|
|
40564
|
+
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));
|
|
40565
40565
|
}
|
|
40566
40566
|
Diagnostic3.is = is;
|
|
40567
40567
|
})(Diagnostic2 || (Diagnostic2 = {}));
|
|
@@ -44304,36 +44304,36 @@ var require_ClientCapabilities = __commonJS({
|
|
|
44304
44304
|
this.capabilities = capabilities, this.initializationOptions = initializationOptions;
|
|
44305
44305
|
}
|
|
44306
44306
|
get hasWorkspaceConfigurationSupport() {
|
|
44307
|
-
var
|
|
44308
|
-
return !!(!((_b = (
|
|
44307
|
+
var _a50, _b;
|
|
44308
|
+
return !!(!((_b = (_a50 = this.capabilities) === null || _a50 === void 0 ? void 0 : _a50.workspace) === null || _b === void 0) && _b.configuration);
|
|
44309
44309
|
}
|
|
44310
44310
|
get hasApplyEditSupport() {
|
|
44311
|
-
var
|
|
44312
|
-
return !!(!((_b = (
|
|
44311
|
+
var _a50, _b;
|
|
44312
|
+
return !!(!((_b = (_a50 = this.capabilities) === null || _a50 === void 0 ? void 0 : _a50.workspace) === null || _b === void 0) && _b.applyEdit);
|
|
44313
44313
|
}
|
|
44314
44314
|
get hasWorkspaceFoldersSupport() {
|
|
44315
|
-
var
|
|
44316
|
-
return !!(!((_b = (
|
|
44315
|
+
var _a50, _b;
|
|
44316
|
+
return !!(!((_b = (_a50 = this.capabilities) === null || _a50 === void 0 ? void 0 : _a50.workspace) === null || _b === void 0) && _b.workspaceFolders);
|
|
44317
44317
|
}
|
|
44318
44318
|
get hasDidChangeConfigurationDynamicRegistrationSupport() {
|
|
44319
|
-
var
|
|
44320
|
-
return !!(!((_c = (_b = (
|
|
44319
|
+
var _a50, _b, _c;
|
|
44320
|
+
return !!(!((_c = (_b = (_a50 = this.capabilities) === null || _a50 === void 0 ? void 0 : _a50.workspace) === null || _b === void 0 ? void 0 : _b.didChangeConfiguration) === null || _c === void 0) && _c.dynamicRegistration);
|
|
44321
44321
|
}
|
|
44322
44322
|
get hasDidChangeWatchedFilesDynamicRegistrationSupport() {
|
|
44323
|
-
var
|
|
44324
|
-
return !!(!((_c = (_b = (
|
|
44323
|
+
var _a50, _b, _c;
|
|
44324
|
+
return !!(!((_c = (_b = (_a50 = this.capabilities) === null || _a50 === void 0 ? void 0 : _a50.workspace) === null || _b === void 0 ? void 0 : _b.didChangeWatchedFiles) === null || _c === void 0) && _c.dynamicRegistration);
|
|
44325
44325
|
}
|
|
44326
44326
|
get hasShowDocumentSupport() {
|
|
44327
|
-
var
|
|
44328
|
-
return !!(!((_b = (
|
|
44327
|
+
var _a50, _b;
|
|
44328
|
+
return !!(!((_b = (_a50 = this.capabilities) === null || _a50 === void 0 ? void 0 : _a50.window) === null || _b === void 0) && _b.showDocument);
|
|
44329
44329
|
}
|
|
44330
44330
|
get hasProgressSupport() {
|
|
44331
|
-
var
|
|
44332
|
-
return !!(!((_b = (
|
|
44331
|
+
var _a50, _b;
|
|
44332
|
+
return !!(!((_b = (_a50 = this.capabilities) === null || _a50 === void 0 ? void 0 : _a50.window) === null || _b === void 0) && _b.workDoneProgress);
|
|
44333
44333
|
}
|
|
44334
44334
|
initializationOption(key, defaultValue) {
|
|
44335
|
-
var
|
|
44336
|
-
let direct = (
|
|
44335
|
+
var _a50;
|
|
44336
|
+
let direct = (_a50 = this.initializationOptions) === null || _a50 === void 0 ? void 0 : _a50[key];
|
|
44337
44337
|
if (direct !== void 0)
|
|
44338
44338
|
return direct;
|
|
44339
44339
|
let nested = pathGet(this.initializationOptions, key);
|
|
@@ -44420,7 +44420,7 @@ var require_ApplySuggestionProvider = __commonJS({
|
|
|
44420
44420
|
exports.applySuggestionCommand = exports.ApplySuggestionProvider = void 0;
|
|
44421
44421
|
var theme_check_common_1 = require_dist3(), vscode_languageserver_1 = require_main4(), BaseExecuteCommandProvider_1 = require_BaseExecuteCommandProvider(), ApplySuggestionProvider = class extends BaseExecuteCommandProvider_1.BaseExecuteCommandProvider {
|
|
44422
44422
|
async execute(uri, version, anomalyId, suggestionIndex) {
|
|
44423
|
-
var
|
|
44423
|
+
var _a50;
|
|
44424
44424
|
if (!this.clientCapabilities.hasApplyEditSupport)
|
|
44425
44425
|
return;
|
|
44426
44426
|
let diagnostics = this.diagnosticsManager.get(uri), document2 = this.documentManager.get(uri);
|
|
@@ -44429,7 +44429,7 @@ var require_ApplySuggestionProvider = __commonJS({
|
|
|
44429
44429
|
let anomaly = diagnostics.anomalies[anomalyId];
|
|
44430
44430
|
if (!anomaly)
|
|
44431
44431
|
return;
|
|
44432
|
-
let offense = anomaly.offense, suggestion = (
|
|
44432
|
+
let offense = anomaly.offense, suggestion = (_a50 = offense.suggest) === null || _a50 === void 0 ? void 0 : _a50[suggestionIndex];
|
|
44433
44433
|
if (!suggestion)
|
|
44434
44434
|
return;
|
|
44435
44435
|
let corrector = (0, theme_check_common_1.createCorrector)(document2.type, document2.source);
|
|
@@ -44540,10 +44540,10 @@ var require_ExecuteCommandProvider = __commonJS({
|
|
|
44540
44540
|
};
|
|
44541
44541
|
}
|
|
44542
44542
|
async execute(params) {
|
|
44543
|
-
var
|
|
44543
|
+
var _a50;
|
|
44544
44544
|
if (!isKnownCommand(params.command))
|
|
44545
44545
|
return;
|
|
44546
|
-
let provider = this.commands[params.command], args = (
|
|
44546
|
+
let provider = this.commands[params.command], args = (_a50 = params.arguments) !== null && _a50 !== void 0 ? _a50 : [];
|
|
44547
44547
|
await provider.execute(...args);
|
|
44548
44548
|
}
|
|
44549
44549
|
};
|
|
@@ -44809,7 +44809,7 @@ var require_TypeSystem = __commonJS({
|
|
|
44809
44809
|
var liquid_html_parser_1 = require_dist2(), theme_check_common_1 = require_dist3(), settings_1 = require_settings(), utils_1 = require_utils8(), theme_check_common_2 = require_dist3(), TypeSystem = class {
|
|
44810
44810
|
constructor(themeDocset, getThemeSettingsSchemaForURI, getMetafieldDefinitions) {
|
|
44811
44811
|
this.themeDocset = themeDocset, this.getThemeSettingsSchemaForURI = getThemeSettingsSchemaForURI, this.getMetafieldDefinitions = getMetafieldDefinitions, this.objectMap = async (uri, ast) => {
|
|
44812
|
-
var
|
|
44812
|
+
var _a50, _b, _c, _d;
|
|
44813
44813
|
let [objectMap, themeSettingProperties, metafieldDefinitionsObjectMap] = await Promise.all([
|
|
44814
44814
|
this._objectMap(),
|
|
44815
44815
|
this.themeSettingProperties(uri),
|
|
@@ -44817,7 +44817,7 @@ var require_TypeSystem = __commonJS({
|
|
|
44817
44817
|
]), result = {
|
|
44818
44818
|
...objectMap,
|
|
44819
44819
|
settings: {
|
|
44820
|
-
...(
|
|
44820
|
+
...(_a50 = objectMap.settings) !== null && _a50 !== void 0 ? _a50 : {},
|
|
44821
44821
|
properties: themeSettingProperties
|
|
44822
44822
|
},
|
|
44823
44823
|
...customMetafieldTypeEntries(objectMap.metafield),
|
|
@@ -44868,8 +44868,8 @@ var require_TypeSystem = __commonJS({
|
|
|
44868
44868
|
this.contextualVariables(uri)
|
|
44869
44869
|
]);
|
|
44870
44870
|
return globalVariables.concat(contextualVariables).reduce((table, objectEntry) => {
|
|
44871
|
-
var
|
|
44872
|
-
return (
|
|
44871
|
+
var _a50, _b;
|
|
44872
|
+
return (_a50 = table[_b = objectEntry.name]) !== null && _a50 !== void 0 || (table[_b] = []), table[objectEntry.name].push({
|
|
44873
44873
|
identifier: objectEntry.name,
|
|
44874
44874
|
type: objectEntryType(objectEntry),
|
|
44875
44875
|
range: [0]
|
|
@@ -44895,10 +44895,10 @@ var require_TypeSystem = __commonJS({
|
|
|
44895
44895
|
this.symbolsTable(partialAst, uri)
|
|
44896
44896
|
]);
|
|
44897
44897
|
return Object.entries(symbolsTable).filter(([key, typeRanges]) => key.startsWith(partial) && typeRanges.some((typeRange) => isCorrectTypeRange(typeRange, node))).map(([identifier, typeRanges]) => {
|
|
44898
|
-
var
|
|
44898
|
+
var _a50;
|
|
44899
44899
|
let typeRange = (0, utils_1.findLast)(typeRanges, (typeRange2) => isCorrectTypeRange(typeRange2, node)), type = resolveTypeRangeType(typeRange.type, symbolsTable, objectMap, filtersMap);
|
|
44900
44900
|
return {
|
|
44901
|
-
entry: { ...(
|
|
44901
|
+
entry: { ...(_a50 = objectMap[isArrayType(type) ? type.valueType : type]) !== null && _a50 !== void 0 ? _a50 : {}, name: identifier },
|
|
44902
44902
|
type
|
|
44903
44903
|
};
|
|
44904
44904
|
});
|
|
@@ -45027,19 +45027,19 @@ var require_TypeSystem = __commonJS({
|
|
|
45027
45027
|
},
|
|
45028
45028
|
// This also covers tablerow
|
|
45029
45029
|
ForMarkup(node, ancestors) {
|
|
45030
|
-
var
|
|
45030
|
+
var _a50;
|
|
45031
45031
|
let parentNode = ancestors.at(-1);
|
|
45032
45032
|
return {
|
|
45033
45033
|
identifier: node.variableName,
|
|
45034
45034
|
type: LazyDeconstructedExpression(node.collection, node.position.start),
|
|
45035
|
-
range: [parentNode.blockStartPosition.end, end((
|
|
45035
|
+
range: [parentNode.blockStartPosition.end, end((_a50 = parentNode.blockEndPosition) === null || _a50 === void 0 ? void 0 : _a50.end)]
|
|
45036
45036
|
};
|
|
45037
45037
|
},
|
|
45038
45038
|
// {% capture foo %}
|
|
45039
45039
|
// ...
|
|
45040
45040
|
// {% endcapture}
|
|
45041
45041
|
LiquidTag(node) {
|
|
45042
|
-
var
|
|
45042
|
+
var _a50, _b;
|
|
45043
45043
|
if (node.name === "capture" && typeof node.markup != "string")
|
|
45044
45044
|
return {
|
|
45045
45045
|
identifier: node.markup.name,
|
|
@@ -45050,7 +45050,7 @@ var require_TypeSystem = __commonJS({
|
|
|
45050
45050
|
return {
|
|
45051
45051
|
identifier: node.name,
|
|
45052
45052
|
type: node.name,
|
|
45053
|
-
range: [node.blockStartPosition.end, end((
|
|
45053
|
+
range: [node.blockStartPosition.end, end((_a50 = node.blockEndPosition) === null || _a50 === void 0 ? void 0 : _a50.end)]
|
|
45054
45054
|
};
|
|
45055
45055
|
if (["for", "tablerow"].includes(node.name))
|
|
45056
45056
|
return {
|
|
@@ -45072,8 +45072,8 @@ var require_TypeSystem = __commonJS({
|
|
|
45072
45072
|
};
|
|
45073
45073
|
}
|
|
45074
45074
|
}).sort(({ range: [startA] }, { range: [startB] }) => startA - startB).reduce((table, typeRange) => {
|
|
45075
|
-
var
|
|
45076
|
-
return (
|
|
45075
|
+
var _a50, _b;
|
|
45076
|
+
return (_a50 = table[_b = typeRange.identifier]) !== null && _a50 !== void 0 || (table[_b] = []), table[typeRange.identifier].push(typeRange), table;
|
|
45077
45077
|
}, seedSymbolsTable);
|
|
45078
45078
|
}
|
|
45079
45079
|
function resolveTypeRangeType(typeRangeType, symbolsTable, objectMap, filtersMap) {
|
|
@@ -45091,9 +45091,9 @@ var require_TypeSystem = __commonJS({
|
|
|
45091
45091
|
}
|
|
45092
45092
|
}
|
|
45093
45093
|
function inferType(thing, symbolsTable, objectMap, filtersMap) {
|
|
45094
|
-
var
|
|
45094
|
+
var _a50, _b;
|
|
45095
45095
|
if (typeof thing == "string")
|
|
45096
|
-
return (_b = (
|
|
45096
|
+
return (_b = (_a50 = objectMap[thing]) === null || _a50 === void 0 ? void 0 : _a50.name) !== null && _b !== void 0 ? _b : exports.Untyped;
|
|
45097
45097
|
switch (thing.type) {
|
|
45098
45098
|
case liquid_html_parser_1.NodeTypes.Number:
|
|
45099
45099
|
return "number";
|
|
@@ -45130,8 +45130,8 @@ var require_TypeSystem = __commonJS({
|
|
|
45130
45130
|
}
|
|
45131
45131
|
}
|
|
45132
45132
|
function inferLiquidDocParamType(node, liquidDrops) {
|
|
45133
|
-
var
|
|
45134
|
-
let paramTypeValue = (
|
|
45133
|
+
var _a50;
|
|
45134
|
+
let paramTypeValue = (_a50 = node.paramType) === null || _a50 === void 0 ? void 0 : _a50.value;
|
|
45135
45135
|
if (!paramTypeValue)
|
|
45136
45136
|
return exports.Untyped;
|
|
45137
45137
|
let validParamTypes = (0, theme_check_common_1.getValidParamTypes)(liquidDrops), parsedParamType = (0, theme_check_common_1.parseParamType)(new Set(validParamTypes.keys()), paramTypeValue);
|
|
@@ -45177,7 +45177,7 @@ var require_TypeSystem = __commonJS({
|
|
|
45177
45177
|
return exports.Untyped;
|
|
45178
45178
|
}
|
|
45179
45179
|
function inferPseudoTypePropertyType(curr, lookup3, objectMap) {
|
|
45180
|
-
var
|
|
45180
|
+
var _a50;
|
|
45181
45181
|
let parentEntry = objectMap[curr];
|
|
45182
45182
|
if (lookup3.type !== liquid_html_parser_1.NodeTypes.String)
|
|
45183
45183
|
return exports.Untyped;
|
|
@@ -45197,7 +45197,7 @@ var require_TypeSystem = __commonJS({
|
|
|
45197
45197
|
}
|
|
45198
45198
|
return exports.Untyped;
|
|
45199
45199
|
}
|
|
45200
|
-
let propertyName = lookup3.value, property = (
|
|
45200
|
+
let propertyName = lookup3.value, property = (_a50 = parentEntry.properties) === null || _a50 === void 0 ? void 0 : _a50.find((property2) => property2.name === propertyName);
|
|
45201
45201
|
return property ? objectEntryType(property) : exports.Untyped;
|
|
45202
45202
|
}
|
|
45203
45203
|
function filterEntryReturnType(entry) {
|
|
@@ -45325,18 +45325,18 @@ var require_TypeSystem = __commonJS({
|
|
|
45325
45325
|
file_reference: exports.Untyped
|
|
45326
45326
|
}), REFERENCE_TYPE_METAFIELDS = Object.entries(METAFIELD_TYPE_TO_TYPE).filter(([metafieldType, _type]) => metafieldType.endsWith("_reference")).map(([_metafieldType, type]) => type);
|
|
45327
45327
|
function metafieldReturnType(metafieldType) {
|
|
45328
|
-
var
|
|
45328
|
+
var _a50;
|
|
45329
45329
|
let isArray = metafieldType.startsWith("list.");
|
|
45330
45330
|
isArray && (metafieldType = metafieldType.split(".")[1]);
|
|
45331
|
-
let type = "metafield_" + ((
|
|
45331
|
+
let type = "metafield_" + ((_a50 = METAFIELD_TYPE_TO_TYPE[metafieldType]) !== null && _a50 !== void 0 ? _a50 : exports.Untyped);
|
|
45332
45332
|
return isArray ? [{ type: `${type}_array`, name: "" }] : [{ type, name: "" }];
|
|
45333
45333
|
}
|
|
45334
45334
|
var customMetafieldTypeEntries = (0, utils_1.memo)((baseMetafieldEntry) => baseMetafieldEntry ? [
|
|
45335
45335
|
.../* @__PURE__ */ new Set([...Object.values(METAFIELD_TYPE_TO_TYPE), ...theme_check_common_1.FETCHED_METAFIELD_CATEGORIES])
|
|
45336
45336
|
].reduce((map, type) => {
|
|
45337
|
-
var
|
|
45337
|
+
var _a50, _b;
|
|
45338
45338
|
{
|
|
45339
|
-
let metafieldEntry = JSON.parse(JSON.stringify(baseMetafieldEntry)), metafieldValueProp = (
|
|
45339
|
+
let metafieldEntry = JSON.parse(JSON.stringify(baseMetafieldEntry)), metafieldValueProp = (_a50 = metafieldEntry.properties) === null || _a50 === void 0 ? void 0 : _a50.find((prop) => prop.name === "value");
|
|
45340
45340
|
metafieldValueProp && (metafieldValueProp.return_type = [{ type, name: "" }], metafieldValueProp.description = "", metafieldEntry.name = `metafield_${type}`, map[metafieldEntry.name] = metafieldEntry);
|
|
45341
45341
|
}
|
|
45342
45342
|
{
|
|
@@ -45514,8 +45514,8 @@ var require_fix = __commonJS({
|
|
|
45514
45514
|
}
|
|
45515
45515
|
}
|
|
45516
45516
|
shouldIncludeCursorPlaceholder() {
|
|
45517
|
-
var
|
|
45518
|
-
let prevCharacter = (
|
|
45517
|
+
var _a50, _b;
|
|
45518
|
+
let prevCharacter = (_a50 = this.markup.at(-1)) !== null && _a50 !== void 0 ? _a50 : "", prevPrevCharacter = (_b = this.markup.at(-2)) !== null && _b !== void 0 ? _b : "", isInLiquidContext = this.stack.includes("%}") || this.stack.includes("}}"), isInHtmlContext = this.current === ">", isInStringContext = QUOTES.includes(this.current);
|
|
45519
45519
|
return isInStringContext && this.stack.at(-2) === ">" && QUOTES.includes(prevCharacter) || isInHtmlContext && (/\s/.test(prevCharacter) || prevCharacter === "<" || prevPrevCharacter === "<" && prevCharacter === "/" || prevPrevCharacter === "%" && prevCharacter === "}") || isInLiquidContext && (!isInStringContext && [" ", " ", `
|
|
45520
45520
|
`, ".", "{", "[", ","].includes(prevCharacter) || isInStringContext && prevPrevCharacter === "[");
|
|
45521
45521
|
}
|
|
@@ -45954,7 +45954,7 @@ ${example}
|
|
|
45954
45954
|
}
|
|
45955
45955
|
exports.getParameterCompletionTemplate = getParameterCompletionTemplate;
|
|
45956
45956
|
function formatLiquidDocContentMarkdown(name, docDefinition) {
|
|
45957
|
-
var
|
|
45957
|
+
var _a50, _b, _c;
|
|
45958
45958
|
let liquidDoc = docDefinition?.liquidDoc;
|
|
45959
45959
|
if (!liquidDoc)
|
|
45960
45960
|
return `### ${name}`;
|
|
@@ -45964,7 +45964,7 @@ ${example}
|
|
|
45964
45964
|
parts.push("", "**Description:**", `
|
|
45965
45965
|
`, description);
|
|
45966
45966
|
}
|
|
45967
|
-
if (!((
|
|
45967
|
+
if (!((_a50 = liquidDoc.parameters) === null || _a50 === void 0) && _a50.length) {
|
|
45968
45968
|
let parameters = liquidDoc.parameters.map((param) => formatLiquidDocParameter(param)).join(`
|
|
45969
45969
|
`);
|
|
45970
45970
|
parts.push("", "**Parameters:**", parameters);
|
|
@@ -45995,7 +45995,7 @@ var require_ContentForParameterCompletionProvider = __commonJS({
|
|
|
45995
45995
|
this.getDocDefinitionForURI = getDocDefinitionForURI;
|
|
45996
45996
|
}
|
|
45997
45997
|
async completions(params) {
|
|
45998
|
-
var
|
|
45998
|
+
var _a50;
|
|
45999
45999
|
if (!params.completionContext)
|
|
46000
46000
|
return [];
|
|
46001
46001
|
let { node, ancestors } = params.completionContext, parentNode = ancestors.at(-1), parentIsContentFor = parentNode?.type == liquid_html_parser_1.NodeTypes.ContentForMarkup, nodeIsVariableLookup = node?.type == liquid_html_parser_1.NodeTypes.VariableLookup;
|
|
@@ -46005,7 +46005,7 @@ var require_ContentForParameterCompletionProvider = __commonJS({
|
|
|
46005
46005
|
return [];
|
|
46006
46006
|
let completionItems = this.staticCompletions(node, parentNode.contentForType.value == "blocks", params.document);
|
|
46007
46007
|
if (parentNode.contentForType.value === "block") {
|
|
46008
|
-
let typeArg = (
|
|
46008
|
+
let typeArg = (_a50 = parentNode.args.find((arg) => arg.name === "type")) === null || _a50 === void 0 ? void 0 : _a50.value;
|
|
46009
46009
|
if (typeArg?.type === liquid_html_parser_1.NodeTypes.String) {
|
|
46010
46010
|
let snippetDefinition = await this.getDocDefinitionForURI(params.textDocument.uri, "blocks", typeArg.value);
|
|
46011
46011
|
completionItems.push(...this.liquidDocParameterCompletions(node, params.document, snippetDefinition));
|
|
@@ -46015,8 +46015,8 @@ var require_ContentForParameterCompletionProvider = __commonJS({
|
|
|
46015
46015
|
return completionItems.filter((item) => !existingParams.includes(item.label));
|
|
46016
46016
|
}
|
|
46017
46017
|
textEdit(node, document2, name, textTemplate = `${name}: '$1'`) {
|
|
46018
|
-
var
|
|
46019
|
-
let remainingText = document2.source.slice(node.position.end), match2 = remainingText.match(/^(.*?)\s*(?=,|\||-?\}\}|-?\%\})|^(.*)$/), offset = match2 ? match2[0].trimEnd().length : remainingText.length, existingParameterOffset = (_b = (
|
|
46018
|
+
var _a50, _b;
|
|
46019
|
+
let remainingText = document2.source.slice(node.position.end), match2 = remainingText.match(/^(.*?)\s*(?=,|\||-?\}\}|-?\%\})|^(.*)$/), offset = match2 ? match2[0].trimEnd().length : remainingText.length, existingParameterOffset = (_b = (_a50 = remainingText.match(/[^a-zA-Z]/)) === null || _a50 === void 0 ? void 0 : _a50.index) !== null && _b !== void 0 ? _b : remainingText.length, start = document2.textDocument.positionAt(node.position.start), end = document2.textDocument.positionAt(node.position.end + offset), newText = name === "closest" ? `${name}.` : textTemplate, format5 = name === "closest" ? vscode_languageserver_1.InsertTextFormat.PlainText : vscode_languageserver_1.InsertTextFormat.Snippet;
|
|
46020
46020
|
return node.name + remainingText.slice(0, existingParameterOffset) == name && (newText = name, format5 = vscode_languageserver_1.InsertTextFormat.PlainText, end = document2.textDocument.positionAt(node.position.end + existingParameterOffset)), node.name === params_1.CURSOR && (end = start, existingParameterOffset > 0 && (newText += ", ")), {
|
|
46021
46021
|
textEdit: vscode_languageserver_1.TextEdit.replace({
|
|
46022
46022
|
start,
|
|
@@ -46044,8 +46044,8 @@ var require_ContentForParameterCompletionProvider = __commonJS({
|
|
|
46044
46044
|
});
|
|
46045
46045
|
}
|
|
46046
46046
|
liquidDocParameterCompletions(node, document2, docDefinition) {
|
|
46047
|
-
var
|
|
46048
|
-
return (((
|
|
46047
|
+
var _a50;
|
|
46048
|
+
return (((_a50 = docDefinition?.liquidDoc) === null || _a50 === void 0 ? void 0 : _a50.parameters) || []).map((liquidDocParam) => {
|
|
46049
46049
|
let { textEdit, format: format5 } = this.textEdit(node, document2, liquidDocParam.name, (0, liquidDoc_1.getParameterCompletionTemplate)(liquidDocParam.name, liquidDocParam.type));
|
|
46050
46050
|
return {
|
|
46051
46051
|
label: liquidDocParam.name,
|
|
@@ -52888,10 +52888,10 @@ var require_HtmlTagCompletionProvider = __commonJS({
|
|
|
52888
52888
|
};
|
|
52889
52889
|
}
|
|
52890
52890
|
function grandParentCloseOption(grandParentNode) {
|
|
52891
|
-
var
|
|
52891
|
+
var _a50;
|
|
52892
52892
|
let grandParentName = getGrandParentName(grandParentNode);
|
|
52893
52893
|
return grandParentName ? [
|
|
52894
|
-
(
|
|
52894
|
+
(_a50 = docset_1.HtmlData.tags.find((tag) => tag.name === grandParentName)) !== null && _a50 !== void 0 ? _a50 : {
|
|
52895
52895
|
name: grandParentName,
|
|
52896
52896
|
description: "",
|
|
52897
52897
|
attributes: [],
|
|
@@ -52940,13 +52940,13 @@ var require_HtmlAttributeCompletionProvider = __commonJS({
|
|
|
52940
52940
|
// Find the range of the attribute partial. If the attribute contains any liquid code, the range
|
|
52941
52941
|
// will end before the first character of the liquid block.
|
|
52942
52942
|
attributeTagRange(node, document2) {
|
|
52943
|
-
var
|
|
52943
|
+
var _a50, _b;
|
|
52944
52944
|
if (node.type === "TextNode" && node.value === params_1.CURSOR)
|
|
52945
52945
|
return {
|
|
52946
52946
|
start: document2.textDocument.positionAt(node.position.start),
|
|
52947
52947
|
end: document2.textDocument.positionAt(node.position.start)
|
|
52948
52948
|
};
|
|
52949
|
-
let sourcePartialPastCursor = document2.source.slice(node.position.end), attributeEndOffset = (_b = (
|
|
52949
|
+
let sourcePartialPastCursor = document2.source.slice(node.position.end), attributeEndOffset = (_b = (_a50 = sourcePartialPastCursor.match(/[\s=]|\{%|\{\{|>/)) === null || _a50 === void 0 ? void 0 : _a50.index) !== null && _b !== void 0 ? _b : sourcePartialPastCursor.length;
|
|
52950
52950
|
return {
|
|
52951
52951
|
start: document2.textDocument.positionAt(node.position.start),
|
|
52952
52952
|
end: document2.textDocument.positionAt(node.position.end + attributeEndOffset)
|
|
@@ -52955,9 +52955,9 @@ var require_HtmlAttributeCompletionProvider = __commonJS({
|
|
|
52955
52955
|
};
|
|
52956
52956
|
exports.HtmlAttributeCompletionProvider = HtmlAttributeCompletionProvider;
|
|
52957
52957
|
function getOptions2(partial, parentNodeName) {
|
|
52958
|
-
var
|
|
52958
|
+
var _a50;
|
|
52959
52959
|
let tag = docset_1.HtmlData.tags.find((tag2) => tag2.name === parentNodeName);
|
|
52960
|
-
return [...(
|
|
52960
|
+
return [...(_a50 = tag?.attributes) !== null && _a50 !== void 0 ? _a50 : [], ...docset_1.HtmlData.globalAttributes].filter((x) => x.name.startsWith(partial));
|
|
52961
52961
|
}
|
|
52962
52962
|
function toCompletionItem(tag, attributeTagRange, hasExistingAttributeValue, hasLiquidTag) {
|
|
52963
52963
|
let insertSnippet = (!tag.valueSet || tag.valueSet !== "v") && !hasExistingAttributeValue && !hasLiquidTag;
|
|
@@ -52986,13 +52986,13 @@ var require_HtmlAttributeValueCompletionProvider = __commonJS({
|
|
|
52986
52986
|
constructor() {
|
|
52987
52987
|
}
|
|
52988
52988
|
async completions(params) {
|
|
52989
|
-
var
|
|
52989
|
+
var _a50, _b;
|
|
52990
52990
|
if (!params.completionContext)
|
|
52991
52991
|
return [];
|
|
52992
52992
|
let { node, ancestors } = params.completionContext, attributeNode = (0, utils_1.findLast)(ancestors, utils_1.isHtmlAttribute), tagNode = (0, utils_1.findLast)(ancestors, utils_1.isNamedHtmlElementNode);
|
|
52993
52993
|
if (!node || !attributeNode || !tagNode || !(0, utils_1.isTextNode)(node) || !(0, utils_1.isHtmlAttribute)(attributeNode) || !(0, utils_1.isNamedHtmlElementNode)(tagNode) || (0, utils_1.isAttrEmpty)(attributeNode) || !attributeNode.value.includes(node))
|
|
52994
52994
|
return [];
|
|
52995
|
-
let tagName = (0, utils_1.getCompoundName)(tagNode), attrName = (0, utils_1.getCompoundName)(attributeNode), partial = node.value.replace(params_1.CURSOR, ""), tagEntry = docset_1.HtmlData.tags.find((tag) => tag.name === tagName), attribute = (
|
|
52995
|
+
let tagName = (0, utils_1.getCompoundName)(tagNode), attrName = (0, utils_1.getCompoundName)(attributeNode), partial = node.value.replace(params_1.CURSOR, ""), tagEntry = docset_1.HtmlData.tags.find((tag) => tag.name === tagName), attribute = (_a50 = docset_1.HtmlData.globalAttributes.find((attr) => attr.name === attrName)) !== null && _a50 !== void 0 ? _a50 : tagEntry?.attributes.find((attr) => attr.name === attrName), valueSetName = attribute?.valueSet, valueSetEntry = docset_1.HtmlData.valueSets.find((valueSet) => valueSet.name === valueSetName);
|
|
52996
52996
|
return ((_b = valueSetEntry?.values) !== null && _b !== void 0 ? _b : []).filter((value) => value.name.startsWith(partial)).sort(common_1.sortByName).map((option) => toCompletionItem(option, attribute && "references" in attribute ? attribute : tagEntry));
|
|
52997
52997
|
}
|
|
52998
52998
|
};
|
|
@@ -53021,8 +53021,8 @@ var require_FilterCompletionProvider = __commonJS({
|
|
|
53021
53021
|
constructor(typeSystem) {
|
|
53022
53022
|
this.typeSystem = typeSystem, this.options = (0, utils_1.memoize)(async (inputType) => {
|
|
53023
53023
|
let filterEntries = await this.typeSystem.filterEntries(), options = filterEntries.filter((entry) => {
|
|
53024
|
-
var
|
|
53025
|
-
return (
|
|
53024
|
+
var _a50;
|
|
53025
|
+
return (_a50 = entry.syntax) === null || _a50 === void 0 ? void 0 : _a50.startsWith(inputType);
|
|
53026
53026
|
}).sort(common_1.sortByName);
|
|
53027
53027
|
if (inputType === "variable") {
|
|
53028
53028
|
let entriesWithoutSyntax = filterEntries.filter((entry) => !entry.syntax);
|
|
@@ -53057,8 +53057,8 @@ var require_FilterCompletionProvider = __commonJS({
|
|
|
53057
53057
|
});
|
|
53058
53058
|
}
|
|
53059
53059
|
textEdit(node, document2, entry) {
|
|
53060
|
-
var
|
|
53061
|
-
let remainingText = document2.source.slice(node.position.end), matchEndOfFilter = remainingText.match(/^(.*?)\s*(?=\||-?\}\}|-?\%\})|^(.*)$/), endOffset = matchEndOfFilter ? matchEndOfFilter[1].length : remainingText.length, pipeRegex = new RegExp(`(\\s*\\|\\s*)(?:${node.name}(?:\\}|\\%)\\})`), matchFilterPipe = node.source.match(pipeRegex), startOffet = matchFilterPipe ? matchFilterPipe[1].length : 0, start = document2.textDocument.positionAt(node.position.start + startOffet), end = document2.textDocument.positionAt(node.position.end + endOffset), { insertText, insertStyle } = appendRequiredParemeters(entry), newText = insertText, format5 = insertStyle, existingFilterOffset = (_b = (
|
|
53060
|
+
var _a50, _b;
|
|
53061
|
+
let remainingText = document2.source.slice(node.position.end), matchEndOfFilter = remainingText.match(/^(.*?)\s*(?=\||-?\}\}|-?\%\})|^(.*)$/), endOffset = matchEndOfFilter ? matchEndOfFilter[1].length : remainingText.length, pipeRegex = new RegExp(`(\\s*\\|\\s*)(?:${node.name}(?:\\}|\\%)\\})`), matchFilterPipe = node.source.match(pipeRegex), startOffet = matchFilterPipe ? matchFilterPipe[1].length : 0, start = document2.textDocument.positionAt(node.position.start + startOffet), end = document2.textDocument.positionAt(node.position.end + endOffset), { insertText, insertStyle } = appendRequiredParemeters(entry), newText = insertText, format5 = insertStyle, existingFilterOffset = (_b = (_a50 = remainingText.match(/[^a-zA-Z_]/)) === null || _a50 === void 0 ? void 0 : _a50.index) !== null && _b !== void 0 ? _b : remainingText.length;
|
|
53062
53062
|
return node.name + remainingText.slice(0, existingFilterOffset) === entry.name && (newText = entry.name, format5 = vscode_languageserver_1.InsertTextFormat.PlainText, end = document2.textDocument.positionAt(node.position.end + existingFilterOffset)), node.name === params_1.CURSOR && (end = start), {
|
|
53063
53063
|
textEdit: vscode_languageserver_1.TextEdit.replace({
|
|
53064
53064
|
start,
|
|
@@ -53073,9 +53073,9 @@ var require_FilterCompletionProvider = __commonJS({
|
|
|
53073
53073
|
return { ...entry, deprioritized: !0 };
|
|
53074
53074
|
}
|
|
53075
53075
|
function appendRequiredParemeters(entry) {
|
|
53076
|
-
var
|
|
53076
|
+
var _a50;
|
|
53077
53077
|
let insertText = entry.name, insertStyle = vscode_languageserver_1.InsertTextFormat.PlainText;
|
|
53078
|
-
if (!(!((
|
|
53078
|
+
if (!(!((_a50 = entry?.parameters) === null || _a50 === void 0) && _a50.length))
|
|
53079
53079
|
return { insertText, insertStyle };
|
|
53080
53080
|
let requiredPositionalParams = entry.parameters.filter((p) => p.required && p.positional).map(formatParameter), requiredNamedParams = entry.parameters.filter((p) => p.required && !p.positional).map(formatParameter);
|
|
53081
53081
|
return requiredPositionalParams.length && (insertText += `: ${requiredPositionalParams.join(", ")}`, insertStyle = vscode_languageserver_1.InsertTextFormat.Snippet), requiredNamedParams.length && (insertText += `: ${requiredNamedParams.join(", ")}`, insertStyle = vscode_languageserver_1.InsertTextFormat.Snippet), {
|
|
@@ -53129,8 +53129,8 @@ var require_FilterNamedParameterCompletionProvider = __commonJS({
|
|
|
53129
53129
|
}) : [];
|
|
53130
53130
|
}
|
|
53131
53131
|
textEdit(node, document2, name, type) {
|
|
53132
|
-
var
|
|
53133
|
-
let remainingText = document2.source.slice(node.position.end), match2 = remainingText.match(/^(.*?)\s*(?=,|\||-?\}\}|-?\%\})|^(.*)$/), offset = match2 ? match2[0].length : remainingText.length, existingParameterOffset = (_b = (
|
|
53132
|
+
var _a50, _b;
|
|
53133
|
+
let remainingText = document2.source.slice(node.position.end), match2 = remainingText.match(/^(.*?)\s*(?=,|\||-?\}\}|-?\%\})|^(.*)$/), offset = match2 ? match2[0].length : remainingText.length, existingParameterOffset = (_b = (_a50 = remainingText.match(/[^a-zA-Z]/)) === null || _a50 === void 0 ? void 0 : _a50.index) !== null && _b !== void 0 ? _b : remainingText.length, start = document2.textDocument.positionAt(node.position.start), end = document2.textDocument.positionAt(node.position.end + offset), newText = type === "string" ? `${name}: '$1'` : `${name}: `, format5 = type === "string" ? vscode_languageserver_1.InsertTextFormat.Snippet : vscode_languageserver_1.InsertTextFormat.PlainText;
|
|
53134
53134
|
return node.name + remainingText.slice(0, existingParameterOffset) == name && (newText = name, format5 = vscode_languageserver_1.InsertTextFormat.PlainText, end = document2.textDocument.positionAt(node.position.end + existingParameterOffset)), node.name === "\u2588" && (end = start), {
|
|
53135
53135
|
textEdit: vscode_languageserver_1.TextEdit.replace({
|
|
53136
53136
|
start,
|
|
@@ -53240,8 +53240,8 @@ var require_LiquidTagsCompletionProvider = __commonJS({
|
|
|
53240
53240
|
return textDocument.getText(vscode_languageserver_1.Range.create(startPosition, endPosition)).trim() !== "";
|
|
53241
53241
|
}
|
|
53242
53242
|
function withCorrectWhitespaceStrippingCharacters(snippet, whitespaceStart, whitespaceEnd) {
|
|
53243
|
-
var
|
|
53244
|
-
let starti = 0, endi = 0, countOfEndTags = (_b = (
|
|
53243
|
+
var _a50, _b;
|
|
53244
|
+
let starti = 0, endi = 0, countOfEndTags = (_b = (_a50 = snippet.match(/%\}/g)) === null || _a50 === void 0 ? void 0 : _a50.length) !== null && _b !== void 0 ? _b : 0;
|
|
53245
53245
|
return snippet = snippet.replace(/\{%/g, () => starti++ === 0 ? "{%" + whitespaceStart : "{%" + whitespaceEnd).replace(/%\}/g, () => countOfEndTags > 1 && endi++ === countOfEndTags - 1 ? whitespaceStart + "%}" : whitespaceEnd + "%}"), snippet;
|
|
53246
53246
|
}
|
|
53247
53247
|
function findEndOfBlockStart(context, node, isInLiquidLiquidTag) {
|
|
@@ -53280,7 +53280,7 @@ var require_ObjectAttributeCompletionProvider = __commonJS({
|
|
|
53280
53280
|
this.typeSystem = typeSystem, this.getThemeSettingsSchema = getThemeSettingsSchema;
|
|
53281
53281
|
}
|
|
53282
53282
|
async completions(params) {
|
|
53283
|
-
var
|
|
53283
|
+
var _a50;
|
|
53284
53284
|
if (!params.completionContext)
|
|
53285
53285
|
return [];
|
|
53286
53286
|
let { partialAst, node } = params.completionContext;
|
|
@@ -53298,7 +53298,7 @@ var require_ObjectAttributeCompletionProvider = __commonJS({
|
|
|
53298
53298
|
return completionItems(ArrayCoreProperties.map((name) => ({ name })), partial);
|
|
53299
53299
|
if (parentType === "string")
|
|
53300
53300
|
return completionItems(StringCoreProperties.map((name) => ({ name })), partial);
|
|
53301
|
-
let parentTypeProperties = ((
|
|
53301
|
+
let parentTypeProperties = ((_a50 = (await this.typeSystem.objectMap(params.textDocument.uri, partialAst))[parentType]) === null || _a50 === void 0 ? void 0 : _a50.properties) || [];
|
|
53302
53302
|
return completionItems(parentTypeProperties, partial);
|
|
53303
53303
|
}
|
|
53304
53304
|
};
|
|
@@ -53423,8 +53423,8 @@ var require_TranslationCompletionProvider = __commonJS({
|
|
|
53423
53423
|
if (!node || node.type !== liquid_html_parser_1.NodeTypes.String || !parentNode || parentNode.type !== liquid_html_parser_1.NodeTypes.LiquidVariable || !document2)
|
|
53424
53424
|
return [];
|
|
53425
53425
|
let ast = document2.ast, textDocument = document2.textDocument, translations = await this.getTranslationsForURI(params.textDocument.uri), partial = node.value, options = (0, translations_1.translationOptions)(translations).filter((option) => {
|
|
53426
|
-
var
|
|
53427
|
-
return !(!((
|
|
53426
|
+
var _a50;
|
|
53427
|
+
return !(!((_a50 = option.path[0]) === null || _a50 === void 0) && _a50.startsWith("shopify")) || partial.startsWith("shopify");
|
|
53428
53428
|
}), [_currentNode, realAncestors] = ast instanceof Error ? [null, []] : (0, theme_check_common_1.findCurrentNode)(ast, textDocument.offsetAt(params.position)), realParentNode = realAncestors.at(-1), shouldAppendTranslateFilter = realParentNode?.type === liquid_html_parser_1.NodeTypes.LiquidVariable && realParentNode?.filters.length === 0, quote = node.single ? "'" : '"', postFix = quote + " | t", replaceRange;
|
|
53429
53429
|
shouldAppendTranslateFilter ? (postFix = quote + " | t", replaceRange = {
|
|
53430
53430
|
start: textDocument.positionAt(node.position.start + 1),
|
|
@@ -53437,8 +53437,8 @@ var require_TranslationCompletionProvider = __commonJS({
|
|
|
53437
53437
|
});
|
|
53438
53438
|
let insertTextStartIndex = partial.lastIndexOf(".") + 1;
|
|
53439
53439
|
return options.map(({ path: path3, translation }) => {
|
|
53440
|
-
var
|
|
53441
|
-
let params2 = (0, translations_1.extractParams)(typeof translation == "string" ? translation : (
|
|
53440
|
+
var _a50;
|
|
53441
|
+
let params2 = (0, translations_1.extractParams)(typeof translation == "string" ? translation : (_a50 = Object.values(translation)[0]) !== null && _a50 !== void 0 ? _a50 : ""), parameters = (0, translations_1.paramsString)(params2);
|
|
53442
53442
|
return {
|
|
53443
53443
|
label: quote + path3.join(".") + quote + " | t",
|
|
53444
53444
|
insertText: path3.join(".").slice(insertTextStartIndex),
|
|
@@ -53500,13 +53500,13 @@ var require_RenderSnippetParameterCompletionProvider = __commonJS({
|
|
|
53500
53500
|
this.getDocDefinitionForURI = getDocDefinitionForURI;
|
|
53501
53501
|
}
|
|
53502
53502
|
async completions(params) {
|
|
53503
|
-
var
|
|
53503
|
+
var _a50, _b;
|
|
53504
53504
|
if (!params.completionContext)
|
|
53505
53505
|
return [];
|
|
53506
53506
|
let { node, ancestors } = params.completionContext, parentNode = ancestors.at(-1);
|
|
53507
53507
|
if (!node || !parentNode || node.type !== liquid_html_parser_1.NodeTypes.VariableLookup || parentNode.type !== liquid_html_parser_1.NodeTypes.RenderMarkup || parentNode.snippet.type !== "String")
|
|
53508
53508
|
return [];
|
|
53509
|
-
let userInputStr = ((
|
|
53509
|
+
let userInputStr = ((_a50 = node.name) === null || _a50 === void 0 ? void 0 : _a50.replace(params_1.CURSOR, "")) || "", snippetDefinition = await this.getDocDefinitionForURI(params.textDocument.uri, "snippets", parentNode.snippet.value), liquidDocParams = (_b = snippetDefinition?.liquidDoc) === null || _b === void 0 ? void 0 : _b.parameters;
|
|
53510
53510
|
if (!liquidDocParams)
|
|
53511
53511
|
return [];
|
|
53512
53512
|
let offset = node.name === params_1.CURSOR ? 1 : 0, start = params.document.textDocument.positionAt(node.position.start), end = params.document.textDocument.positionAt(node.position.end - offset), existingRenderParams = parentNode.args.filter((arg) => arg.type === liquid_html_parser_1.NodeTypes.NamedArgument).map((arg) => arg.name);
|
|
@@ -53537,7 +53537,7 @@ var require_LiquidDocTagCompletionProvider = __commonJS({
|
|
|
53537
53537
|
constructor() {
|
|
53538
53538
|
}
|
|
53539
53539
|
async completions(params) {
|
|
53540
|
-
var
|
|
53540
|
+
var _a50;
|
|
53541
53541
|
if (!params.completionContext)
|
|
53542
53542
|
return [];
|
|
53543
53543
|
if (!(0, theme_check_common_1.filePathSupportsLiquidDoc)(params.document.uri))
|
|
@@ -53551,8 +53551,8 @@ var require_LiquidDocTagCompletionProvider = __commonJS({
|
|
|
53551
53551
|
case liquid_html_parser_1.NodeTypes.LiquidDocDescriptionNode:
|
|
53552
53552
|
case liquid_html_parser_1.NodeTypes.LiquidDocExampleNode:
|
|
53553
53553
|
case liquid_html_parser_1.NodeTypes.LiquidDocPromptNode:
|
|
53554
|
-
let lastLine = (
|
|
53555
|
-
`).at(-1)) === null ||
|
|
53554
|
+
let lastLine = (_a50 = node.content.value.split(`
|
|
53555
|
+
`).at(-1)) === null || _a50 === void 0 ? void 0 : _a50.trim();
|
|
53556
53556
|
return lastLine?.startsWith("@") ? this.createCompletionItems(lastLine) : [];
|
|
53557
53557
|
default:
|
|
53558
53558
|
return [];
|
|
@@ -89108,8 +89108,8 @@ var require_TranslationStringDefinitionProvider = __commonJS({
|
|
|
89108
89108
|
this.documentManager = documentManager, this.getDefaultLocaleSourceCode = getDefaultLocaleSourceCode;
|
|
89109
89109
|
}
|
|
89110
89110
|
async definitions(params, node, ancestors) {
|
|
89111
|
-
var
|
|
89112
|
-
let doc = (
|
|
89111
|
+
var _a50;
|
|
89112
|
+
let doc = (_a50 = this.documentManager.get(params.textDocument.uri)) === null || _a50 === void 0 ? void 0 : _a50.textDocument;
|
|
89113
89113
|
if (!doc)
|
|
89114
89114
|
return [];
|
|
89115
89115
|
if (node.type !== liquid_html_parser_1.NodeTypes.String)
|
|
@@ -89391,8 +89391,8 @@ var require_HtmlTagNameDocumentHighlightsProvider = __commonJS({
|
|
|
89391
89391
|
this.documentManager = documentManager;
|
|
89392
89392
|
}
|
|
89393
89393
|
async documentHighlights(node, ancestors, params) {
|
|
89394
|
-
var
|
|
89395
|
-
let textDocument = (
|
|
89394
|
+
var _a50;
|
|
89395
|
+
let textDocument = (_a50 = this.documentManager.get(params.textDocument.uri)) === null || _a50 === void 0 ? void 0 : _a50.textDocument;
|
|
89396
89396
|
if (!textDocument)
|
|
89397
89397
|
return null;
|
|
89398
89398
|
let ranges = (0, htmlTagNames_1.getHtmlElementNameRanges)(node, ancestors, params, textDocument);
|
|
@@ -89415,8 +89415,8 @@ var require_LiquidBlockTagDocumentHighlightsProvider = __commonJS({
|
|
|
89415
89415
|
this.documentManager = documentManager;
|
|
89416
89416
|
}
|
|
89417
89417
|
async documentHighlights(node, ancestors, params) {
|
|
89418
|
-
var
|
|
89419
|
-
let textDocument = (
|
|
89418
|
+
var _a50;
|
|
89419
|
+
let textDocument = (_a50 = this.documentManager.get(params.textDocument.uri)) === null || _a50 === void 0 ? void 0 : _a50.textDocument;
|
|
89420
89420
|
if (!textDocument || (isLiquidBranch(node) && (node = ancestors.at(-1)), !isLiquidBlock(node) || !node.blockEndPosition))
|
|
89421
89421
|
return null;
|
|
89422
89422
|
let nameOffset = node.source.indexOf(node.name, node.blockStartPosition.start), endblockNameOffset = node.source.indexOf("end" + node.name, node.blockEndPosition.start), ranges = [
|
|
@@ -89483,12 +89483,12 @@ var require_DocumentHighlightsProvider = __commonJS({
|
|
|
89483
89483
|
];
|
|
89484
89484
|
}
|
|
89485
89485
|
async documentHighlights(params) {
|
|
89486
|
-
var
|
|
89486
|
+
var _a50;
|
|
89487
89487
|
let document2 = this.documentManager.get(params.textDocument.uri);
|
|
89488
89488
|
if (!document2 || document2.type !== theme_check_common_1.SourceCodeType.LiquidHtml || document2.ast instanceof Error)
|
|
89489
89489
|
return exports.PREVENT_DEFAULT;
|
|
89490
89490
|
let [currentNode, ancestors] = (0, theme_check_common_2.findCurrentNode)(document2.ast, document2.textDocument.offsetAt(params.position)), promises = this.providers.map((p) => p.documentHighlights(currentNode, ancestors, params).catch(() => null));
|
|
89491
|
-
return (
|
|
89491
|
+
return (_a50 = (await Promise.all(promises)).find(Boolean)) !== null && _a50 !== void 0 ? _a50 : exports.PREVENT_DEFAULT;
|
|
89492
89492
|
}
|
|
89493
89493
|
};
|
|
89494
89494
|
exports.DocumentHighlightsProvider = DocumentHighlightsProvider;
|
|
@@ -89696,11 +89696,11 @@ var require_DocumentManager = __commonJS({
|
|
|
89696
89696
|
uri = theme_check_common_1.path.normalize(uri), !(!/\.(json|liquid)$/.test(uri) || /\.(s?css|js).liquid$/.test(uri)) && this.sourceCodes.set(uri, this.augmentedSourceCode(uri, source, version));
|
|
89697
89697
|
}
|
|
89698
89698
|
augmentedSourceCode(uri, source, version) {
|
|
89699
|
-
var
|
|
89699
|
+
var _a50;
|
|
89700
89700
|
let sourceCode = (0, theme_check_common_1.toSourceCode)(uri, source, version), textDocument = vscode_languageserver_textdocument_1.TextDocument.create(
|
|
89701
89701
|
uri,
|
|
89702
89702
|
sourceCode.type,
|
|
89703
|
-
(
|
|
89703
|
+
(_a50 = sourceCode.version) !== null && _a50 !== void 0 ? _a50 : 0,
|
|
89704
89704
|
// create doesn't let us put undefined here.
|
|
89705
89705
|
sourceCode.source
|
|
89706
89706
|
);
|
|
@@ -89919,14 +89919,14 @@ var require_HtmlElementAutoclosingOnTypeFormattingProvider = __commonJS({
|
|
|
89919
89919
|
};
|
|
89920
89920
|
exports.HtmlElementAutoclosingOnTypeFormattingProvider = HtmlElementAutoclosingOnTypeFormattingProvider;
|
|
89921
89921
|
function nodeAtCursor(textDocument, position) {
|
|
89922
|
-
var
|
|
89922
|
+
var _a50;
|
|
89923
89923
|
let text = textDocument.getText(vscode_languageserver_protocol_1.Range.create(vscode_languageserver_protocol_1.Position.create(0, 0), position));
|
|
89924
89924
|
try {
|
|
89925
89925
|
let ast = (0, liquid_html_parser_1.toLiquidHtmlAST)(text, {
|
|
89926
89926
|
allowUnclosedDocumentNode: !0,
|
|
89927
89927
|
mode: "tolerant"
|
|
89928
89928
|
}), [node, ancestors] = (0, theme_check_common_1.findCurrentNode)(ast, textDocument.offsetAt(position));
|
|
89929
|
-
return ((
|
|
89929
|
+
return ((_a50 = ancestors.at(-1)) === null || _a50 === void 0 ? void 0 : _a50.type) === liquid_html_parser_1.NodeTypes.HtmlElement || node.type === liquid_html_parser_1.NodeTypes.LiquidBranch ? ancestors.at(-1) : node;
|
|
89930
89930
|
} catch {
|
|
89931
89931
|
return null;
|
|
89932
89932
|
}
|
|
@@ -89956,9 +89956,9 @@ var require_OnTypeFormattingProvider = __commonJS({
|
|
|
89956
89956
|
];
|
|
89957
89957
|
}
|
|
89958
89958
|
async onTypeFormatting(params) {
|
|
89959
|
-
var
|
|
89959
|
+
var _a50;
|
|
89960
89960
|
let document2 = this.documentManager.get(params.textDocument.uri);
|
|
89961
|
-
return document2 && (
|
|
89961
|
+
return document2 && (_a50 = this.providers.map((provider) => provider.onTypeFormatting(document2, params)).find((result) => result !== null)) !== null && _a50 !== void 0 ? _a50 : null;
|
|
89962
89962
|
}
|
|
89963
89963
|
};
|
|
89964
89964
|
exports.OnTypeFormattingProvider = OnTypeFormattingProvider;
|
|
@@ -90045,14 +90045,14 @@ var require_LiquidFilterArgumentHoverProvider = __commonJS({
|
|
|
90045
90045
|
this.themeDocset = themeDocset;
|
|
90046
90046
|
}
|
|
90047
90047
|
async hover(currentNode, ancestors) {
|
|
90048
|
-
var
|
|
90048
|
+
var _a50;
|
|
90049
90049
|
let parentNode = ancestors.at(-1);
|
|
90050
90050
|
if (!parentNode || parentNode.type !== liquid_html_parser_1.NodeTypes.LiquidFilter || currentNode.type !== liquid_html_parser_1.NodeTypes.NamedArgument)
|
|
90051
90051
|
return null;
|
|
90052
90052
|
let parentName = parentNode.name, entry = (await this.themeDocset.filters()).find((entry2) => entry2.name === parentName);
|
|
90053
90053
|
if (!entry)
|
|
90054
90054
|
return null;
|
|
90055
|
-
let argument = (
|
|
90055
|
+
let argument = (_a50 = entry.parameters) === null || _a50 === void 0 ? void 0 : _a50.find((argument2) => argument2.name === currentNode.name);
|
|
90056
90056
|
return argument ? {
|
|
90057
90057
|
contents: {
|
|
90058
90058
|
kind: "markdown",
|
|
@@ -90077,7 +90077,7 @@ var require_LiquidObjectHoverProvider = __commonJS({
|
|
|
90077
90077
|
this.typeSystem = typeSystem;
|
|
90078
90078
|
}
|
|
90079
90079
|
async hover(currentNode, ancestors, params) {
|
|
90080
|
-
var
|
|
90080
|
+
var _a50;
|
|
90081
90081
|
if (currentNode.type !== liquid_html_parser_1.NodeTypes.VariableLookup && currentNode.type !== liquid_html_parser_1.NodeTypes.AssignMarkup || !currentNode.name)
|
|
90082
90082
|
return null;
|
|
90083
90083
|
let node = currentNode;
|
|
@@ -90089,7 +90089,7 @@ var require_LiquidObjectHoverProvider = __commonJS({
|
|
|
90089
90089
|
if (type === TypeSystem_1.Unknown)
|
|
90090
90090
|
return null;
|
|
90091
90091
|
if (!entry) {
|
|
90092
|
-
let entryByName = (
|
|
90092
|
+
let entryByName = (_a50 = objectMap[currentNode.name]) !== null && _a50 !== void 0 ? _a50 : {};
|
|
90093
90093
|
return {
|
|
90094
90094
|
contents: {
|
|
90095
90095
|
kind: "markdown",
|
|
@@ -90124,7 +90124,7 @@ var require_LiquidObjectAttributeHoverProvider = __commonJS({
|
|
|
90124
90124
|
this.typeSystem = typeSystem;
|
|
90125
90125
|
}
|
|
90126
90126
|
async hover(currentNode, ancestors, params) {
|
|
90127
|
-
var
|
|
90127
|
+
var _a50, _b;
|
|
90128
90128
|
let parentNode = ancestors.at(-1), uri = params.textDocument.uri;
|
|
90129
90129
|
if (currentNode.type !== liquid_html_parser_1.NodeTypes.String || !parentNode || parentNode.type !== liquid_html_parser_1.NodeTypes.VariableLookup || !parentNode.lookups.includes(currentNode))
|
|
90130
90130
|
return null;
|
|
@@ -90136,7 +90136,7 @@ var require_LiquidObjectAttributeHoverProvider = __commonJS({
|
|
|
90136
90136
|
let nodeType = await this.typeSystem.inferType({ ...parentNode, lookups: parentNode.lookups.slice(0, lookupIndex + 1) }, ancestors[0], uri);
|
|
90137
90137
|
if ((0, TypeSystem_1.isArrayType)(nodeType) || nodeType === TypeSystem_1.Unknown)
|
|
90138
90138
|
return null;
|
|
90139
|
-
let entry2 = { ...(
|
|
90139
|
+
let entry2 = { ...(_a50 = objectMap[nodeType]) !== null && _a50 !== void 0 ? _a50 : {}, name: currentNode.value };
|
|
90140
90140
|
return {
|
|
90141
90141
|
contents: {
|
|
90142
90142
|
kind: "markdown",
|
|
@@ -90193,11 +90193,11 @@ var require_HtmlAttributeHoverProvider = __commonJS({
|
|
|
90193
90193
|
exports.HtmlAttributeHoverProvider = void 0;
|
|
90194
90194
|
var docset_1 = require_docset(), utils_1 = require_utils8(), HtmlAttributeHoverProvider = class {
|
|
90195
90195
|
async hover(currentNode, ancestors) {
|
|
90196
|
-
var
|
|
90196
|
+
var _a50;
|
|
90197
90197
|
let attributeNode = ancestors.at(-1), tagNode = (0, utils_1.findLast)(ancestors, utils_1.isNamedHtmlElementNode);
|
|
90198
90198
|
if (!attributeNode || !tagNode || !(0, utils_1.isTextNode)(currentNode) || !(0, utils_1.isHtmlAttribute)(attributeNode) || !attributeNode.name.includes(currentNode) || attributeNode.name.length > 1 || !(0, utils_1.isNamedHtmlElementNode)(tagNode))
|
|
90199
90199
|
return null;
|
|
90200
|
-
let name = currentNode.value, tagName = (0, utils_1.getCompoundName)(tagNode), tagEntry = docset_1.HtmlData.tags.find((tag) => tag.name === tagName), tagEntryAttributes = tagEntry?.attributes || [], attribute = (
|
|
90200
|
+
let name = currentNode.value, tagName = (0, utils_1.getCompoundName)(tagNode), tagEntry = docset_1.HtmlData.tags.find((tag) => tag.name === tagName), tagEntryAttributes = tagEntry?.attributes || [], attribute = (_a50 = docset_1.HtmlData.globalAttributes.find((attr) => attr.name === name)) !== null && _a50 !== void 0 ? _a50 : tagEntryAttributes.find((attr) => attr.name === name);
|
|
90201
90201
|
return attribute ? {
|
|
90202
90202
|
contents: {
|
|
90203
90203
|
kind: "markdown",
|
|
@@ -90219,11 +90219,11 @@ var require_HtmlAttributeValueHoverProvider = __commonJS({
|
|
|
90219
90219
|
exports.HtmlAttributeValueHoverProvider = void 0;
|
|
90220
90220
|
var liquid_html_parser_1 = require_dist2(), docset_1 = require_docset(), utils_1 = require_utils8(), HtmlAttributeValueHoverProvider = class {
|
|
90221
90221
|
async hover(currentNode, ancestors) {
|
|
90222
|
-
var
|
|
90222
|
+
var _a50;
|
|
90223
90223
|
let attributeNode = (0, utils_1.findLast)(ancestors, utils_1.isHtmlAttribute), tagNode = (0, utils_1.findLast)(ancestors, utils_1.isNamedHtmlElementNode);
|
|
90224
90224
|
if (!(0, utils_1.isTextNode)(currentNode) || !attributeNode || !tagNode || !(0, utils_1.isHtmlAttribute)(attributeNode) || !(0, utils_1.isNamedHtmlElementNode)(tagNode) || attributeNode.type === liquid_html_parser_1.NodeTypes.AttrEmpty || attributeNode.value.length !== 1 || !attributeNode.value.includes(currentNode))
|
|
90225
90225
|
return null;
|
|
90226
|
-
let valueName = currentNode.value, attrName = (0, utils_1.getCompoundName)(attributeNode), tagName = (0, utils_1.getCompoundName)(tagNode), tagEntry = docset_1.HtmlData.tags.find((tag) => tag.name === tagName), attribute = (
|
|
90226
|
+
let valueName = currentNode.value, attrName = (0, utils_1.getCompoundName)(attributeNode), tagName = (0, utils_1.getCompoundName)(tagNode), tagEntry = docset_1.HtmlData.tags.find((tag) => tag.name === tagName), attribute = (_a50 = docset_1.HtmlData.globalAttributes.find((attr) => attr.name === attrName)) !== null && _a50 !== void 0 ? _a50 : tagEntry?.attributes.find((attr) => attr.name === attrName), valueSetName = attribute?.valueSet, valueSetEntry = docset_1.HtmlData.valueSets.find((valueSet) => valueSet.name === valueSetName), valueEntry = valueSetEntry?.values.find((value) => value.name === valueName);
|
|
90227
90227
|
return valueEntry ? {
|
|
90228
90228
|
contents: {
|
|
90229
90229
|
kind: "markdown",
|
|
@@ -90248,11 +90248,11 @@ var require_TranslationHoverProvider = __commonJS({
|
|
|
90248
90248
|
this.getTranslationsForUri = getTranslationsForUri, this.documentManager = documentManager;
|
|
90249
90249
|
}
|
|
90250
90250
|
async hover(currentNode, ancestors, params) {
|
|
90251
|
-
var
|
|
90251
|
+
var _a50;
|
|
90252
90252
|
let parentNode = ancestors.at(-1);
|
|
90253
90253
|
if (currentNode.type !== liquid_html_parser_1.NodeTypes.String || !parentNode || parentNode.type !== liquid_html_parser_1.NodeTypes.LiquidVariable || !parentNode.filters[0] || !["t", "translate"].includes(parentNode.filters[0].name))
|
|
90254
90254
|
return null;
|
|
90255
|
-
let translations = await this.getTranslationsForUri(params.textDocument.uri), translation = (0, translations_1.translationValue)(currentNode.value, translations), document2 = (
|
|
90255
|
+
let translations = await this.getTranslationsForUri(params.textDocument.uri), translation = (0, translations_1.translationValue)(currentNode.value, translations), document2 = (_a50 = this.documentManager.get(params.textDocument.uri)) === null || _a50 === void 0 ? void 0 : _a50.textDocument;
|
|
90256
90256
|
return !translation || !document2 ? null : {
|
|
90257
90257
|
contents: {
|
|
90258
90258
|
kind: "markdown",
|
|
@@ -90309,11 +90309,11 @@ var require_RenderSnippetParameterHoverProvider = __commonJS({
|
|
|
90309
90309
|
this.getDocDefinitionForURI = getDocDefinitionForURI;
|
|
90310
90310
|
}
|
|
90311
90311
|
async hover(currentNode, ancestors, params) {
|
|
90312
|
-
var
|
|
90312
|
+
var _a50, _b;
|
|
90313
90313
|
let parentNode = ancestors.at(-1);
|
|
90314
90314
|
if (currentNode.type !== liquid_html_parser_1.NodeTypes.NamedArgument || !parentNode || parentNode.type !== liquid_html_parser_1.NodeTypes.RenderMarkup || parentNode.snippet.type !== liquid_html_parser_1.NodeTypes.String)
|
|
90315
90315
|
return null;
|
|
90316
|
-
let docDefinition = await this.getDocDefinitionForURI(params.textDocument.uri, "snippets", parentNode.snippet.value), paramName = currentNode.name, hoveredParameter = (_b = (
|
|
90316
|
+
let docDefinition = await this.getDocDefinitionForURI(params.textDocument.uri, "snippets", parentNode.snippet.value), paramName = currentNode.name, hoveredParameter = (_b = (_a50 = docDefinition?.liquidDoc) === null || _a50 === void 0 ? void 0 : _a50.parameters) === null || _b === void 0 ? void 0 : _b.find((parameter) => parameter.name === paramName);
|
|
90317
90317
|
return hoveredParameter ? {
|
|
90318
90318
|
contents: {
|
|
90319
90319
|
kind: "markdown",
|
|
@@ -90392,11 +90392,11 @@ var require_LiquidDocTagHoverProvider = __commonJS({
|
|
|
90392
90392
|
this.documentManager = documentManager;
|
|
90393
90393
|
}
|
|
90394
90394
|
async hover(currentNode, ancestors, params) {
|
|
90395
|
-
var
|
|
90395
|
+
var _a50;
|
|
90396
90396
|
let parentNode = ancestors.at(-1);
|
|
90397
90397
|
if (currentNode.type !== liquid_html_parser_1.NodeTypes.LiquidDocParamNode && currentNode.type !== liquid_html_parser_1.NodeTypes.LiquidDocDescriptionNode && currentNode.type !== liquid_html_parser_1.NodeTypes.LiquidDocExampleNode)
|
|
90398
90398
|
return null;
|
|
90399
|
-
let document2 = (
|
|
90399
|
+
let document2 = (_a50 = this.documentManager.get(params.textDocument.uri)) === null || _a50 === void 0 ? void 0 : _a50.textDocument;
|
|
90400
90400
|
if (document2 && document2.offsetAt(params.position) > currentNode.position.start + currentNode.name.length)
|
|
90401
90401
|
return null;
|
|
90402
90402
|
let docTagData = liquidDoc_1.SUPPORTED_LIQUID_DOC_TAG_HANDLES[currentNode.name];
|
|
@@ -90424,14 +90424,14 @@ var require_ContentForArgumentHoverProvider = __commonJS({
|
|
|
90424
90424
|
this.getDocDefinitionForURI = getDocDefinitionForURI;
|
|
90425
90425
|
}
|
|
90426
90426
|
async hover(currentNode, ancestors, params) {
|
|
90427
|
-
var
|
|
90427
|
+
var _a50, _b;
|
|
90428
90428
|
let parentNode = ancestors.at(-1);
|
|
90429
90429
|
if (currentNode.type !== liquid_html_parser_1.NodeTypes.NamedArgument || !parentNode || parentNode.type !== liquid_html_parser_1.NodeTypes.ContentForMarkup || parentNode.contentForType.type !== liquid_html_parser_1.NodeTypes.String)
|
|
90430
90430
|
return null;
|
|
90431
90431
|
let blockName = (0, theme_check_common_1.getBlockName)(parentNode);
|
|
90432
90432
|
if (!blockName)
|
|
90433
90433
|
return null;
|
|
90434
|
-
let docDefinition = await this.getDocDefinitionForURI(params.textDocument.uri, "blocks", blockName), hoverArgument = (_b = (
|
|
90434
|
+
let docDefinition = await this.getDocDefinitionForURI(params.textDocument.uri, "blocks", blockName), hoverArgument = (_b = (_a50 = docDefinition?.liquidDoc) === null || _a50 === void 0 ? void 0 : _a50.parameters) === null || _b === void 0 ? void 0 : _b.find((argument) => argument.name === currentNode.name);
|
|
90435
90435
|
return hoverArgument ? {
|
|
90436
90436
|
contents: {
|
|
90437
90437
|
kind: "markdown",
|
|
@@ -90502,12 +90502,12 @@ var require_HoverProvider = __commonJS({
|
|
|
90502
90502
|
];
|
|
90503
90503
|
}
|
|
90504
90504
|
async hover(params) {
|
|
90505
|
-
var
|
|
90505
|
+
var _a50;
|
|
90506
90506
|
let uri = params.textDocument.uri, document2 = this.documentManager.get(uri);
|
|
90507
90507
|
if (document2?.type !== theme_check_common_1.SourceCodeType.LiquidHtml || document2.ast instanceof Error)
|
|
90508
90508
|
return null;
|
|
90509
90509
|
let [currentNode, ancestors] = (0, theme_check_common_2.findCurrentNode)(document2.ast, document2.textDocument.offsetAt(params.position)), promises = this.providers.map((p) => p.hover(currentNode, ancestors, params));
|
|
90510
|
-
return (
|
|
90510
|
+
return (_a50 = (await Promise.all(promises)).find(Boolean)) !== null && _a50 !== void 0 ? _a50 : null;
|
|
90511
90511
|
}
|
|
90512
90512
|
};
|
|
90513
90513
|
exports.HoverProvider = HoverProvider;
|
|
@@ -90718,13 +90718,13 @@ var require_SchemaTranslationCompletionProvider = __commonJS({
|
|
|
90718
90718
|
this.getDefaultSchemaTranslations = getDefaultSchemaTranslations;
|
|
90719
90719
|
}
|
|
90720
90720
|
async completeValue(context, path3) {
|
|
90721
|
-
var
|
|
90721
|
+
var _a50;
|
|
90722
90722
|
if (!(0, utils_1.isSectionOrBlockFile)(context.doc.uri) || !(0, RequestContext_1.isLiquidRequestContext)(context))
|
|
90723
90723
|
return [];
|
|
90724
90724
|
let { doc, parsed } = context, label = (0, theme_check_common_1.deepGet)(parsed, path3);
|
|
90725
90725
|
if (!label || typeof label != "string" || !label.startsWith("t:"))
|
|
90726
90726
|
return [];
|
|
90727
|
-
if (((
|
|
90727
|
+
if (((_a50 = /^t:(.*)/.exec(label)) === null || _a50 === void 0 ? void 0 : _a50[1]) === void 0)
|
|
90728
90728
|
return [];
|
|
90729
90729
|
let translations = await this.getDefaultSchemaTranslations(doc.uri);
|
|
90730
90730
|
return (0, translations_1.translationOptions)(translations).map((option) => {
|
|
@@ -90857,8 +90857,8 @@ var require_schemaSettings = __commonJS({
|
|
|
90857
90857
|
}
|
|
90858
90858
|
exports.schemaSettingsPropertyCompletionItems = schemaSettingsPropertyCompletionItems;
|
|
90859
90859
|
function getSectionBlockByName(parsedSchema = {}, blockName) {
|
|
90860
|
-
var
|
|
90861
|
-
return (_b = (
|
|
90860
|
+
var _a50, _b;
|
|
90861
|
+
return (_b = (_a50 = parsedSchema.blocks) === null || _a50 === void 0 ? void 0 : _a50.filter((block) => "name" in block)) === null || _b === void 0 ? void 0 : _b.find((block) => block.type === blockName);
|
|
90862
90862
|
}
|
|
90863
90863
|
exports.getSectionBlockByName = getSectionBlockByName;
|
|
90864
90864
|
}
|
|
@@ -90934,10 +90934,10 @@ var require_SettingsHoverProvider = __commonJS({
|
|
|
90934
90934
|
return path3.at(0) === "default" && path3.at(1) === "settings" && path3.at(2) !== void 0 && typeof path3.at(2) == "string";
|
|
90935
90935
|
}
|
|
90936
90936
|
async function getSettingsLabel(doc, label) {
|
|
90937
|
-
var
|
|
90937
|
+
var _a50;
|
|
90938
90938
|
let schema = await doc.getSchema();
|
|
90939
90939
|
if (!(!schema || !(0, BlockTypeCompletionProvider_1.isSectionOrBlockSchema)(schema) || (0, theme_check_common_1.isError)(schema.parsed) || schema.parsed.settings === void 0 || !Array.isArray(schema.parsed.settings)))
|
|
90940
|
-
return (
|
|
90940
|
+
return (_a50 = schema.parsed.settings.find((setting) => setting?.id === label)) === null || _a50 === void 0 ? void 0 : _a50.label;
|
|
90941
90941
|
}
|
|
90942
90942
|
}
|
|
90943
90943
|
});
|
|
@@ -90954,7 +90954,7 @@ var require_BlockSettingsPropertyCompletionProvider = __commonJS({
|
|
|
90954
90954
|
this.getDefaultSchemaTranslations = getDefaultSchemaTranslations, this.getThemeBlockSchema = getThemeBlockSchema;
|
|
90955
90955
|
}
|
|
90956
90956
|
async completeProperty(context, path3) {
|
|
90957
|
-
var
|
|
90957
|
+
var _a50, _b;
|
|
90958
90958
|
let { doc } = context;
|
|
90959
90959
|
if (doc.type !== theme_check_common_1.SourceCodeType.LiquidHtml)
|
|
90960
90960
|
return [];
|
|
@@ -90972,7 +90972,7 @@ var require_BlockSettingsPropertyCompletionProvider = __commonJS({
|
|
|
90972
90972
|
return (0, schemaSettings_1.schemaSettingsPropertyCompletionItems)(localBlock.settings, translations);
|
|
90973
90973
|
} else {
|
|
90974
90974
|
let blockOriginSchema = await this.getThemeBlockSchema(doc.uri, blockType);
|
|
90975
|
-
return !blockOriginSchema || (0, theme_check_common_1.isError)(blockOriginSchema.parsed) || !(0, BlockTypeCompletionProvider_1.isSectionOrBlockSchema)(blockOriginSchema) ? [] : !(!((
|
|
90975
|
+
return !blockOriginSchema || (0, theme_check_common_1.isError)(blockOriginSchema.parsed) || !(0, BlockTypeCompletionProvider_1.isSectionOrBlockSchema)(blockOriginSchema) ? [] : !(!((_a50 = blockOriginSchema.parsed) === null || _a50 === void 0) && _a50.settings) || !Array.isArray((_b = blockOriginSchema.parsed) === null || _b === void 0 ? void 0 : _b.settings) ? [] : (0, schemaSettings_1.schemaSettingsPropertyCompletionItems)(blockOriginSchema.parsed.settings, translations);
|
|
90976
90976
|
}
|
|
90977
90977
|
return [];
|
|
90978
90978
|
}
|
|
@@ -91042,8 +91042,8 @@ var require_BlockSettingsHoverProvider = __commonJS({
|
|
|
91042
91042
|
return settings !== void 0 && Array.isArray(settings);
|
|
91043
91043
|
}
|
|
91044
91044
|
function getSettingLabelById(settings, id) {
|
|
91045
|
-
var
|
|
91046
|
-
return (
|
|
91045
|
+
var _a50;
|
|
91046
|
+
return (_a50 = settings.find((setting) => setting.id === id)) === null || _a50 === void 0 ? void 0 : _a50.label;
|
|
91047
91047
|
}
|
|
91048
91048
|
}
|
|
91049
91049
|
});
|
|
@@ -91274,8 +91274,8 @@ var require_JSONLanguageService = __commonJS({
|
|
|
91274
91274
|
}
|
|
91275
91275
|
}
|
|
91276
91276
|
async getSchemaForURI(uri) {
|
|
91277
|
-
var
|
|
91278
|
-
let schema = (
|
|
91277
|
+
var _a50;
|
|
91278
|
+
let schema = (_a50 = this.schemas[uri]) === null || _a50 === void 0 ? void 0 : _a50.schema;
|
|
91279
91279
|
return schema || `Could not get schema for '${uri}'`;
|
|
91280
91280
|
}
|
|
91281
91281
|
};
|
|
@@ -91344,10 +91344,10 @@ var require_HtmlTagNameLinkedRangesProvider = __commonJS({
|
|
|
91344
91344
|
this.documentManager = documentManager;
|
|
91345
91345
|
}
|
|
91346
91346
|
async linkedEditingRanges(node, ancestors, params) {
|
|
91347
|
-
var
|
|
91347
|
+
var _a50;
|
|
91348
91348
|
if (!node || !ancestors)
|
|
91349
91349
|
return null;
|
|
91350
|
-
let textDocument = (
|
|
91350
|
+
let textDocument = (_a50 = this.documentManager.get(params.textDocument.uri)) === null || _a50 === void 0 ? void 0 : _a50.textDocument;
|
|
91351
91351
|
if (!textDocument)
|
|
91352
91352
|
return null;
|
|
91353
91353
|
let ranges = (0, htmlTagNames_1.getHtmlElementNameRanges)(node, ancestors, params, textDocument);
|
|
@@ -91394,14 +91394,14 @@ var require_LinkedEditingRangesProvider = __commonJS({
|
|
|
91394
91394
|
];
|
|
91395
91395
|
}
|
|
91396
91396
|
async linkedEditingRanges(params) {
|
|
91397
|
-
var
|
|
91397
|
+
var _a50;
|
|
91398
91398
|
let document2 = this.documentManager.get(params.textDocument.uri);
|
|
91399
91399
|
if (!document2 || document2.type !== theme_check_common_1.SourceCodeType.LiquidHtml)
|
|
91400
91400
|
return null;
|
|
91401
91401
|
let currentNode = null, ancestors = null;
|
|
91402
91402
|
document2.ast instanceof Error || ([currentNode, ancestors] = (0, theme_check_common_2.findCurrentNode)(document2.ast, document2.textDocument.offsetAt(params.position)));
|
|
91403
91403
|
let promises = this.providers.map((p) => p.linkedEditingRanges(currentNode, ancestors, params).catch(() => null));
|
|
91404
|
-
return (
|
|
91404
|
+
return (_a50 = (await Promise.all(promises)).find(Boolean)) !== null && _a50 !== void 0 ? _a50 : null;
|
|
91405
91405
|
}
|
|
91406
91406
|
};
|
|
91407
91407
|
exports.LinkedEditingRangesProvider = LinkedEditingRangesProvider;
|
|
@@ -91420,8 +91420,8 @@ var require_HtmlTagNameRenameProvider = __commonJS({
|
|
|
91420
91420
|
this.documentManager = documentManager;
|
|
91421
91421
|
}
|
|
91422
91422
|
async prepare(node, ancestors, params) {
|
|
91423
|
-
var
|
|
91424
|
-
let textDocument = (
|
|
91423
|
+
var _a50;
|
|
91424
|
+
let textDocument = (_a50 = this.documentManager.get(params.textDocument.uri)) === null || _a50 === void 0 ? void 0 : _a50.textDocument;
|
|
91425
91425
|
if (!textDocument || !node || !ancestors)
|
|
91426
91426
|
return null;
|
|
91427
91427
|
let ranges = (0, htmlTagNames_1.getHtmlElementNameRanges)(node, ancestors, params, textDocument);
|
|
@@ -91431,8 +91431,8 @@ var require_HtmlTagNameRenameProvider = __commonJS({
|
|
|
91431
91431
|
};
|
|
91432
91432
|
}
|
|
91433
91433
|
async rename(node, ancestors, params) {
|
|
91434
|
-
var
|
|
91435
|
-
let textDocument = (
|
|
91434
|
+
var _a50;
|
|
91435
|
+
let textDocument = (_a50 = this.documentManager.get(params.textDocument.uri)) === null || _a50 === void 0 ? void 0 : _a50.textDocument;
|
|
91436
91436
|
if (!textDocument || !node || !ancestors)
|
|
91437
91437
|
return null;
|
|
91438
91438
|
let ranges = (0, htmlTagNames_1.getHtmlElementNameRanges)(node, ancestors, params, textDocument);
|
|
@@ -91512,8 +91512,8 @@ var require_LiquidVariableRenameProvider = __commonJS({
|
|
|
91512
91512
|
AssignMarkup: replaceRange,
|
|
91513
91513
|
ForMarkup: replaceRange,
|
|
91514
91514
|
TextNode: (node2, ancestors2) => {
|
|
91515
|
-
var
|
|
91516
|
-
if (((
|
|
91515
|
+
var _a50;
|
|
91516
|
+
if (((_a50 = ancestors2.at(-1)) === null || _a50 === void 0 ? void 0 : _a50.type) === liquid_html_parser_1.NodeTypes.LiquidDocParamNode)
|
|
91517
91517
|
return liquidDocParamUpdated = !0, replaceRange(node2, ancestors2);
|
|
91518
91518
|
}
|
|
91519
91519
|
});
|
|
@@ -91535,11 +91535,11 @@ var require_LiquidVariableRenameProvider = __commonJS({
|
|
|
91535
91535
|
return !!parentNode && parentNode.type === liquid_html_parser_1.NodeTypes.LiquidDocParamNode && parentNode.paramName === node && node.type === liquid_html_parser_1.NodeTypes.TextNode;
|
|
91536
91536
|
}
|
|
91537
91537
|
function variableName(node) {
|
|
91538
|
-
var
|
|
91538
|
+
var _a50, _b;
|
|
91539
91539
|
switch (node.type) {
|
|
91540
91540
|
case liquid_html_parser_1.NodeTypes.VariableLookup:
|
|
91541
91541
|
case liquid_html_parser_1.NodeTypes.AssignMarkup:
|
|
91542
|
-
return (
|
|
91542
|
+
return (_a50 = node.name) !== null && _a50 !== void 0 ? _a50 : "";
|
|
91543
91543
|
case liquid_html_parser_1.NodeTypes.ForMarkup:
|
|
91544
91544
|
return (_b = node.variableName) !== null && _b !== void 0 ? _b : "";
|
|
91545
91545
|
case liquid_html_parser_1.NodeTypes.TextNode:
|
|
@@ -91573,7 +91573,7 @@ var require_LiquidVariableRenameProvider = __commonJS({
|
|
|
91573
91573
|
};
|
|
91574
91574
|
}
|
|
91575
91575
|
async function updateRenderTags(connection, liquidSourceCodes, snippetName, oldParamName, newParamName) {
|
|
91576
|
-
var
|
|
91576
|
+
var _a50;
|
|
91577
91577
|
let editLabel = `Rename snippet parameter '${oldParamName}' to '${newParamName}'`, annotationId = "renameSnippetParameter", workspaceEdit = {
|
|
91578
91578
|
documentChanges: [],
|
|
91579
91579
|
changeAnnotations: {
|
|
@@ -91588,7 +91588,7 @@ var require_LiquidVariableRenameProvider = __commonJS({
|
|
|
91588
91588
|
continue;
|
|
91589
91589
|
let textDocument = sourceCode.textDocument, edits = (0, theme_check_common_1.visit)(sourceCode.ast, {
|
|
91590
91590
|
RenderMarkup(node) {
|
|
91591
|
-
var
|
|
91591
|
+
var _a51;
|
|
91592
91592
|
if (node.snippet.type !== liquid_html_parser_1.NodeTypes.String || node.snippet.value !== snippetName)
|
|
91593
91593
|
return;
|
|
91594
91594
|
let renamedNameParamNode = node.args.find((arg) => arg.name === oldParamName);
|
|
@@ -91597,7 +91597,7 @@ var require_LiquidVariableRenameProvider = __commonJS({
|
|
|
91597
91597
|
newText: `${newParamName}: `,
|
|
91598
91598
|
range: vscode_languageserver_1.Range.create(textDocument.positionAt(renamedNameParamNode.position.start), textDocument.positionAt(renamedNameParamNode.value.position.start))
|
|
91599
91599
|
};
|
|
91600
|
-
if (((
|
|
91600
|
+
if (((_a51 = node.alias) === null || _a51 === void 0 ? void 0 : _a51.value) === oldParamName && node.variable) {
|
|
91601
91601
|
let match2 = /as\s+([^\s,]+)/g.exec(node.source.slice(node.position.start, node.position.end));
|
|
91602
91602
|
return match2 ? {
|
|
91603
91603
|
newText: `as ${newParamName}`,
|
|
@@ -91609,7 +91609,7 @@ var require_LiquidVariableRenameProvider = __commonJS({
|
|
|
91609
91609
|
edits.length !== 0 && workspaceEdit.documentChanges.push({
|
|
91610
91610
|
textDocument: {
|
|
91611
91611
|
uri: textDocument.uri,
|
|
91612
|
-
version: (
|
|
91612
|
+
version: (_a50 = sourceCode.version) !== null && _a50 !== void 0 ? _a50 : null
|
|
91613
91613
|
},
|
|
91614
91614
|
annotationId,
|
|
91615
91615
|
edits
|
|
@@ -91643,21 +91643,21 @@ var require_RenameProvider = __commonJS({
|
|
|
91643
91643
|
}
|
|
91644
91644
|
/** Prepare is for telling if you can rename this thing or not, and what text to rename */
|
|
91645
91645
|
async prepare(params) {
|
|
91646
|
-
var
|
|
91646
|
+
var _a50;
|
|
91647
91647
|
let [currentNode, ancestors] = this.nodes(params);
|
|
91648
91648
|
if (currentNode === null || ancestors === null)
|
|
91649
91649
|
return null;
|
|
91650
91650
|
let promises = this.providers.map((provider) => provider.prepare(currentNode, ancestors, params).catch(() => null));
|
|
91651
|
-
return (
|
|
91651
|
+
return (_a50 = (await Promise.all(promises)).find(Boolean)) !== null && _a50 !== void 0 ? _a50 : null;
|
|
91652
91652
|
}
|
|
91653
91653
|
/** Rename is for actually renaming something */
|
|
91654
91654
|
async rename(params) {
|
|
91655
|
-
var
|
|
91655
|
+
var _a50;
|
|
91656
91656
|
let [currentNode, ancestors] = this.nodes(params);
|
|
91657
91657
|
if (currentNode === null || ancestors === null)
|
|
91658
91658
|
return null;
|
|
91659
91659
|
let promises = this.providers.map((provider) => provider.rename(currentNode, ancestors, params).catch(() => null));
|
|
91660
|
-
return (
|
|
91660
|
+
return (_a50 = (await Promise.all(promises)).find(Boolean)) !== null && _a50 !== void 0 ? _a50 : null;
|
|
91661
91661
|
}
|
|
91662
91662
|
/** a helper for getting the node under the cursor and its ancestry */
|
|
91663
91663
|
nodes(params) {
|
|
@@ -91681,7 +91681,7 @@ var require_AssetRenameHandler = __commonJS({
|
|
|
91681
91681
|
this.documentManager = documentManager, this.connection = connection, this.capabilities = capabilities, this.findThemeRootURI = findThemeRootURI;
|
|
91682
91682
|
}
|
|
91683
91683
|
async onDidRenameFiles(params) {
|
|
91684
|
-
var
|
|
91684
|
+
var _a50;
|
|
91685
91685
|
if (!this.capabilities.hasApplyEditSupport)
|
|
91686
91686
|
return;
|
|
91687
91687
|
let relevantRenames = params.files.filter((file) => (0, uri_1.isAsset)(file.oldUri) && (0, uri_1.isAsset)(file.newUri));
|
|
@@ -91719,7 +91719,7 @@ var require_AssetRenameHandler = __commonJS({
|
|
|
91719
91719
|
edits.length !== 0 && workspaceEdit.documentChanges.push({
|
|
91720
91720
|
textDocument: {
|
|
91721
91721
|
uri: textDocument.uri,
|
|
91722
|
-
version: (
|
|
91722
|
+
version: (_a50 = sourceCode.version) !== null && _a50 !== void 0 ? _a50 : null
|
|
91723
91723
|
},
|
|
91724
91724
|
annotationId,
|
|
91725
91725
|
edits
|
|
@@ -91920,11 +91920,11 @@ var require_BlockRenameHandler = __commonJS({
|
|
|
91920
91920
|
};
|
|
91921
91921
|
}
|
|
91922
91922
|
function documentChanges(sourceCode, edits) {
|
|
91923
|
-
var
|
|
91923
|
+
var _a50;
|
|
91924
91924
|
return {
|
|
91925
91925
|
textDocument: {
|
|
91926
91926
|
uri: sourceCode.uri,
|
|
91927
|
-
version: (
|
|
91927
|
+
version: (_a50 = sourceCode.version) !== null && _a50 !== void 0 ? _a50 : null
|
|
91928
91928
|
},
|
|
91929
91929
|
edits
|
|
91930
91930
|
};
|
|
@@ -92040,11 +92040,11 @@ var require_SectionRenameHandler = __commonJS({
|
|
|
92040
92040
|
};
|
|
92041
92041
|
exports.SectionRenameHandler = SectionRenameHandler;
|
|
92042
92042
|
function documentChanges(sourceCode, edits) {
|
|
92043
|
-
var
|
|
92043
|
+
var _a50;
|
|
92044
92044
|
return {
|
|
92045
92045
|
textDocument: {
|
|
92046
92046
|
uri: sourceCode.uri,
|
|
92047
|
-
version: (
|
|
92047
|
+
version: (_a50 = sourceCode.version) !== null && _a50 !== void 0 ? _a50 : null
|
|
92048
92048
|
},
|
|
92049
92049
|
edits
|
|
92050
92050
|
};
|
|
@@ -92064,7 +92064,7 @@ var require_SnippetRenameHandler = __commonJS({
|
|
|
92064
92064
|
this.documentManager = documentManager, this.connection = connection, this.capabilities = capabilities, this.findThemeRootURI = findThemeRootURI;
|
|
92065
92065
|
}
|
|
92066
92066
|
async onDidRenameFiles(params) {
|
|
92067
|
-
var
|
|
92067
|
+
var _a50;
|
|
92068
92068
|
if (!this.capabilities.hasApplyEditSupport)
|
|
92069
92069
|
return;
|
|
92070
92070
|
let relevantRenames = params.files.filter((file) => (0, uri_1.isSnippet)(file.oldUri) && (0, uri_1.isSnippet)(file.newUri));
|
|
@@ -92105,7 +92105,7 @@ var require_SnippetRenameHandler = __commonJS({
|
|
|
92105
92105
|
edits.length !== 0 && workspaceEdit.documentChanges.push({
|
|
92106
92106
|
textDocument: {
|
|
92107
92107
|
uri: textDocument.uri,
|
|
92108
|
-
version: (
|
|
92108
|
+
version: (_a50 = sourceCode.version) !== null && _a50 !== void 0 ? _a50 : null
|
|
92109
92109
|
},
|
|
92110
92110
|
annotationId,
|
|
92111
92111
|
edits
|
|
@@ -92246,7 +92246,7 @@ var require_Configuration = __commonJS({
|
|
|
92246
92246
|
"../../node_modules/.pnpm/@shopify+theme-language-server-common@2.20.0/node_modules/@shopify/theme-language-server-common/dist/server/Configuration.js"(exports) {
|
|
92247
92247
|
"use strict";
|
|
92248
92248
|
init_cjs_shims();
|
|
92249
|
-
var
|
|
92249
|
+
var _a50, _b, _c, _d;
|
|
92250
92250
|
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
92251
92251
|
exports.Configuration = exports.ConfigurationKeys = exports.PRELOAD_ON_BOOT = exports.CHECK_ON_CHANGE = exports.CHECK_ON_SAVE = exports.CHECK_ON_OPEN = void 0;
|
|
92252
92252
|
var theme_check_common_1 = require_dist3(), vscode_languageserver_1 = require_main4();
|
|
@@ -92262,7 +92262,7 @@ var require_Configuration = __commonJS({
|
|
|
92262
92262
|
];
|
|
92263
92263
|
var Configuration = class {
|
|
92264
92264
|
constructor(connection, capabilities) {
|
|
92265
|
-
this.connection = connection, this.capabilities = capabilities, this[
|
|
92265
|
+
this.connection = connection, this.capabilities = capabilities, this[_a50] = !0, this[_b] = !0, this[_c] = !0, this[_d] = !0, this.fetchConfiguration = (0, theme_check_common_1.memo)(async () => {
|
|
92266
92266
|
if (!this.capabilities.hasWorkspaceConfigurationSupport)
|
|
92267
92267
|
return;
|
|
92268
92268
|
let configs = await this.connection.workspace.getConfiguration(exports.ConfigurationKeys.map((key) => ({ section: key })));
|
|
@@ -92298,7 +92298,7 @@ var require_Configuration = __commonJS({
|
|
|
92298
92298
|
}
|
|
92299
92299
|
};
|
|
92300
92300
|
exports.Configuration = Configuration;
|
|
92301
|
-
|
|
92301
|
+
_a50 = exports.CHECK_ON_OPEN, _b = exports.CHECK_ON_SAVE, _c = exports.CHECK_ON_CHANGE, _d = exports.PRELOAD_ON_BOOT;
|
|
92302
92302
|
}
|
|
92303
92303
|
});
|
|
92304
92304
|
|
|
@@ -95256,13 +95256,13 @@ var require_utils12 = __commonJS({
|
|
|
95256
95256
|
}
|
|
95257
95257
|
exports.exists = exists;
|
|
95258
95258
|
async function acceptsLocalBlocks(sectionType, deps) {
|
|
95259
|
-
var
|
|
95259
|
+
var _a50;
|
|
95260
95260
|
let sectionSchema = await deps.getSectionSchema(sectionType).catch((_4) => {
|
|
95261
95261
|
});
|
|
95262
95262
|
if (!sectionSchema)
|
|
95263
95263
|
return new Error("Section does not exist");
|
|
95264
95264
|
let validSchema = sectionSchema.validSchema;
|
|
95265
|
-
return validSchema instanceof Error ? validSchema : ((
|
|
95265
|
+
return validSchema instanceof Error ? validSchema : ((_a50 = validSchema.blocks) !== null && _a50 !== void 0 ? _a50 : []).some((block) => block.type && "name" in block && block.name);
|
|
95266
95266
|
}
|
|
95267
95267
|
exports.acceptsLocalBlocks = acceptsLocalBlocks;
|
|
95268
95268
|
}
|
|
@@ -95351,13 +95351,13 @@ var require_augment = __commonJS({
|
|
|
95351
95351
|
exports.augmentDependencies = void 0;
|
|
95352
95352
|
var theme_check_common_1 = require_dist3(), toSourceCode_1 = require_toSourceCode(), utils_1 = require_utils12();
|
|
95353
95353
|
function augmentDependencies(rootUri, ideps) {
|
|
95354
|
-
var
|
|
95354
|
+
var _a50;
|
|
95355
95355
|
return {
|
|
95356
95356
|
fs: ideps.fs,
|
|
95357
95357
|
getBlockSchema: (0, theme_check_common_1.memoize)(ideps.getBlockSchema, utils_1.identity),
|
|
95358
95358
|
getSectionSchema: (0, theme_check_common_1.memoize)(ideps.getSectionSchema, utils_1.identity),
|
|
95359
95359
|
// parse at most once
|
|
95360
|
-
getSourceCode: (0, theme_check_common_1.memoize)((
|
|
95360
|
+
getSourceCode: (0, theme_check_common_1.memoize)((_a50 = ideps.getSourceCode) !== null && _a50 !== void 0 ? _a50 : async function(uri) {
|
|
95361
95361
|
let contents = await ideps.fs.readFile(uri);
|
|
95362
95362
|
return (0, toSourceCode_1.toSourceCode)(uri, contents);
|
|
95363
95363
|
}, utils_1.identity),
|
|
@@ -96282,7 +96282,7 @@ var require_ThemeGraphManager = __commonJS({
|
|
|
96282
96282
|
}));
|
|
96283
96283
|
}
|
|
96284
96284
|
async getDependencies(uri, offset, { includeIndirect = !0, includePreset = !0 } = {}) {
|
|
96285
|
-
var
|
|
96285
|
+
var _a50;
|
|
96286
96286
|
let graph = await this.getThemeGraphForURI(uri);
|
|
96287
96287
|
if (!graph)
|
|
96288
96288
|
return [];
|
|
@@ -96293,7 +96293,7 @@ var require_ThemeGraphManager = __commonJS({
|
|
|
96293
96293
|
"direct",
|
|
96294
96294
|
includeIndirect ? "indirect" : void 0,
|
|
96295
96295
|
includePreset ? "preset" : void 0
|
|
96296
|
-
], deps = (
|
|
96296
|
+
], deps = (_a50 = module2.dependencies.filter((dep) => includedTypes.includes(dep.type))) !== null && _a50 !== void 0 ? _a50 : [];
|
|
96297
96297
|
return Promise.all(deps.map(async (dep) => {
|
|
96298
96298
|
let [source, target] = await Promise.all([
|
|
96299
96299
|
this.augmentedLocation(dep.source),
|
|
@@ -96307,12 +96307,12 @@ var require_ThemeGraphManager = __commonJS({
|
|
|
96307
96307
|
}));
|
|
96308
96308
|
}
|
|
96309
96309
|
async augmentedLocation(loc) {
|
|
96310
|
-
var
|
|
96310
|
+
var _a50;
|
|
96311
96311
|
let sourceCode = await this.getSourceCode(loc.uri).catch(() => {
|
|
96312
96312
|
}), { uri, range } = loc;
|
|
96313
96313
|
if (!sourceCode || !range)
|
|
96314
96314
|
return { exists: !!sourceCode, ...loc };
|
|
96315
|
-
let doc = (
|
|
96315
|
+
let doc = (_a50 = this.documentManager.get(loc.uri)) === null || _a50 === void 0 ? void 0 : _a50.textDocument;
|
|
96316
96316
|
return doc || (doc = vscode_languageserver_textdocument_1.TextDocument.create(sourceCode.uri, sourceCode.type, 0, sourceCode.source)), {
|
|
96317
96317
|
uri,
|
|
96318
96318
|
range,
|
|
@@ -96465,21 +96465,21 @@ var require_startServer = __commonJS({
|
|
|
96465
96465
|
}
|
|
96466
96466
|
let getDefaultLocaleFileUri = (0, theme_check_common_1.makeGetDefaultLocaleFileUri)(fs7);
|
|
96467
96467
|
async function getDefaultLocaleSourceCode(uri) {
|
|
96468
|
-
var
|
|
96468
|
+
var _a50;
|
|
96469
96469
|
let rootUri = await findThemeRootURI(uri);
|
|
96470
96470
|
if (!rootUri)
|
|
96471
96471
|
return null;
|
|
96472
96472
|
let defaultLocaleFileUri = await getDefaultLocaleFileUri(rootUri);
|
|
96473
|
-
return defaultLocaleFileUri && (
|
|
96473
|
+
return defaultLocaleFileUri && (_a50 = documentManager.get(defaultLocaleFileUri)) !== null && _a50 !== void 0 ? _a50 : null;
|
|
96474
96474
|
}
|
|
96475
96475
|
let getDefaultSchemaLocaleFileUri = (0, theme_check_common_1.makeGetDefaultSchemaLocaleFileUri)(fs7);
|
|
96476
96476
|
async function getDefaultSchemaLocaleSourceCode(uri) {
|
|
96477
|
-
var
|
|
96477
|
+
var _a50;
|
|
96478
96478
|
let rootUri = await findThemeRootURI(uri);
|
|
96479
96479
|
if (!rootUri)
|
|
96480
96480
|
return null;
|
|
96481
96481
|
let defaultLocaleFileUri = await getDefaultSchemaLocaleFileUri(rootUri);
|
|
96482
|
-
return defaultLocaleFileUri && (
|
|
96482
|
+
return defaultLocaleFileUri && (_a50 = documentManager.get(defaultLocaleFileUri)) !== null && _a50 !== void 0 ? _a50 : null;
|
|
96483
96483
|
}
|
|
96484
96484
|
let definitionsProvider = new DefinitionProvider_1.DefinitionProvider(documentManager, getDefaultLocaleSourceCode, getDefaultSchemaLocaleSourceCode), jsonLanguageService = new JSONLanguageService_1.JSONLanguageService(documentManager, jsonValidationSet, getSchemaTranslationsForURI, getModeForURI, getThemeBlockNames, getThemeBlockSchema, findThemeRootURI), completionsProvider = new completions_1.CompletionsProvider({
|
|
96485
96485
|
documentManager,
|
|
@@ -96620,18 +96620,18 @@ var require_startServer = __commonJS({
|
|
|
96620
96620
|
}), connection.onDefinition(async (params) => hasUnsupportedDocument(params) ? [] : definitionsProvider.definitions(params)), connection.onCodeAction(async (params) => codeActionsProvider.codeActions(params)), connection.onExecuteCommand(async (params) => {
|
|
96621
96621
|
await executeCommandProvider.execute(params);
|
|
96622
96622
|
}), connection.onCompletion(async (params) => {
|
|
96623
|
-
var
|
|
96624
|
-
return hasUnsupportedDocument(params) ? [] : (_b = (
|
|
96623
|
+
var _a50, _b;
|
|
96624
|
+
return hasUnsupportedDocument(params) ? [] : (_b = (_a50 = await cssLanguageService.completions(params)) !== null && _a50 !== void 0 ? _a50 : await jsonLanguageService.completions(params)) !== null && _b !== void 0 ? _b : await completionsProvider.completions(params);
|
|
96625
96625
|
}), connection.onHover(async (params) => {
|
|
96626
|
-
var
|
|
96627
|
-
return hasUnsupportedDocument(params) ? null : (_b = (
|
|
96626
|
+
var _a50, _b;
|
|
96627
|
+
return hasUnsupportedDocument(params) ? null : (_b = (_a50 = await cssLanguageService.hover(params)) !== null && _a50 !== void 0 ? _a50 : await jsonLanguageService.hover(params)) !== null && _b !== void 0 ? _b : await hoverProvider.hover(params);
|
|
96628
96628
|
}), connection.onDocumentOnTypeFormatting(async (params) => hasUnsupportedDocument(params) ? null : onTypeFormattingProvider.onTypeFormatting(params)), connection.onDocumentHighlight(async (params) => hasUnsupportedDocument(params) ? [] : documentHighlightProvider.documentHighlights(params)), connection.onPrepareRename(async (params) => hasUnsupportedDocument(params) ? null : renameProvider.prepare(params)), connection.onRenameRequest(async (params) => hasUnsupportedDocument(params) ? null : renameProvider.rename(params)), connection.languages.onLinkedEditingRange(async (params) => hasUnsupportedDocument(params) ? null : linkedEditingRangesProvider.linkedEditingRanges(params)), connection.workspace.onDidRenameFiles(async (params) => {
|
|
96629
96629
|
let triggerUris = params.files.map((fileRename) => fileRename.newUri);
|
|
96630
96630
|
for (let { oldUri, newUri } of params.files)
|
|
96631
96631
|
documentManager.rename(oldUri, newUri), fs7.readDirectory.invalidate(theme_check_common_1.path.dirname(oldUri)), fs7.readDirectory.invalidate(theme_check_common_1.path.dirname(newUri)), fs7.readFile.invalidate(oldUri), fs7.readFile.invalidate(newUri), fs7.stat.invalidate(oldUri), fs7.stat.invalidate(newUri), themeGraphManager.rename(oldUri, newUri);
|
|
96632
96632
|
await renameHandler.onDidRenameFiles(params), runChecks.force(triggerUris);
|
|
96633
96633
|
}), connection.onDidChangeWatchedFiles(async (params) => {
|
|
96634
|
-
var
|
|
96634
|
+
var _a50;
|
|
96635
96635
|
if (params.changes.length === 0)
|
|
96636
96636
|
return;
|
|
96637
96637
|
let triggerUris = params.changes.map((change) => change.uri), updates = [];
|
|
@@ -96649,7 +96649,7 @@ var require_startServer = __commonJS({
|
|
|
96649
96649
|
fs7.readDirectory.invalidate(theme_check_common_1.path.dirname(change.uri)), fs7.readFile.invalidate(change.uri), fs7.stat.invalidate(change.uri), themeGraphManager.create(change.uri), updates.push(documentManager.changeFromDisk(change.uri));
|
|
96650
96650
|
break;
|
|
96651
96651
|
case vscode_languageserver_1.FileChangeType.Changed:
|
|
96652
|
-
fs7.readFile.invalidate(change.uri), fs7.stat.invalidate(change.uri), themeGraphManager.change(change.uri), ((
|
|
96652
|
+
fs7.readFile.invalidate(change.uri), fs7.stat.invalidate(change.uri), themeGraphManager.change(change.uri), ((_a50 = documentManager.get(change.uri)) === null || _a50 === void 0 ? void 0 : _a50.version) === void 0 && updates.push(documentManager.changeFromDisk(change.uri));
|
|
96653
96653
|
break;
|
|
96654
96654
|
case vscode_languageserver_1.FileChangeType.Deleted:
|
|
96655
96655
|
fs7.readDirectory.invalidate(theme_check_common_1.path.dirname(change.uri)), fs7.readFile.invalidate(change.uri), fs7.stat.invalidate(change.uri), themeGraphManager.delete(change.uri), documentManager.delete(change.uri);
|
|
@@ -106628,8 +106628,8 @@ var require_lib10 = __commonJS({
|
|
|
106628
106628
|
}
|
|
106629
106629
|
};
|
|
106630
106630
|
return node.kind === "OperationDefinition" ? node.selectionSet.selections.forEach((selection) => {
|
|
106631
|
-
var
|
|
106632
|
-
selection.kind === "Field" && ((
|
|
106631
|
+
var _a50;
|
|
106632
|
+
selection.kind === "Field" && ((_a50 = selection.selectionSet) == null || _a50.selections.forEach(handleSelectionNode));
|
|
106633
106633
|
}) : node.selectionSet.selections.forEach(handleSelectionNode), references;
|
|
106634
106634
|
}, generateContentsFromGraphqlString = (graphqlString, mapDocumentNode) => {
|
|
106635
106635
|
let graphqlDocument = graphql_tag.default(graphqlString), documentNodeAsString = generateDocumentNodeString(graphqlDocument, mapDocumentNode), allFragments = collectAllFragmentDefinitions(graphqlDocument), lines = graphqlDocument.definitions.reduce((accumulator, definition) => {
|
|
@@ -110309,26 +110309,26 @@ var require_utils13 = __commonJS({
|
|
|
110309
110309
|
}
|
|
110310
110310
|
exports.generateName = generateName;
|
|
110311
110311
|
function error(...messages) {
|
|
110312
|
-
var
|
|
110312
|
+
var _a50;
|
|
110313
110313
|
if (!process.env.VERBOSE)
|
|
110314
110314
|
return console.error(messages);
|
|
110315
|
-
console.error((
|
|
110315
|
+
console.error((_a50 = getStyledTextForLogging("red")) === null || _a50 === void 0 ? void 0 : _a50("error"), ...messages);
|
|
110316
110316
|
}
|
|
110317
110317
|
exports.error = error;
|
|
110318
110318
|
function log(style, title, ...messages) {
|
|
110319
|
-
var
|
|
110319
|
+
var _a50, _b;
|
|
110320
110320
|
if (!process.env.VERBOSE)
|
|
110321
110321
|
return;
|
|
110322
110322
|
let lastMessage = null;
|
|
110323
|
-
messages.length > 1 && typeof messages[messages.length - 1] != "string" && (lastMessage = messages.splice(messages.length - 1, 1)), console.info((
|
|
110323
|
+
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 });
|
|
110324
110324
|
}
|
|
110325
110325
|
exports.log = log;
|
|
110326
110326
|
function getStyledTextForLogging(style) {
|
|
110327
|
-
var
|
|
110327
|
+
var _a50, _b, _c, _d, _e, _f2, _g;
|
|
110328
110328
|
if (process.env.VERBOSE)
|
|
110329
110329
|
switch (style) {
|
|
110330
110330
|
case "blue":
|
|
110331
|
-
return (
|
|
110331
|
+
return (_a50 = color()) === null || _a50 === void 0 ? void 0 : _a50.whiteBright.bgBlue;
|
|
110332
110332
|
case "cyan":
|
|
110333
110333
|
return (_b = color()) === null || _b === void 0 ? void 0 : _b.whiteBright.bgCyan;
|
|
110334
110334
|
case "green":
|
|
@@ -110735,7 +110735,7 @@ var require_applySchemaTyping = __commonJS({
|
|
|
110735
110735
|
exports.applySchemaTyping = void 0;
|
|
110736
110736
|
var JSONSchema_1 = require_JSONSchema(), typesOfSchema_1 = require_typesOfSchema();
|
|
110737
110737
|
function applySchemaTyping(schema) {
|
|
110738
|
-
var
|
|
110738
|
+
var _a50;
|
|
110739
110739
|
let types = (0, typesOfSchema_1.typesOfSchema)(schema);
|
|
110740
110740
|
if (Object.defineProperty(schema, JSONSchema_1.Types, {
|
|
110741
110741
|
enumerable: !1,
|
|
@@ -110750,7 +110750,7 @@ var require_applySchemaTyping = __commonJS({
|
|
|
110750
110750
|
description: schema.description,
|
|
110751
110751
|
name: schema.name,
|
|
110752
110752
|
title: schema.title,
|
|
110753
|
-
allOf: (
|
|
110753
|
+
allOf: (_a50 = schema.allOf) !== null && _a50 !== void 0 ? _a50 : [],
|
|
110754
110754
|
required: [],
|
|
110755
110755
|
additionalProperties: !1
|
|
110756
110756
|
};
|
|
@@ -110870,8 +110870,8 @@ var require_normalizer = __commonJS({
|
|
|
110870
110870
|
schema.const !== void 0 && (schema.enum = [schema.const], delete schema.const);
|
|
110871
110871
|
});
|
|
110872
110872
|
rules.set("Add tsEnumNames to enum types", (schema, _4, options) => {
|
|
110873
|
-
var
|
|
110874
|
-
isEnumTypeWithoutTsEnumNames(schema) && options.inferStringEnumKeysFromValues && (schema.tsEnumNames = (
|
|
110873
|
+
var _a50;
|
|
110874
|
+
isEnumTypeWithoutTsEnumNames(schema) && options.inferStringEnumKeysFromValues && (schema.tsEnumNames = (_a50 = schema.enum) === null || _a50 === void 0 ? void 0 : _a50.map(String));
|
|
110875
110875
|
});
|
|
110876
110876
|
rules.set("Pre-calculate schema types and intersections", (schema) => {
|
|
110877
110877
|
schema !== null && typeof schema == "object" && (0, applySchemaTyping_1.applySchemaTyping)(schema);
|
|
@@ -111161,8 +111161,8 @@ var require_parser2 = __commonJS({
|
|
|
111161
111161
|
}
|
|
111162
111162
|
}
|
|
111163
111163
|
function standaloneName(schema, keyNameFromDefinition, usedNames, options) {
|
|
111164
|
-
var
|
|
111165
|
-
let name = ((
|
|
111164
|
+
var _a50;
|
|
111165
|
+
let name = ((_a50 = options.customName) === null || _a50 === void 0 ? void 0 : _a50.call(options, schema, keyNameFromDefinition)) || schema.title || schema.$id || keyNameFromDefinition;
|
|
111166
111166
|
if (name)
|
|
111167
111167
|
return (0, utils_1.generateName)(name, usedNames);
|
|
111168
111168
|
}
|
|
@@ -113483,7 +113483,7 @@ var require_resolver = __commonJS({
|
|
|
113483
113483
|
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
113484
113484
|
exports.dereference = void 0;
|
|
113485
113485
|
var json_schema_ref_parser_1 = require_lib11(), utils_1 = require_utils13();
|
|
113486
|
-
function dereference(schema_1,
|
|
113486
|
+
function dereference(schema_1, _a50) {
|
|
113487
113487
|
return __awaiter(this, arguments, void 0, function* (schema, { cwd: cwd3, $refOptions }) {
|
|
113488
113488
|
(0, utils_1.log)("green", "dereferencer", "Dereferencing input schema:", cwd3, schema);
|
|
113489
113489
|
let parser = new json_schema_ref_parser_1.$RefParser(), dereferencedPaths = /* @__PURE__ */ new WeakMap(), dereferencedSchema = yield parser.dereference(cwd3, schema, Object.assign(Object.assign({}, $refOptions), { dereference: Object.assign(Object.assign({}, $refOptions.dereference), { onDereference($ref, schema2) {
|
|
@@ -209605,7 +209605,7 @@ var import_core27 = __toESM(require_lib5(), 1);
|
|
|
209605
209605
|
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.5_@graphql-codegen+cli@5.0.4_@parcel+watcher@2.5.1_@types+no_1dab9937c446c9bfba7229e66e4ca808/node_modules/@shopify/cli-hydrogen/dist/lib/mini-oxygen/index.js
|
|
209606
209606
|
init_cjs_shims();
|
|
209607
209607
|
async function startMiniOxygen(options) {
|
|
209608
|
-
let { startWorkerdServer } = await import("./workerd-
|
|
209608
|
+
let { startWorkerdServer } = await import("./workerd-EPURL4IC.js");
|
|
209609
209609
|
return startWorkerdServer(options);
|
|
209610
209610
|
}
|
|
209611
209611
|
|
|
@@ -221941,11 +221941,6 @@ var ListBulkOperations = {
|
|
|
221941
221941
|
kind: "VariableDefinition",
|
|
221942
221942
|
variable: { kind: "Variable", name: { kind: "Name", value: "sortKey" } },
|
|
221943
221943
|
type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "BulkOperationsSortKeys" } } }
|
|
221944
|
-
},
|
|
221945
|
-
{
|
|
221946
|
-
kind: "VariableDefinition",
|
|
221947
|
-
variable: { kind: "Variable", name: { kind: "Name", value: "reverse" } },
|
|
221948
|
-
type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }
|
|
221949
221944
|
}
|
|
221950
221945
|
],
|
|
221951
221946
|
selectionSet: {
|
|
@@ -221969,11 +221964,6 @@ var ListBulkOperations = {
|
|
|
221969
221964
|
kind: "Argument",
|
|
221970
221965
|
name: { kind: "Name", value: "sortKey" },
|
|
221971
221966
|
value: { kind: "Variable", name: { kind: "Name", value: "sortKey" } }
|
|
221972
|
-
},
|
|
221973
|
-
{
|
|
221974
|
-
kind: "Argument",
|
|
221975
|
-
name: { kind: "Name", value: "reverse" },
|
|
221976
|
-
value: { kind: "Variable", name: { kind: "Name", value: "reverse" } }
|
|
221977
221967
|
}
|
|
221978
221968
|
],
|
|
221979
221969
|
selectionSet: {
|
|
@@ -222064,8 +222054,7 @@ async function listBulkOperations(options) {
|
|
|
222064
222054
|
variables: {
|
|
222065
222055
|
query: `created_at:>=${sevenDaysAgo}`,
|
|
222066
222056
|
first: 100,
|
|
222067
|
-
sortKey: "CREATED_AT"
|
|
222068
|
-
reverse: !0
|
|
222057
|
+
sortKey: "CREATED_AT"
|
|
222069
222058
|
},
|
|
222070
222059
|
version: await resolveApiVersion({
|
|
222071
222060
|
adminSession,
|
|
@@ -222279,7 +222268,7 @@ async function cancelBulkOperation(options) {
|
|
|
222279
222268
|
version: API_VERSION
|
|
222280
222269
|
});
|
|
222281
222270
|
if (response.bulkOperationCancel?.userErrors?.length) {
|
|
222282
|
-
renderBulkOperationUserErrors(response.bulkOperationCancel.userErrors, "
|
|
222271
|
+
renderBulkOperationUserErrors(response.bulkOperationCancel.userErrors, "Failed to cancel bulk operation.");
|
|
222283
222272
|
return;
|
|
222284
222273
|
}
|
|
222285
222274
|
let operation = response.bulkOperationCancel?.bulkOperation;
|
|
@@ -222323,7 +222312,6 @@ var _a19, BulkCancel = class extends AppLinkedCommand {
|
|
|
222323
222312
|
_a19 = BulkCancel;
|
|
222324
222313
|
BulkCancel.summary = "Cancel a bulk operation.";
|
|
222325
222314
|
BulkCancel.description = "Cancels a running bulk operation by ID.";
|
|
222326
|
-
BulkCancel.hidden = !0;
|
|
222327
222315
|
BulkCancel.flags = {
|
|
222328
222316
|
...globalFlags,
|
|
222329
222317
|
...appFlags,
|
|
@@ -222361,13 +222349,17 @@ var _a20, BulkStatus = class extends AppLinkedCommand {
|
|
|
222361
222349
|
};
|
|
222362
222350
|
_a20 = BulkStatus;
|
|
222363
222351
|
BulkStatus.summary = "Check the status of bulk operations.";
|
|
222364
|
-
BulkStatus.
|
|
222365
|
-
|
|
222352
|
+
BulkStatus.descriptionWithMarkdown = `Check the status of a specific bulk operation by ID, or list all bulk operations belonging to this app on this store in the last 7 days.
|
|
222353
|
+
|
|
222354
|
+
Bulk operations allow you to process large amounts of data asynchronously. Learn more about [bulk query operations](https://shopify.dev/docs/api/usage/bulk-operations/queries) and [bulk mutation operations](https://shopify.dev/docs/api/usage/bulk-operations/imports).
|
|
222355
|
+
|
|
222356
|
+
Use [\`bulk execute\`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) to start a new bulk operation.`;
|
|
222357
|
+
BulkStatus.description = _a20.descriptionWithoutMarkdown();
|
|
222366
222358
|
BulkStatus.flags = {
|
|
222367
222359
|
...globalFlags,
|
|
222368
222360
|
...appFlags,
|
|
222369
222361
|
id: import_core33.Flags.string({
|
|
222370
|
-
description: "The bulk operation ID (numeric ID or full GID). If not provided, lists all bulk operations in the last 7 days.",
|
|
222362
|
+
description: "The bulk operation ID (numeric ID or full GID). If not provided, lists all bulk operations belonging to this app on this store in the last 7 days.",
|
|
222371
222363
|
env: "SHOPIFY_FLAG_ID"
|
|
222372
222364
|
}),
|
|
222373
222365
|
store: import_core33.Flags.string({
|
|
@@ -222573,8 +222565,8 @@ var import_ignore2 = __toESM(require_ignore(), 1), DEFAULT_DEBOUNCE_TIME_IN_MS =
|
|
|
222573
222565
|
}
|
|
222574
222566
|
updateApp(app) {
|
|
222575
222567
|
this.app = app, this.extensionPaths = this.app.nonConfigExtensions.map((ext) => normalizePath(ext.directory)).filter((dir) => dir !== this.app.directory), this.extensionPaths.forEach((path3) => {
|
|
222576
|
-
var
|
|
222577
|
-
(
|
|
222568
|
+
var _a50;
|
|
222569
|
+
(_a50 = this.ignored)[path3] ?? (_a50[path3] = this.createIgnoreInstance(path3));
|
|
222578
222570
|
});
|
|
222579
222571
|
}
|
|
222580
222572
|
addAbortListener() {
|
|
@@ -229509,10 +229501,17 @@ async function parseVariablesToJsonl(variables, variableFile) {
|
|
|
229509
229501
|
return;
|
|
229510
229502
|
}
|
|
229511
229503
|
async function executeBulkOperation(input) {
|
|
229512
|
-
let { organization, remoteApp, store, query, variables, variableFile, outputFile, watch = !1, version: userSpecifiedVersion } = input, adminSession
|
|
229513
|
-
|
|
229514
|
-
|
|
229515
|
-
|
|
229504
|
+
let { organization, remoteApp, store, query, variables, variableFile, outputFile, watch = !1, version: userSpecifiedVersion } = input, { adminSession, version } = await renderSingleTask({
|
|
229505
|
+
title: outputContent`Authenticating`,
|
|
229506
|
+
task: async () => {
|
|
229507
|
+
let adminSession2 = await createAdminSessionAsApp(remoteApp, store.shopDomain), version2 = await resolveApiVersion({
|
|
229508
|
+
adminSession: adminSession2,
|
|
229509
|
+
userSpecifiedVersion,
|
|
229510
|
+
minimumDefaultVersion: BULK_OPERATIONS_MIN_API_VERSION
|
|
229511
|
+
});
|
|
229512
|
+
return { adminSession: adminSession2, version: version2 };
|
|
229513
|
+
},
|
|
229514
|
+
renderOptions: { stdout: process.stderr }
|
|
229516
229515
|
}), variablesJsonl = await parseVariablesToJsonl(variables, variableFile);
|
|
229517
229516
|
validateBulkOperationVariables(query, variablesJsonl), validateMutationStore(query, store), renderInfo({
|
|
229518
229517
|
headline: "Starting bulk operation.",
|
|
@@ -229625,9 +229624,9 @@ function statusCommandHelpMessage(operationId) {
|
|
|
229625
229624
|
}
|
|
229626
229625
|
|
|
229627
229626
|
// ../app/dist/cli/commands/app/bulk/execute.js
|
|
229628
|
-
var BulkExecute = class
|
|
229627
|
+
var _a30, BulkExecute = class extends AppLinkedCommand {
|
|
229629
229628
|
async run() {
|
|
229630
|
-
let { flags } = await this.parse(
|
|
229629
|
+
let { flags } = await this.parse(_a30), { query, appContextResult, store } = await prepareExecuteContext(flags);
|
|
229631
229630
|
return await executeBulkOperation({
|
|
229632
229631
|
organization: appContextResult.organization,
|
|
229633
229632
|
remoteApp: appContextResult.remoteApp,
|
|
@@ -229641,9 +229640,14 @@ var BulkExecute = class _BulkExecute extends AppLinkedCommand {
|
|
|
229641
229640
|
}), { app: appContextResult.app };
|
|
229642
229641
|
}
|
|
229643
229642
|
};
|
|
229643
|
+
_a30 = BulkExecute;
|
|
229644
229644
|
BulkExecute.summary = "Execute bulk operations.";
|
|
229645
|
-
BulkExecute.
|
|
229646
|
-
|
|
229645
|
+
BulkExecute.descriptionWithMarkdown = `Executes an Admin API GraphQL query or mutation on the specified store, as a bulk operation. Mutations are only allowed on dev stores.
|
|
229646
|
+
|
|
229647
|
+
Bulk operations allow you to process large amounts of data asynchronously. Learn more about [bulk query operations](https://shopify.dev/docs/api/usage/bulk-operations/queries) and [bulk mutation operations](https://shopify.dev/docs/api/usage/bulk-operations/imports).
|
|
229648
|
+
|
|
229649
|
+
Use [\`bulk status\`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-status) to check the status of your bulk operations.`;
|
|
229650
|
+
BulkExecute.description = _a30.descriptionWithoutMarkdown();
|
|
229647
229651
|
BulkExecute.flags = {
|
|
229648
229652
|
...globalFlags,
|
|
229649
229653
|
...appFlags,
|
|
@@ -229678,18 +229682,14 @@ async function parseVariables(variables, variableFile) {
|
|
|
229678
229682
|
}
|
|
229679
229683
|
}
|
|
229680
229684
|
async function executeOperation(input) {
|
|
229681
|
-
let {
|
|
229682
|
-
|
|
229683
|
-
|
|
229684
|
-
|
|
229685
|
-
{
|
|
229686
|
-
|
|
229687
|
-
|
|
229688
|
-
|
|
229689
|
-
}
|
|
229690
|
-
]
|
|
229691
|
-
});
|
|
229692
|
-
let parsedVariables = await parseVariables(variables, variableFile);
|
|
229685
|
+
let { remoteApp, store, query, variables, variableFile, version: userSpecifiedVersion, outputFile } = input, { adminSession, version } = await renderSingleTask({
|
|
229686
|
+
title: outputContent`Authenticating`,
|
|
229687
|
+
task: async () => {
|
|
229688
|
+
let adminSession2 = await createAdminSessionAsApp(remoteApp, store.shopDomain), version2 = await resolveApiVersion({ adminSession: adminSession2, userSpecifiedVersion });
|
|
229689
|
+
return { adminSession: adminSession2, version: version2 };
|
|
229690
|
+
},
|
|
229691
|
+
renderOptions: { stdout: process.stderr }
|
|
229692
|
+
}), parsedVariables = await parseVariables(variables, variableFile);
|
|
229693
229693
|
validateSingleOperation(query), validateMutationStore(query, store);
|
|
229694
229694
|
try {
|
|
229695
229695
|
let result = await renderSingleTask({
|
|
@@ -229725,9 +229725,9 @@ async function executeOperation(input) {
|
|
|
229725
229725
|
}
|
|
229726
229726
|
|
|
229727
229727
|
// ../app/dist/cli/commands/app/execute.js
|
|
229728
|
-
var Execute = class
|
|
229728
|
+
var _a31, Execute = class extends AppLinkedCommand {
|
|
229729
229729
|
async run() {
|
|
229730
|
-
let { flags } = await this.parse(
|
|
229730
|
+
let { flags } = await this.parse(_a31), { query, appContextResult, store } = await prepareExecuteContext(flags);
|
|
229731
229731
|
return await executeOperation({
|
|
229732
229732
|
organization: appContextResult.organization,
|
|
229733
229733
|
remoteApp: appContextResult.remoteApp,
|
|
@@ -229740,9 +229740,10 @@ var Execute = class _Execute extends AppLinkedCommand {
|
|
|
229740
229740
|
}), { app: appContextResult.app };
|
|
229741
229741
|
}
|
|
229742
229742
|
};
|
|
229743
|
+
_a31 = Execute;
|
|
229743
229744
|
Execute.summary = "Execute GraphQL queries and mutations.";
|
|
229744
|
-
Execute.
|
|
229745
|
-
Execute.description =
|
|
229745
|
+
Execute.descriptionWithMarkdown = "Executes an Admin API GraphQL query or mutation on the specified store. Mutations are only allowed on dev stores.\n\n For operations that process large amounts of data, use [`bulk execute`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) instead.";
|
|
229746
|
+
Execute.description = _a31.descriptionWithoutMarkdown();
|
|
229746
229747
|
Execute.flags = {
|
|
229747
229748
|
...globalFlags,
|
|
229748
229749
|
...appFlags,
|
|
@@ -229846,9 +229847,9 @@ async function getOrGenerateSchemaPath(extension, appDirectory, clientId, forceR
|
|
|
229846
229847
|
}
|
|
229847
229848
|
|
|
229848
229849
|
// ../app/dist/cli/commands/app/function/build.js
|
|
229849
|
-
var
|
|
229850
|
+
var _a32, FunctionBuild = class extends AppUnlinkedCommand {
|
|
229850
229851
|
async run() {
|
|
229851
|
-
let { flags } = await this.parse(
|
|
229852
|
+
let { flags } = await this.parse(_a32), app = await localAppContext({
|
|
229852
229853
|
directory: flags.path,
|
|
229853
229854
|
userProvidedConfigName: flags.config
|
|
229854
229855
|
}), ourFunction = await chooseFunction(app, flags.path);
|
|
@@ -229861,10 +229862,10 @@ var _a30, FunctionBuild = class extends AppUnlinkedCommand {
|
|
|
229861
229862
|
}), renderSuccess({ headline: "Function built successfully." }), { app };
|
|
229862
229863
|
}
|
|
229863
229864
|
};
|
|
229864
|
-
|
|
229865
|
+
_a32 = FunctionBuild;
|
|
229865
229866
|
FunctionBuild.summary = "Compile a function to wasm.";
|
|
229866
229867
|
FunctionBuild.descriptionWithMarkdown = "Compiles the function in your current directory to WebAssembly (Wasm) for testing purposes.";
|
|
229867
|
-
FunctionBuild.description =
|
|
229868
|
+
FunctionBuild.description = _a32.descriptionWithoutMarkdown();
|
|
229868
229869
|
FunctionBuild.flags = {
|
|
229869
229870
|
...globalFlags,
|
|
229870
229871
|
...appFlags,
|
|
@@ -230236,9 +230237,9 @@ function getAllFunctionRunFileNames(functionRunsDir) {
|
|
|
230236
230237
|
}
|
|
230237
230238
|
|
|
230238
230239
|
// ../app/dist/cli/commands/app/function/replay.js
|
|
230239
|
-
var import_core40 = __toESM(require_lib(), 1),
|
|
230240
|
+
var import_core40 = __toESM(require_lib(), 1), _a33, FunctionReplay = class extends AppLinkedCommand {
|
|
230240
230241
|
async run() {
|
|
230241
|
-
let { flags } = await this.parse(
|
|
230242
|
+
let { flags } = await this.parse(_a33), { app } = await linkedAppContext({
|
|
230242
230243
|
directory: flags.path,
|
|
230243
230244
|
clientId: flags["client-id"],
|
|
230244
230245
|
forceRelink: flags.reset,
|
|
@@ -230254,10 +230255,10 @@ var import_core40 = __toESM(require_lib(), 1), _a31, FunctionReplay = class exte
|
|
|
230254
230255
|
}), { app };
|
|
230255
230256
|
}
|
|
230256
230257
|
};
|
|
230257
|
-
|
|
230258
|
+
_a33 = FunctionReplay;
|
|
230258
230259
|
FunctionReplay.summary = "Replays a function run from an app log.";
|
|
230259
230260
|
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).";
|
|
230260
|
-
FunctionReplay.description =
|
|
230261
|
+
FunctionReplay.description = _a33.descriptionWithoutMarkdown();
|
|
230261
230262
|
FunctionReplay.flags = {
|
|
230262
230263
|
...globalFlags,
|
|
230263
230264
|
...appFlags,
|
|
@@ -230282,9 +230283,9 @@ var replay_default = FunctionReplay;
|
|
|
230282
230283
|
// ../app/dist/cli/commands/app/function/run.js
|
|
230283
230284
|
init_cjs_shims();
|
|
230284
230285
|
var import_core41 = __toESM(require_lib(), 1);
|
|
230285
|
-
var
|
|
230286
|
+
var _a34, DEFAULT_FUNCTION_EXPORT = "_start", FunctionRun = class extends AppUnlinkedCommand {
|
|
230286
230287
|
async run() {
|
|
230287
|
-
let { flags } = await this.parse(
|
|
230288
|
+
let { flags } = await this.parse(_a34), functionExport = DEFAULT_FUNCTION_EXPORT, app = await localAppContext({
|
|
230288
230289
|
directory: flags.path,
|
|
230289
230290
|
userProvidedConfigName: flags.config
|
|
230290
230291
|
}), ourFunction = await chooseFunction(app, flags.path);
|
|
@@ -230317,10 +230318,10 @@ var _a32, DEFAULT_FUNCTION_EXPORT = "_start", FunctionRun = class extends AppUnl
|
|
|
230317
230318
|
}), { app };
|
|
230318
230319
|
}
|
|
230319
230320
|
};
|
|
230320
|
-
|
|
230321
|
+
_a34 = FunctionRun;
|
|
230321
230322
|
FunctionRun.summary = "Run a function locally for testing.";
|
|
230322
230323
|
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).";
|
|
230323
|
-
FunctionRun.description =
|
|
230324
|
+
FunctionRun.description = _a34.descriptionWithoutMarkdown();
|
|
230324
230325
|
FunctionRun.flags = {
|
|
230325
230326
|
...globalFlags,
|
|
230326
230327
|
...appFlags,
|
|
@@ -230343,9 +230344,9 @@ var run_default = FunctionRun;
|
|
|
230343
230344
|
// ../app/dist/cli/commands/app/function/schema.js
|
|
230344
230345
|
init_cjs_shims();
|
|
230345
230346
|
var import_core42 = __toESM(require_lib(), 1);
|
|
230346
|
-
var
|
|
230347
|
+
var _a35, FetchSchema = class extends AppLinkedCommand {
|
|
230347
230348
|
async run() {
|
|
230348
|
-
let { flags } = await this.parse(
|
|
230349
|
+
let { flags } = await this.parse(_a35), { app, developerPlatformClient, organization } = await linkedAppContext({
|
|
230349
230350
|
directory: flags.path,
|
|
230350
230351
|
clientId: flags["client-id"],
|
|
230351
230352
|
forceRelink: flags.reset,
|
|
@@ -230360,10 +230361,10 @@ var _a33, FetchSchema = class extends AppLinkedCommand {
|
|
|
230360
230361
|
}), { app };
|
|
230361
230362
|
}
|
|
230362
230363
|
};
|
|
230363
|
-
|
|
230364
|
+
_a35 = FetchSchema;
|
|
230364
230365
|
FetchSchema.summary = "Fetch the latest GraphQL schema for a function.";
|
|
230365
230366
|
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.";
|
|
230366
|
-
FetchSchema.description =
|
|
230367
|
+
FetchSchema.description = _a35.descriptionWithoutMarkdown();
|
|
230367
230368
|
FetchSchema.flags = {
|
|
230368
230369
|
...globalFlags,
|
|
230369
230370
|
...appFlags,
|
|
@@ -230379,19 +230380,19 @@ var schema_default = FetchSchema;
|
|
|
230379
230380
|
|
|
230380
230381
|
// ../app/dist/cli/commands/app/function/typegen.js
|
|
230381
230382
|
init_cjs_shims();
|
|
230382
|
-
var
|
|
230383
|
+
var _a36, FunctionTypegen = class extends AppUnlinkedCommand {
|
|
230383
230384
|
async run() {
|
|
230384
|
-
let { flags } = await this.parse(
|
|
230385
|
+
let { flags } = await this.parse(_a36), app = await localAppContext({
|
|
230385
230386
|
directory: flags.path,
|
|
230386
230387
|
userProvidedConfigName: flags.config
|
|
230387
230388
|
}), ourFunction = await chooseFunction(app, flags.path);
|
|
230388
230389
|
return await buildGraphqlTypes(ourFunction, { stdout: process.stdout, stderr: process.stderr, app }), renderSuccess({ headline: "GraphQL types generated successfully." }), { app };
|
|
230389
230390
|
}
|
|
230390
230391
|
};
|
|
230391
|
-
|
|
230392
|
+
_a36 = FunctionTypegen;
|
|
230392
230393
|
FunctionTypegen.summary = "Generate GraphQL types for a JavaScript function.";
|
|
230393
230394
|
FunctionTypegen.descriptionWithMarkdown = "Creates GraphQL types based on your [input query](https://shopify.dev/docs/apps/functions/input-output#input) for a function written in JavaScript.";
|
|
230394
|
-
FunctionTypegen.description =
|
|
230395
|
+
FunctionTypegen.description = _a36.descriptionWithoutMarkdown();
|
|
230395
230396
|
FunctionTypegen.flags = {
|
|
230396
230397
|
...globalFlags,
|
|
230397
230398
|
...appFlags,
|
|
@@ -230736,12 +230737,12 @@ var generate_default = generate;
|
|
|
230736
230737
|
|
|
230737
230738
|
// ../app/dist/cli/commands/app/generate/extension.js
|
|
230738
230739
|
var import_core43 = __toESM(require_lib(), 1);
|
|
230739
|
-
var
|
|
230740
|
+
var _a37, AppGenerateExtension = class extends AppLinkedCommand {
|
|
230740
230741
|
static analyticsNameOverride() {
|
|
230741
230742
|
return "app scaffold extension";
|
|
230742
230743
|
}
|
|
230743
230744
|
async run() {
|
|
230744
|
-
let { flags } = await this.parse(
|
|
230745
|
+
let { flags } = await this.parse(_a37);
|
|
230745
230746
|
await metadata_default.addPublicMetadata(() => ({
|
|
230746
230747
|
cmd_scaffold_required_auth: !0,
|
|
230747
230748
|
cmd_scaffold_template_custom: flags["clone-url"] !== void 0,
|
|
@@ -230770,13 +230771,13 @@ var _a35, AppGenerateExtension = class extends AppLinkedCommand {
|
|
|
230770
230771
|
}), { app };
|
|
230771
230772
|
}
|
|
230772
230773
|
};
|
|
230773
|
-
|
|
230774
|
+
_a37 = AppGenerateExtension;
|
|
230774
230775
|
AppGenerateExtension.summary = "Generate a new app Extension.";
|
|
230775
230776
|
AppGenerateExtension.descriptionWithMarkdown = `Generates a new [app extension](https://shopify.dev/docs/apps/app-extensions). For a list of app extensions that you can generate using this command, refer to [Supported extensions](https://shopify.dev/docs/apps/structure/app-extensions/list).
|
|
230776
230777
|
|
|
230777
230778
|
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/tools/cli/structure) and the documentation for your extension.
|
|
230778
230779
|
`;
|
|
230779
|
-
AppGenerateExtension.description =
|
|
230780
|
+
AppGenerateExtension.description = _a37.descriptionWithoutMarkdown();
|
|
230780
230781
|
AppGenerateExtension.flags = {
|
|
230781
230782
|
...globalFlags,
|
|
230782
230783
|
...appFlags,
|
|
@@ -230815,12 +230816,12 @@ var extension_default2 = AppGenerateExtension;
|
|
|
230815
230816
|
|
|
230816
230817
|
// ../app/dist/cli/commands/app/generate/schema.js
|
|
230817
230818
|
init_cjs_shims();
|
|
230818
|
-
var
|
|
230819
|
+
var _a38, GenerateSchema = class extends schema_default {
|
|
230819
230820
|
};
|
|
230820
|
-
|
|
230821
|
+
_a38 = GenerateSchema;
|
|
230821
230822
|
GenerateSchema.hidden = !0;
|
|
230822
230823
|
GenerateSchema.descriptionWithMarkdown = "[DEPRECATED, use `app function schema`] 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.";
|
|
230823
|
-
GenerateSchema.description =
|
|
230824
|
+
GenerateSchema.description = _a38.descriptionWithoutMarkdown();
|
|
230824
230825
|
var schema_default2 = GenerateSchema;
|
|
230825
230826
|
|
|
230826
230827
|
// ../app/dist/cli/commands/app/import-extensions.js
|
|
@@ -231036,9 +231037,9 @@ Directory components`.toUpperCase(),
|
|
|
231036
231037
|
|
|
231037
231038
|
// ../app/dist/cli/commands/app/info.js
|
|
231038
231039
|
var import_core45 = __toESM(require_lib(), 1);
|
|
231039
|
-
var
|
|
231040
|
+
var _a39, AppInfo2 = class extends AppLinkedCommand {
|
|
231040
231041
|
async run() {
|
|
231041
|
-
let { flags } = await this.parse(
|
|
231042
|
+
let { flags } = await this.parse(_a39), { app, remoteApp, organization, developerPlatformClient } = await linkedAppContext({
|
|
231042
231043
|
directory: flags.path,
|
|
231043
231044
|
clientId: flags["client-id"],
|
|
231044
231045
|
forceRelink: flags.reset,
|
|
@@ -231053,7 +231054,7 @@ var _a37, AppInfo2 = class extends AppLinkedCommand {
|
|
|
231053
231054
|
return typeof results == "string" || "value" in results ? outputResult(results) : renderInfo({ customSections: results }), app.errors && process.exit(2), { app };
|
|
231054
231055
|
}
|
|
231055
231056
|
};
|
|
231056
|
-
|
|
231057
|
+
_a39 = AppInfo2;
|
|
231057
231058
|
AppInfo2.summary = "Print basic information about your app and extensions.";
|
|
231058
231059
|
AppInfo2.descriptionWithMarkdown = `The information returned includes the following:
|
|
231059
231060
|
|
|
@@ -231061,7 +231062,7 @@ AppInfo2.descriptionWithMarkdown = `The information returned includes the follow
|
|
|
231061
231062
|
- The [structure](https://shopify.dev/docs/apps/tools/cli/structure) of your app project.
|
|
231062
231063
|
- The [access scopes](https://shopify.dev/docs/api/usage) your app has requested.
|
|
231063
231064
|
- System information, including the package manager and version of Shopify CLI used in the project.`;
|
|
231064
|
-
AppInfo2.description =
|
|
231065
|
+
AppInfo2.description = _a39.descriptionWithoutMarkdown();
|
|
231065
231066
|
AppInfo2.flags = {
|
|
231066
231067
|
...globalFlags,
|
|
231067
231068
|
...appFlags,
|
|
@@ -231388,9 +231389,9 @@ function validateFlavorValue(template, flavor) {
|
|
|
231388
231389
|
|
|
231389
231390
|
// ../app/dist/cli/commands/app/init.js
|
|
231390
231391
|
var import_core46 = __toESM(require_lib(), 1);
|
|
231391
|
-
var
|
|
231392
|
+
var _a40, Init3 = class extends AppLinkedCommand {
|
|
231392
231393
|
async run() {
|
|
231393
|
-
let { flags } = await this.parse(
|
|
231394
|
+
let { flags } = await this.parse(_a40);
|
|
231394
231395
|
validateTemplateValue(flags.template), validateFlavorValue(flags.template, flags.flavor);
|
|
231395
231396
|
let inferredPackageManager = inferPackageManager(flags["package-manager"]), name = flags.name ?? await getAppName(flags.path), developerPlatformClient = selectDeveloperPlatformClient();
|
|
231396
231397
|
await developerPlatformClient.session();
|
|
@@ -231427,7 +231428,7 @@ var _a38, Init3 = class extends AppLinkedCommand {
|
|
|
231427
231428
|
return { app };
|
|
231428
231429
|
}
|
|
231429
231430
|
};
|
|
231430
|
-
|
|
231431
|
+
_a40 = Init3;
|
|
231431
231432
|
Init3.summary = "Create a new app project";
|
|
231432
231433
|
Init3.flags = {
|
|
231433
231434
|
...globalFlags,
|
|
@@ -231554,9 +231555,9 @@ ${versionDetails.message}` : ""
|
|
|
231554
231555
|
|
|
231555
231556
|
// ../app/dist/cli/commands/app/release.js
|
|
231556
231557
|
var import_core47 = __toESM(require_lib(), 1);
|
|
231557
|
-
var
|
|
231558
|
+
var _a41, Release = class extends AppLinkedCommand {
|
|
231558
231559
|
async run() {
|
|
231559
|
-
let { flags } = await this.parse(
|
|
231560
|
+
let { flags } = await this.parse(_a41), clientId = flags["client-id"];
|
|
231560
231561
|
await addPublicMetadata(() => ({
|
|
231561
231562
|
cmd_app_reset_used: flags.reset
|
|
231562
231563
|
}));
|
|
@@ -231579,11 +231580,11 @@ var _a39, Release = class extends AppLinkedCommand {
|
|
|
231579
231580
|
}), { app };
|
|
231580
231581
|
}
|
|
231581
231582
|
};
|
|
231582
|
-
|
|
231583
|
+
_a41 = Release;
|
|
231583
231584
|
Release.summary = "Release an app version.";
|
|
231584
231585
|
Release.usage = "app release --version <version>";
|
|
231585
231586
|
Release.descriptionWithMarkdown = "Releases an existing app version. Pass the name of the version that you want to release using the `--version` flag.";
|
|
231586
|
-
Release.description =
|
|
231587
|
+
Release.description = _a41.descriptionWithoutMarkdown();
|
|
231587
231588
|
Release.flags = {
|
|
231588
231589
|
...globalFlags,
|
|
231589
231590
|
...appFlags,
|
|
@@ -231677,9 +231678,9 @@ async function versionList(options) {
|
|
|
231677
231678
|
}
|
|
231678
231679
|
|
|
231679
231680
|
// ../app/dist/cli/commands/app/versions/list.js
|
|
231680
|
-
var
|
|
231681
|
+
var _a42, VersionsList = class extends AppLinkedCommand {
|
|
231681
231682
|
async run() {
|
|
231682
|
-
let { flags } = await this.parse(
|
|
231683
|
+
let { flags } = await this.parse(_a42), { app, remoteApp, developerPlatformClient, organization } = await linkedAppContext({
|
|
231683
231684
|
directory: flags.path,
|
|
231684
231685
|
clientId: flags["client-id"],
|
|
231685
231686
|
forceRelink: flags.reset,
|
|
@@ -231694,10 +231695,10 @@ var _a40, VersionsList = class extends AppLinkedCommand {
|
|
|
231694
231695
|
}), { app };
|
|
231695
231696
|
}
|
|
231696
231697
|
};
|
|
231697
|
-
|
|
231698
|
+
_a42 = VersionsList;
|
|
231698
231699
|
VersionsList.summary = "List deployed versions of your app.";
|
|
231699
231700
|
VersionsList.descriptionWithMarkdown = "Lists the deployed app versions. An app version is a snapshot of your app extensions.";
|
|
231700
|
-
VersionsList.description =
|
|
231701
|
+
VersionsList.description = _a42.descriptionWithoutMarkdown();
|
|
231701
231702
|
VersionsList.flags = {
|
|
231702
231703
|
...globalFlags,
|
|
231703
231704
|
...appFlags,
|
|
@@ -231841,9 +231842,9 @@ function formatErrors(errors) {
|
|
|
231841
231842
|
|
|
231842
231843
|
// ../app/dist/cli/commands/app/webhook/trigger.js
|
|
231843
231844
|
var import_core48 = __toESM(require_lib(), 1);
|
|
231844
|
-
var
|
|
231845
|
+
var _a43, WebhookTrigger = class extends AppLinkedCommand {
|
|
231845
231846
|
async run() {
|
|
231846
|
-
let { flags } = await this.parse(
|
|
231847
|
+
let { flags } = await this.parse(_a43);
|
|
231847
231848
|
flags["shared-secret"] && renderWarning({
|
|
231848
231849
|
headline: [
|
|
231849
231850
|
"The flag shared-secret has been deprecated in favor of client-secret and will eventually be deleted."
|
|
@@ -231870,7 +231871,7 @@ var _a41, WebhookTrigger = class extends AppLinkedCommand {
|
|
|
231870
231871
|
return await webhookTriggerService(usedFlags), { app: appContextResult.app };
|
|
231871
231872
|
}
|
|
231872
231873
|
};
|
|
231873
|
-
|
|
231874
|
+
_a43 = WebhookTrigger;
|
|
231874
231875
|
WebhookTrigger.summary = "Trigger delivery of a sample webhook topic payload to a designated address.";
|
|
231875
231876
|
WebhookTrigger.descriptionWithMarkdown = `
|
|
231876
231877
|
Triggers the delivery of a sample Admin API event topic payload to a designated address.
|
|
@@ -231888,7 +231889,7 @@ WebhookTrigger.descriptionWithMarkdown = `
|
|
|
231888
231889
|
- Trigger requests are rate-limited using the [Partner API rate limit](https://shopify.dev/docs/api/partner#rate_limits).
|
|
231889
231890
|
- You can't use this method to validate your API webhook subscriptions.
|
|
231890
231891
|
`;
|
|
231891
|
-
WebhookTrigger.description =
|
|
231892
|
+
WebhookTrigger.description = _a43.descriptionWithoutMarkdown();
|
|
231892
231893
|
WebhookTrigger.flags = {
|
|
231893
231894
|
...appFlags,
|
|
231894
231895
|
help: import_core48.Flags.help({
|
|
@@ -232000,9 +232001,9 @@ async function devClean(options) {
|
|
|
232000
232001
|
|
|
232001
232002
|
// ../app/dist/cli/commands/app/dev/clean.js
|
|
232002
232003
|
var import_core49 = __toESM(require_lib(), 1);
|
|
232003
|
-
var
|
|
232004
|
+
var _a44, DevClean = class extends AppLinkedCommand {
|
|
232004
232005
|
async run() {
|
|
232005
|
-
let { flags } = await this.parse(
|
|
232006
|
+
let { flags } = await this.parse(_a44), appContextResult = await linkedAppContext({
|
|
232006
232007
|
directory: flags.path,
|
|
232007
232008
|
clientId: flags["client-id"],
|
|
232008
232009
|
forceRelink: flags.reset,
|
|
@@ -232015,13 +232016,13 @@ var _a42, DevClean = class extends AppLinkedCommand {
|
|
|
232015
232016
|
return await devClean({ appContextResult, store }), { app: appContextResult.app };
|
|
232016
232017
|
}
|
|
232017
232018
|
};
|
|
232018
|
-
|
|
232019
|
+
_a44 = DevClean;
|
|
232019
232020
|
DevClean.summary = "Cleans up the dev preview from the selected store.";
|
|
232020
232021
|
DevClean.descriptionWithMarkdown = `Stop the dev preview that was started with \`shopify app dev\`.
|
|
232021
232022
|
|
|
232022
232023
|
It restores the app's active version to the selected development store.
|
|
232023
232024
|
`;
|
|
232024
|
-
DevClean.description =
|
|
232025
|
+
DevClean.description = _a44.descriptionWithoutMarkdown();
|
|
232025
232026
|
DevClean.flags = {
|
|
232026
232027
|
...globalFlags,
|
|
232027
232028
|
...appFlags,
|
|
@@ -232124,9 +232125,9 @@ function functionInfo(ourFunction, options) {
|
|
|
232124
232125
|
}
|
|
232125
232126
|
|
|
232126
232127
|
// ../app/dist/cli/commands/app/function/info.js
|
|
232127
|
-
var
|
|
232128
|
+
var _a45, FunctionInfo = class extends AppUnlinkedCommand {
|
|
232128
232129
|
async run() {
|
|
232129
|
-
let { flags } = await this.parse(
|
|
232130
|
+
let { flags } = await this.parse(_a45), app = await localAppContext({
|
|
232130
232131
|
directory: flags.path,
|
|
232131
232132
|
userProvidedConfigName: flags.config
|
|
232132
232133
|
}), ourFunction = await chooseFunction(app, flags.path), functionRunner = functionRunnerBinary();
|
|
@@ -232141,7 +232142,7 @@ var _a43, FunctionInfo = class extends AppUnlinkedCommand {
|
|
|
232141
232142
|
}), { app };
|
|
232142
232143
|
}
|
|
232143
232144
|
};
|
|
232144
|
-
|
|
232145
|
+
_a45 = FunctionInfo;
|
|
232145
232146
|
FunctionInfo.summary = "Print basic information about your function.";
|
|
232146
232147
|
FunctionInfo.descriptionWithMarkdown = `The information returned includes the following:
|
|
232147
232148
|
|
|
@@ -232152,7 +232153,7 @@ FunctionInfo.descriptionWithMarkdown = `The information returned includes the fo
|
|
|
232152
232153
|
- The schema path
|
|
232153
232154
|
- The WASM path
|
|
232154
232155
|
- The function runner path`;
|
|
232155
|
-
FunctionInfo.description =
|
|
232156
|
+
FunctionInfo.description = _a45.descriptionWithoutMarkdown();
|
|
232156
232157
|
FunctionInfo.flags = {
|
|
232157
232158
|
...globalFlags,
|
|
232158
232159
|
...appFlags,
|
|
@@ -232919,12 +232920,12 @@ function cleanPatch(patch) {
|
|
|
232919
232920
|
|
|
232920
232921
|
// ../app/dist/cli/commands/app/import-custom-data-definitions.js
|
|
232921
232922
|
var import_core50 = __toESM(require_lib(), 1);
|
|
232922
|
-
var
|
|
232923
|
+
var _a46, ImportCustomDataDefinitions = class extends AppLinkedCommand {
|
|
232923
232924
|
async run() {
|
|
232924
232925
|
let { appContextResult, ...options } = await renderSingleTask({
|
|
232925
232926
|
title: outputContent`Loading application`,
|
|
232926
232927
|
task: async () => {
|
|
232927
|
-
let { flags } = await this.parse(
|
|
232928
|
+
let { flags } = await this.parse(_a46);
|
|
232928
232929
|
await checkFolderIsValidApp(flags.path);
|
|
232929
232930
|
let appContextResult2 = await linkedAppContext({
|
|
232930
232931
|
directory: flags.path,
|
|
@@ -232948,10 +232949,10 @@ var _a44, ImportCustomDataDefinitions = class extends AppLinkedCommand {
|
|
|
232948
232949
|
return await importDeclarativeDefinitions(options), { app: appContextResult.app };
|
|
232949
232950
|
}
|
|
232950
232951
|
};
|
|
232951
|
-
|
|
232952
|
+
_a46 = ImportCustomDataDefinitions;
|
|
232952
232953
|
ImportCustomDataDefinitions.summary = "Import metafield and metaobject definitions.";
|
|
232953
232954
|
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).";
|
|
232954
|
-
ImportCustomDataDefinitions.description =
|
|
232955
|
+
ImportCustomDataDefinitions.description = _a46.descriptionWithoutMarkdown();
|
|
232955
232956
|
ImportCustomDataDefinitions.flags = {
|
|
232956
232957
|
...globalFlags,
|
|
232957
232958
|
...appFlags,
|
|
@@ -237222,12 +237223,12 @@ var autocorrectStatus = {
|
|
|
237222
237223
|
};
|
|
237223
237224
|
|
|
237224
237225
|
// ../plugin-did-you-mean/dist/commands/config/autocorrect/off.js
|
|
237225
|
-
var
|
|
237226
|
+
var _a47, AutocorrectOff = class extends base_command_default {
|
|
237226
237227
|
async run() {
|
|
237227
237228
|
setAutocorrect(!1), renderInfo({ body: autocorrectStatus.off });
|
|
237228
237229
|
}
|
|
237229
237230
|
};
|
|
237230
|
-
|
|
237231
|
+
_a47 = AutocorrectOff;
|
|
237231
237232
|
AutocorrectOff.summary = "Disable autocorrect. Off by default.";
|
|
237232
237233
|
AutocorrectOff.descriptionWithMarkdown = `Disable autocorrect. Off by default.
|
|
237233
237234
|
|
|
@@ -237235,17 +237236,17 @@ AutocorrectOff.descriptionWithMarkdown = `Disable autocorrect. Off by default.
|
|
|
237235
237236
|
|
|
237236
237237
|
When autocorrection is disabled, you need to confirm that you want to run corrections for mistyped commands.
|
|
237237
237238
|
`;
|
|
237238
|
-
AutocorrectOff.description =
|
|
237239
|
+
AutocorrectOff.description = _a47.descriptionWithoutMarkdown();
|
|
237239
237240
|
var off_default = AutocorrectOff;
|
|
237240
237241
|
|
|
237241
237242
|
// ../plugin-did-you-mean/dist/commands/config/autocorrect/status.js
|
|
237242
237243
|
init_cjs_shims();
|
|
237243
|
-
var
|
|
237244
|
+
var _a48, AutocorrectStatus = class extends base_command_default {
|
|
237244
237245
|
async run() {
|
|
237245
237246
|
isAutocorrectEnabled() ? renderInfo({ body: autocorrectStatus.on }) : renderInfo({ body: autocorrectStatus.off });
|
|
237246
237247
|
}
|
|
237247
237248
|
};
|
|
237248
|
-
|
|
237249
|
+
_a48 = AutocorrectStatus;
|
|
237249
237250
|
AutocorrectStatus.summary = "Check whether autocorrect is enabled or disabled. On by default.";
|
|
237250
237251
|
AutocorrectStatus.descriptionWithMarkdown = `Check whether autocorrect is enabled or disabled. On by default.
|
|
237251
237252
|
|
|
@@ -237253,17 +237254,17 @@ AutocorrectStatus.descriptionWithMarkdown = `Check whether autocorrect is enable
|
|
|
237253
237254
|
|
|
237254
237255
|
When autocorrection is disabled, you need to confirm that you want to run corrections for mistyped commands.
|
|
237255
237256
|
`;
|
|
237256
|
-
AutocorrectStatus.description =
|
|
237257
|
+
AutocorrectStatus.description = _a48.descriptionWithoutMarkdown();
|
|
237257
237258
|
var status_default2 = AutocorrectStatus;
|
|
237258
237259
|
|
|
237259
237260
|
// ../plugin-did-you-mean/dist/commands/config/autocorrect/on.js
|
|
237260
237261
|
init_cjs_shims();
|
|
237261
|
-
var
|
|
237262
|
+
var _a49, AutocorrectOn = class extends base_command_default {
|
|
237262
237263
|
async run() {
|
|
237263
237264
|
setAutocorrect(!0), renderInfo({ body: autocorrectStatus.on });
|
|
237264
237265
|
}
|
|
237265
237266
|
};
|
|
237266
|
-
|
|
237267
|
+
_a49 = AutocorrectOn;
|
|
237267
237268
|
AutocorrectOn.summary = "Enable autocorrect. Off by default.";
|
|
237268
237269
|
AutocorrectOn.descriptionWithMarkdown = `Enable autocorrect. Off by default.
|
|
237269
237270
|
|
|
@@ -237271,7 +237272,7 @@ AutocorrectOn.descriptionWithMarkdown = `Enable autocorrect. Off by default.
|
|
|
237271
237272
|
|
|
237272
237273
|
When autocorrection is disabled, you need to confirm that you want to run corrections for mistyped commands.
|
|
237273
237274
|
`;
|
|
237274
|
-
AutocorrectOn.description =
|
|
237275
|
+
AutocorrectOn.description = _a49.descriptionWithoutMarkdown();
|
|
237275
237276
|
var on_default = AutocorrectOn;
|
|
237276
237277
|
|
|
237277
237278
|
// ../../node_modules/.pnpm/n-gram@2.0.2/node_modules/n-gram/index.js
|