@shopify/cli 3.89.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.
Files changed (78) hide show
  1. package/dist/{chunk-V2ZY6OP3.js → chunk-2TMOMDXO.js} +5 -5
  2. package/dist/{chunk-TPPRDIBF.js → chunk-3AF66HDC.js} +3 -3
  3. package/dist/{chunk-TLGBKEEX.js → chunk-3VKS4374.js} +5 -5
  4. package/dist/{chunk-EQO4QA4E.js → chunk-4BBQTKIZ.js} +8 -4
  5. package/dist/{chunk-ZM543XCR.js → chunk-4TOZOCIV.js} +3 -3
  6. package/dist/{chunk-GSUL4KBP.js → chunk-5SJCPOBW.js} +8 -3
  7. package/dist/{chunk-CUCT627W.js → chunk-6MYWZ7MP.js} +7 -7
  8. package/dist/{chunk-GT7PA6E6.js → chunk-6ONJ77I7.js} +2 -2
  9. package/dist/{chunk-EAEHP4CZ.js → chunk-7FIBLDM2.js} +3 -3
  10. package/dist/{chunk-P3SM4EEQ.js → chunk-C5STUYKR.js} +3 -3
  11. package/dist/{chunk-YETFHMCK.js → chunk-CYPBBNM2.js} +6 -6
  12. package/dist/{chunk-2QVJ6J2X.js → chunk-DOZD5WAI.js} +5 -5
  13. package/dist/{chunk-WSX6K4TT.js → chunk-H3SSAPRP.js} +3 -3
  14. package/dist/{chunk-Y3HY6QD7.js → chunk-HV4MPORZ.js} +5 -5
  15. package/dist/{chunk-Y2BHJWKT.js → chunk-IEPPQIPW.js} +2 -2
  16. package/dist/{chunk-36WMFQ3S.js → chunk-IYNLJNFT.js} +3 -3
  17. package/dist/{chunk-6YASM3HI.js → chunk-J2CFMYG5.js} +4 -4
  18. package/dist/{chunk-EYUOBXKH.js → chunk-JRFL7VGC.js} +3 -3
  19. package/dist/{chunk-2CNWYFWQ.js → chunk-KC6KOCJ5.js} +5 -5
  20. package/dist/{chunk-6KFJWCTP.js → chunk-OTD3FRPC.js} +2 -2
  21. package/dist/{chunk-TWYT4DFD.js → chunk-OZPZBNSB.js} +2 -2
  22. package/dist/{chunk-2OJBOBH2.js → chunk-PAU7LKSJ.js} +3 -3
  23. package/dist/{chunk-XLMH6DBR.js → chunk-PUMWL67K.js} +3 -3
  24. package/dist/{chunk-LJHVLE3R.js → chunk-RHYTM4FE.js} +2 -2
  25. package/dist/{chunk-NJR5IH3H.js → chunk-SG2A4CTL.js} +3 -3
  26. package/dist/{chunk-JYBBGVIM.js → chunk-SGU7BPE4.js} +3 -3
  27. package/dist/{chunk-PYPPUTUV.js → chunk-TGDLXF4K.js} +2 -2
  28. package/dist/{chunk-R7OKLQB6.js → chunk-TIYR37XP.js} +4 -4
  29. package/dist/{chunk-B5Q2Q4B3.js → chunk-UHBL2XEG.js} +2 -2
  30. package/dist/{chunk-WF5BWNFE.js → chunk-W65CJE3X.js} +6 -6
  31. package/dist/{chunk-TRR5QJRW.js → chunk-WYVKPOTO.js} +4 -4
  32. package/dist/{chunk-5PAHFSKT.js → chunk-X7CGUWBF.js} +3 -3
  33. package/dist/{chunk-GFYDB5LD.js → chunk-ZZNQWJUM.js} +3 -3
  34. package/dist/cli/commands/auth/login.js +8 -8
  35. package/dist/cli/commands/auth/login.test.js +9 -9
  36. package/dist/cli/commands/auth/logout.js +8 -8
  37. package/dist/cli/commands/auth/logout.test.js +9 -9
  38. package/dist/cli/commands/cache/clear.js +8 -8
  39. package/dist/cli/commands/debug/command-flags.js +8 -8
  40. package/dist/cli/commands/docs/generate.js +8 -8
  41. package/dist/cli/commands/docs/generate.test.js +8 -8
  42. package/dist/cli/commands/help.js +8 -8
  43. package/dist/cli/commands/kitchen-sink/async.js +9 -9
  44. package/dist/cli/commands/kitchen-sink/async.test.js +9 -9
  45. package/dist/cli/commands/kitchen-sink/index.js +11 -11
  46. package/dist/cli/commands/kitchen-sink/index.test.js +11 -11
  47. package/dist/cli/commands/kitchen-sink/prompts.js +9 -9
  48. package/dist/cli/commands/kitchen-sink/prompts.test.js +9 -9
  49. package/dist/cli/commands/kitchen-sink/static.js +9 -9
  50. package/dist/cli/commands/kitchen-sink/static.test.js +9 -9
  51. package/dist/cli/commands/notifications/generate.js +9 -9
  52. package/dist/cli/commands/notifications/list.js +9 -9
  53. package/dist/cli/commands/search.js +9 -9
  54. package/dist/cli/commands/upgrade.js +9 -9
  55. package/dist/cli/commands/version.js +9 -9
  56. package/dist/cli/commands/version.test.js +9 -9
  57. package/dist/cli/services/commands/notifications.js +6 -6
  58. package/dist/cli/services/commands/search.js +2 -2
  59. package/dist/cli/services/commands/search.test.js +2 -2
  60. package/dist/cli/services/commands/version.js +3 -3
  61. package/dist/cli/services/commands/version.test.js +4 -4
  62. package/dist/cli/services/kitchen-sink/async.js +2 -2
  63. package/dist/cli/services/kitchen-sink/prompts.js +2 -2
  64. package/dist/cli/services/kitchen-sink/static.js +2 -2
  65. package/dist/cli/services/upgrade.js +3 -3
  66. package/dist/cli/services/upgrade.test.js +4 -4
  67. package/dist/{custom-oclif-loader-TLTSWHLS.js → custom-oclif-loader-RINU7HR3.js} +2 -2
  68. package/dist/{error-handler-JWFNITM6.js → error-handler-CWNDOJLB.js} +6 -6
  69. package/dist/hooks/postrun.js +5 -5
  70. package/dist/hooks/prerun.js +6 -6
  71. package/dist/index.js +701 -537
  72. package/dist/{local-4NMXX5NP.js → local-FQVEYJ4K.js} +4 -2
  73. package/dist/{node-package-manager-SHRILTY3.js → node-package-manager-XIE2HZEQ.js} +3 -3
  74. package/dist/tsconfig.tsbuildinfo +1 -1
  75. package/dist/{ui-MKDRI4FX.js → ui-UAEFJEFY.js} +2 -2
  76. package/dist/{workerd-BHG6KDEK.js → workerd-EPURL4IC.js} +9 -9
  77. package/oclif.manifest.json +12 -9
  78. 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-2QVJ6J2X.js";
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-EYUOBXKH.js";
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-XLMH6DBR.js";
138
+ } from "./chunk-PUMWL67K.js";
139
139
  import {
140
140
  List
141
- } from "./chunk-6YASM3HI.js";
142
- import "./chunk-Y3HY6QD7.js";
141
+ } from "./chunk-J2CFMYG5.js";
142
+ import "./chunk-HV4MPORZ.js";
143
143
  import {
144
144
  Search
145
- } from "./chunk-TPPRDIBF.js";
146
- import "./chunk-Y2BHJWKT.js";
145
+ } from "./chunk-3AF66HDC.js";
146
+ import "./chunk-IEPPQIPW.js";
147
147
  import {
148
148
  Upgrade
149
- } from "./chunk-TRR5QJRW.js";
150
- import "./chunk-36WMFQ3S.js";
149
+ } from "./chunk-WYVKPOTO.js";
150
+ import "./chunk-IYNLJNFT.js";
151
151
  import {
152
152
  Version
153
- } from "./chunk-2OJBOBH2.js";
154
- import "./chunk-P3SM4EEQ.js";
153
+ } from "./chunk-PAU7LKSJ.js";
154
+ import "./chunk-C5STUYKR.js";
155
155
  import {
156
156
  HelpCommand
157
- } from "./chunk-B5Q2Q4B3.js";
157
+ } from "./chunk-UHBL2XEG.js";
158
158
  import {
159
159
  KitchenSinkAsync
160
- } from "./chunk-ZM543XCR.js";
160
+ } from "./chunk-4TOZOCIV.js";
161
161
  import {
162
162
  KitchenSinkAll
163
- } from "./chunk-2CNWYFWQ.js";
164
- import "./chunk-LJHVLE3R.js";
163
+ } from "./chunk-KC6KOCJ5.js";
164
+ import "./chunk-RHYTM4FE.js";
165
165
  import {
166
166
  KitchenSinkPrompts
167
- } from "./chunk-WSX6K4TT.js";
168
- import "./chunk-GT7PA6E6.js";
167
+ } from "./chunk-H3SSAPRP.js";
168
+ import "./chunk-6ONJ77I7.js";
169
169
  import {
170
170
  KitchenSinkStatic
171
- } from "./chunk-5PAHFSKT.js";
172
- import "./chunk-TWYT4DFD.js";
171
+ } from "./chunk-X7CGUWBF.js";
172
+ import "./chunk-OZPZBNSB.js";
173
173
  import {
174
174
  Login
175
- } from "./chunk-V2ZY6OP3.js";
175
+ } from "./chunk-2TMOMDXO.js";
176
176
  import {
177
177
  Logout
178
- } from "./chunk-R7OKLQB6.js";
178
+ } from "./chunk-TIYR37XP.js";
179
179
  import {
180
180
  ClearCache,
181
181
  globalFlags,
182
182
  jsonFlag,
183
183
  runCLI
184
- } from "./chunk-CUCT627W.js";
184
+ } from "./chunk-6MYWZ7MP.js";
185
185
  import {
186
186
  CommandFlags
187
- } from "./chunk-NJR5IH3H.js";
187
+ } from "./chunk-SG2A4CTL.js";
188
188
  import {
189
189
  DocsGenerate
190
- } from "./chunk-EAEHP4CZ.js";
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-TLGBKEEX.js";
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-WF5BWNFE.js";
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-YETFHMCK.js";
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-EQO4QA4E.js";
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-GFYDB5LD.js";
313
+ } from "./chunk-ZZNQWJUM.js";
314
314
  import {
315
315
  CLI_KIT_VERSION
316
- } from "./chunk-6KFJWCTP.js";
316
+ } from "./chunk-OTD3FRPC.js";
317
317
  import {
318
318
  AbortController as AbortController2,
319
319
  AbortError,
@@ -472,6 +472,7 @@ import {
472
472
  rmdir,
473
473
  runWithTimer,
474
474
  shouldDisplayColors,
475
+ skipLocalDevConsole,
475
476
  sleep,
476
477
  sliceAnsi,
477
478
  slugify,
@@ -505,7 +506,7 @@ import {
505
506
  wrapAnsi,
506
507
  writeFile,
507
508
  writeFileSync
508
- } from "./chunk-GSUL4KBP.js";
509
+ } from "./chunk-5SJCPOBW.js";
509
510
  import {
510
511
  require_ansis,
511
512
  require_commonjs,
@@ -3595,13 +3596,13 @@ var require_json = __commonJS({
3595
3596
  }
3596
3597
  exports.nodeAtPath = nodeAtPath;
3597
3598
  function getLocStart(node) {
3598
- var _a48, _b;
3599
- return (_b = (_a48 = node.loc) === null || _a48 === void 0 ? void 0 : _a48.start.offset) !== null && _b !== void 0 ? _b : 0;
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;
3600
3601
  }
3601
3602
  exports.getLocStart = getLocStart;
3602
3603
  function getLocEnd(node) {
3603
- var _a48, _b;
3604
- return (_b = (_a48 = node.loc) === null || _a48 === void 0 ? void 0 : _a48.end.offset) !== null && _b !== void 0 ? _b : 0;
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;
3605
3606
  }
3606
3607
  exports.getLocEnd = getLocEnd;
3607
3608
  }
@@ -3680,7 +3681,7 @@ var require_block = __commonJS({
3680
3681
  exports.validateBlockFileExistence = exports.reportWarning = exports.validateNestedBlocks = exports.isInvalidDefaultBlock = exports.isInvalidPresetBlock = exports.getBlocks = void 0;
3681
3682
  var json_1 = require_json(), file_utils_1 = require_file_utils();
3682
3683
  function getBlocks(validSchema) {
3683
- var _a48, _b;
3684
+ var _a50, _b;
3684
3685
  let rootLevelThemeBlocks = [], rootLevelLocalBlocks = [], presetLevelBlocks = {}, defaultLevelBlocks = [], rootLevelBlocks = validSchema.blocks, presets = validSchema.presets;
3685
3686
  function categorizeRootLevelBlocks(block, index) {
3686
3687
  if (!block)
@@ -3717,7 +3718,7 @@ var require_block = __commonJS({
3717
3718
  }) : typeof preset.blocks == "object" && Object.entries(preset.blocks).forEach(([key, block]) => {
3718
3719
  categorizePresetLevelBlocks(block, ["presets", String(presetIndex), "blocks", key], 0);
3719
3720
  }));
3720
- }), "default" in validSchema && ((_b = (_a48 = validSchema.default) === null || _a48 === void 0 ? void 0 : _a48.blocks) === null || _b === void 0 || _b.forEach((block, index) => {
3721
+ }), "default" in validSchema && ((_b = (_a50 = validSchema.default) === null || _a50 === void 0 ? void 0 : _a50.blocks) === null || _b === void 0 || _b.forEach((block, index) => {
3721
3722
  categorizeDefaultLevelBlocks(block, index);
3722
3723
  })), {
3723
3724
  rootLevelThemeBlocks,
@@ -3751,10 +3752,10 @@ var require_block = __commonJS({
3751
3752
  "blocks" in nestedBlock && nestedBlock.blocks && validateNestedBlocks(context, nestedBlock, nestedBlock.blocks, nestedPath.slice(0, -1), offset, ast);
3752
3753
  }
3753
3754
  async function validateNestedBlocks(context, parentNode, nestedBlocks, currentPath, offset, ast) {
3754
- var _a48;
3755
+ var _a50;
3755
3756
  if (!nestedBlocks)
3756
3757
  return;
3757
- let parentSchema = await ((_a48 = context.getBlockSchema) === null || _a48 === void 0 ? void 0 : _a48.call(context, parentNode.type));
3758
+ let parentSchema = await ((_a50 = context.getBlockSchema) === null || _a50 === void 0 ? void 0 : _a50.call(context, parentNode.type));
3758
3759
  if (!parentSchema || parentSchema instanceof Error)
3759
3760
  return;
3760
3761
  let { validSchema, staticBlockDefs } = parentSchema;
@@ -4175,9 +4176,9 @@ var DocumentUri, URI, integer, uinteger, Position, Range, Location, LocationLink
4175
4176
  }
4176
4177
  Diagnostic3.create = create2;
4177
4178
  function is(value) {
4178
- var _a48;
4179
+ var _a50;
4179
4180
  let candidate = value;
4180
- 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((_a48 = candidate.codeDescription) === null || _a48 === void 0 ? void 0 : _a48.href)) && (Is.string(candidate.source) || Is.undefined(candidate.source)) && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
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));
4181
4182
  }
4182
4183
  Diagnostic3.is = is;
4183
4184
  })(Diagnostic || (Diagnostic = {}));
@@ -8763,8 +8764,8 @@ var require_JSONValidator = __commonJS({
8763
8764
  });
8764
8765
  }
8765
8766
  async getSchemaForURI(uri) {
8766
- var _a48;
8767
- let schema = (_a48 = this.schemas[uri]) === null || _a48 === void 0 ? void 0 : _a48.schema;
8767
+ var _a50;
8768
+ let schema = (_a50 = this.schemas[uri]) === null || _a50 === void 0 ? void 0 : _a50.schema;
8768
8769
  return schema || `No schema for '${uri}' found`;
8769
8770
  }
8770
8771
  };
@@ -16690,12 +16691,12 @@ var require_stage_1_cst = __commonJS({
16690
16691
  whitespaceStart: (tokens) => tokens[0].children[1].sourceString,
16691
16692
  whitespaceEnd: (tokens) => tokens[0].children[7].sourceString,
16692
16693
  delimiterWhitespaceStart: (tokens) => {
16693
- var _a48;
16694
- return ((_a48 = tokens[2].children[1]) === null || _a48 === void 0 ? void 0 : _a48.sourceString) || "";
16694
+ var _a50;
16695
+ return ((_a50 = tokens[2].children[1]) === null || _a50 === void 0 ? void 0 : _a50.sourceString) || "";
16695
16696
  },
16696
16697
  delimiterWhitespaceEnd: (tokens) => {
16697
- var _a48;
16698
- return ((_a48 = tokens[2].children[7]) === null || _a48 === void 0 ? void 0 : _a48.sourceString) || "";
16698
+ var _a50;
16699
+ return ((_a50 = tokens[2].children[7]) === null || _a50 === void 0 ? void 0 : _a50.sourceString) || "";
16699
16700
  },
16700
16701
  locStart,
16701
16702
  locEnd,
@@ -17503,7 +17504,7 @@ var require_stage_2_ast = __commonJS({
17503
17504
  this.current.push(node);
17504
17505
  }
17505
17506
  close(node, nodeType) {
17506
- var _a48, _b;
17507
+ var _a50, _b;
17507
17508
  if (isLiquidBranch(this.parent) && (this.parent.blockEndPosition = { start: node.locStart, end: node.locStart }, this.closeParentWith(node)), !this.parent)
17508
17509
  throw new errors_1.LiquidHTMLASTParsingError(`Attempting to close ${nodeType} '${getName2(node)}' before it was opened`, this.source, node.locStart, node.locEnd);
17509
17510
  if (getName2(this.parent) !== getName2(node) || this.parent.type !== nodeType) {
@@ -17514,7 +17515,7 @@ var require_stage_2_ast = __commonJS({
17514
17515
  else
17515
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));
17516
17517
  }
17517
- 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 = (_a48 = node.whitespaceStart) !== null && _a48 !== void 0 ? _a48 : "", this.parent.delimiterWhitespaceEnd = (_b = node.whitespaceEnd) !== null && _b !== void 0 ? _b : ""), this.cursor.pop(), this.cursor.pop();
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();
17518
17519
  }
17519
17520
  // This function performs the following tasks:
17520
17521
  // - Tries to find a parent branch to close when pushing a new branch.
@@ -17570,17 +17571,17 @@ var require_stage_2_ast = __commonJS({
17570
17571
  }
17571
17572
  exports.getName = getName2;
17572
17573
  function cstToAst(cst, options) {
17573
- var _a48;
17574
+ var _a50;
17574
17575
  if (cst.length === 0)
17575
17576
  return [];
17576
17577
  let builder = buildAst(cst, options);
17577
17578
  if (!options.allowUnclosedDocumentNode && builder.cursor.length !== 0)
17578
- throw new errors_1.LiquidHTMLASTParsingError(`Attempting to end parsing before ${(_a48 = builder.parent) === null || _a48 === void 0 ? void 0 : _a48.type} '${getName2(builder.parent)}' was closed`, builder.source, builder.source.length - 1, builder.source.length, getUnclosed(builder.parent, builder.grandparent));
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));
17579
17580
  return builder.ast;
17580
17581
  }
17581
17582
  exports.cstToAst = cstToAst;
17582
17583
  function buildAst(cst, options) {
17583
- var _a48, _b, _c, _d;
17584
+ var _a50, _b, _c, _d;
17584
17585
  let builder = new ASTBuilder(cst[0].source);
17585
17586
  for (let i = 0; i < cst.length; i++) {
17586
17587
  let node = cst[i];
@@ -17611,7 +17612,7 @@ var require_stage_2_ast = __commonJS({
17611
17612
  markup: markup(node.name, node.markup),
17612
17613
  name: node.name,
17613
17614
  body: toRawMarkup(node, options),
17614
- whitespaceStart: (_a48 = node.whitespaceStart) !== null && _a48 !== void 0 ? _a48 : "",
17615
+ whitespaceStart: (_a50 = node.whitespaceStart) !== null && _a50 !== void 0 ? _a50 : "",
17615
17616
  whitespaceEnd: (_b = node.whitespaceEnd) !== null && _b !== void 0 ? _b : "",
17616
17617
  delimiterWhitespaceStart: (_c = node.delimiterWhitespaceStart) !== null && _c !== void 0 ? _c : "",
17617
17618
  delimiterWhitespaceEnd: (_d = node.delimiterWhitespaceEnd) !== null && _d !== void 0 ? _d : "",
@@ -17794,23 +17795,23 @@ var require_stage_2_ast = __commonJS({
17794
17795
  return cstToAst(attrList, options);
17795
17796
  }
17796
17797
  function liquidTagBaseAttributes(node) {
17797
- var _a48, _b;
17798
+ var _a50, _b;
17798
17799
  return {
17799
17800
  type: types_1.NodeTypes.LiquidTag,
17800
17801
  position: position(node),
17801
- whitespaceStart: (_a48 = node.whitespaceStart) !== null && _a48 !== void 0 ? _a48 : "",
17802
+ whitespaceStart: (_a50 = node.whitespaceStart) !== null && _a50 !== void 0 ? _a50 : "",
17802
17803
  whitespaceEnd: (_b = node.whitespaceEnd) !== null && _b !== void 0 ? _b : "",
17803
17804
  blockStartPosition: position(node),
17804
17805
  source: node.source
17805
17806
  };
17806
17807
  }
17807
17808
  function liquidBranchBaseAttributes(node) {
17808
- var _a48, _b;
17809
+ var _a50, _b;
17809
17810
  return {
17810
17811
  type: types_1.NodeTypes.LiquidBranch,
17811
17812
  children: [],
17812
17813
  position: position(node),
17813
- whitespaceStart: (_a48 = node.whitespaceStart) !== null && _a48 !== void 0 ? _a48 : "",
17814
+ whitespaceStart: (_a50 = node.whitespaceStart) !== null && _a50 !== void 0 ? _a50 : "",
17814
17815
  whitespaceEnd: (_b = node.whitespaceEnd) !== null && _b !== void 0 ? _b : "",
17815
17816
  blockStartPosition: position(node),
17816
17817
  blockEndPosition: { start: -1, end: -1 },
@@ -17950,7 +17951,7 @@ var require_stage_2_ast = __commonJS({
17950
17951
  }
17951
17952
  }
17952
17953
  function toNamedLiquidBranchBaseCase(node) {
17953
- var _a48, _b;
17954
+ var _a50, _b;
17954
17955
  return {
17955
17956
  name: node.name,
17956
17957
  type: types_1.NodeTypes.LiquidBranch,
@@ -17959,7 +17960,7 @@ var require_stage_2_ast = __commonJS({
17959
17960
  children: [],
17960
17961
  blockStartPosition: { start: node.locStart, end: node.locEnd },
17961
17962
  blockEndPosition: { start: -1, end: -1 },
17962
- whitespaceStart: (_a48 = node.whitespaceStart) !== null && _a48 !== void 0 ? _a48 : "",
17963
+ whitespaceStart: (_a50 = node.whitespaceStart) !== null && _a50 !== void 0 ? _a50 : "",
17963
17964
  whitespaceEnd: (_b = node.whitespaceEnd) !== null && _b !== void 0 ? _b : "",
17964
17965
  source: node.source
17965
17966
  };
@@ -18042,10 +18043,10 @@ var require_stage_2_ast = __commonJS({
18042
18043
  }
18043
18044
  var liquidToken = /(\{%|\{\{)-?/g;
18044
18045
  function toRawMarkupKindFromHtmlNode(node) {
18045
- var _a48;
18046
+ var _a50;
18046
18047
  switch (node.name) {
18047
18048
  case "script": {
18048
- let scriptAttr = (_a48 = node.attrList) === null || _a48 === void 0 ? void 0 : _a48.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");
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");
18049
18050
  if (!scriptAttr || !("value" in scriptAttr) || scriptAttr.value.length === 0 || scriptAttr.value[0].type !== stage_1_cst_1.ConcreteNodeTypes.TextNode)
18050
18051
  return RawMarkupKinds.javascript;
18051
18052
  let type = scriptAttr.value[0].value;
@@ -18159,11 +18160,11 @@ var require_stage_2_ast = __commonJS({
18159
18160
  };
18160
18161
  }
18161
18162
  function toLiquidVariableOutput(node) {
18162
- var _a48, _b;
18163
+ var _a50, _b;
18163
18164
  return {
18164
18165
  type: types_1.NodeTypes.LiquidVariableOutput,
18165
18166
  markup: typeof node.markup == "string" ? node.markup : toLiquidVariable(node.markup),
18166
- whitespaceStart: (_a48 = node.whitespaceStart) !== null && _a48 !== void 0 ? _a48 : "",
18167
+ whitespaceStart: (_a50 = node.whitespaceStart) !== null && _a50 !== void 0 ? _a50 : "",
18167
18168
  whitespaceEnd: (_b = node.whitespaceEnd) !== null && _b !== void 0 ? _b : "",
18168
18169
  position: position(node),
18169
18170
  source: node.source
@@ -18350,11 +18351,11 @@ var require_stage_2_ast = __commonJS({
18350
18351
  }
18351
18352
  exports.isLiquidHtmlNode = isLiquidHtmlNode;
18352
18353
  function getUnclosed(node, parentNode) {
18353
- var _a48;
18354
+ var _a50;
18354
18355
  if (node)
18355
18356
  return getName2(node) === null && parentNode && (node = parentNode), {
18356
18357
  type: node.type,
18357
- name: (_a48 = getName2(node)) !== null && _a48 !== void 0 ? _a48 : "",
18358
+ name: (_a50 = getName2(node)) !== null && _a50 !== void 0 ? _a50 : "",
18358
18359
  blockStartPosition: "blockStartPosition" in node ? node.blockStartPosition : node.position
18359
18360
  };
18360
18361
  }
@@ -18669,8 +18670,8 @@ var require_context_utils = __commonJS({
18669
18670
  };
18670
18671
  }
18671
18672
  async function getDefaultLocaleFile(fs7, rootUri, postfix = ".default.json") {
18672
- var _a48;
18673
- return (_a48 = (await fs7.readDirectory((0, path_1.join)(rootUri, "locales"))).find(([uri]) => uri.endsWith(postfix))) === null || _a48 === void 0 ? void 0 : _a48[0];
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];
18674
18675
  }
18675
18676
  async function getDefaultLocale(fs7, rootUri, postfix) {
18676
18677
  try {
@@ -18831,8 +18832,8 @@ var require_visitor = __commonJS({
18831
18832
  return node.position.end - node.position.start;
18832
18833
  }
18833
18834
  function isUnclosed(node) {
18834
- var _a48;
18835
- return "blockEndPosition" in node ? ((_a48 = node.blockEndPosition) === null || _a48 === void 0 ? void 0 : _a48.end) === -1 : "children" in node ? node.children.length > 0 : !1;
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;
18836
18837
  }
18837
18838
  function findJSONNode(ast, cursorPosition) {
18838
18839
  let prev, current = ast, ancestors = [], offset = cursorPosition;
@@ -18931,8 +18932,8 @@ var require_ignore2 = __commonJS({
18931
18932
  }
18932
18933
  exports.isIgnored = isIgnored;
18933
18934
  function checkIgnorePatterns(checkDef, config2) {
18934
- var _a48;
18935
- return checkDef ? asArray((_a48 = config2.settings[checkDef.meta.code]) === null || _a48 === void 0 ? void 0 : _a48.ignore) : [];
18935
+ var _a50;
18936
+ return checkDef ? asArray((_a50 = config2.settings[checkDef.meta.code]) === null || _a50 === void 0 ? void 0 : _a50.ignore) : [];
18936
18937
  }
18937
18938
  function asArray(x) {
18938
18939
  return x ?? [];
@@ -19165,10 +19166,10 @@ var require_asset_preload = __commonJS({
19165
19166
  create(context) {
19166
19167
  return {
19167
19168
  async HtmlVoidElement(node) {
19168
- var _a48;
19169
+ var _a50;
19169
19170
  let preloadLinkAttr = node.attributes.find((attr) => (0, utils_1.isValuedHtmlAttribute)(attr) && isPreload(attr));
19170
19171
  if (node.name === "link" && preloadLinkAttr) {
19171
- let asAttr = node.attributes.filter(utils_1.isValuedHtmlAttribute).find((attr) => (0, utils_1.isAttr)(attr, "as")), assetType = (_a48 = asAttr?.value.find((node2) => (0, utils_1.isNodeOfType)(liquid_html_parser_1.NodeTypes.TextNode, node2))) === null || _a48 === void 0 ? void 0 : _a48.value, message = "";
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 = "";
19172
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({
19173
19174
  message,
19174
19175
  startIndex: node.position.start,
@@ -19966,10 +19967,10 @@ var require_parse = __commonJS({
19966
19967
  }
19967
19968
  }
19968
19969
  function objectToObjectNode(node) {
19969
- var _a48;
19970
+ var _a50;
19970
19971
  return {
19971
19972
  type: "Object",
19972
- children: ((_a48 = node.children) !== null && _a48 !== void 0 ? _a48 : []).map(jsoncToJsonAst),
19973
+ children: ((_a50 = node.children) !== null && _a50 !== void 0 ? _a50 : []).map(jsoncToJsonAst),
19973
19974
  loc: (0, exports.location)(node.offset, node.offset + node.length)
19974
19975
  };
19975
19976
  }
@@ -20178,13 +20179,13 @@ var require_to_schema = __commonJS({
20178
20179
  }
20179
20180
  exports.toAppBlockSchema = toAppBlockSchema;
20180
20181
  function toSchemaNode(ast) {
20181
- var _a48;
20182
- return ast instanceof Error ? ast : (_a48 = (0, visitor_1.visit)(ast, {
20182
+ var _a50;
20183
+ return ast instanceof Error ? ast : (_a50 = (0, visitor_1.visit)(ast, {
20183
20184
  LiquidRawTag(node) {
20184
20185
  if (node.name === "schema")
20185
20186
  return node;
20186
20187
  }
20187
- })[0]) !== null && _a48 !== void 0 ? _a48 : new Error("No schema tag found");
20188
+ })[0]) !== null && _a50 !== void 0 ? _a50 : new Error("No schema tag found");
20188
20189
  }
20189
20190
  function toStaticBlockDefs(ast) {
20190
20191
  return ast instanceof Error ? [] : (0, visitor_1.visit)(ast, {
@@ -20204,11 +20205,11 @@ var require_to_schema = __commonJS({
20204
20205
  });
20205
20206
  }
20206
20207
  function getSchema(context) {
20207
- var _a48, _b;
20208
+ var _a50, _b;
20208
20209
  let name = path3.basename(context.file.uri, ".liquid");
20209
20210
  switch (!0) {
20210
20211
  case isBlock(context.file.uri):
20211
- return (_a48 = context.getBlockSchema) === null || _a48 === void 0 ? void 0 : _a48.call(context, name);
20212
+ return (_a50 = context.getBlockSchema) === null || _a50 === void 0 ? void 0 : _a50.call(context, name);
20212
20213
  case isSection(context.file.uri):
20213
20214
  return (_b = context.getSectionSchema) === null || _b === void 0 ? void 0 : _b.call(context, name);
20214
20215
  default:
@@ -21641,29 +21642,29 @@ var require_deprecated_fonts_on_sections_and_blocks = __commonJS({
21641
21642
  });
21642
21643
  }
21643
21644
  async function checkPresetsForDeprecatedFonts(schema, offset, ast, context) {
21644
- var _a48;
21645
+ var _a50;
21645
21646
  let presets = schema.presets;
21646
21647
  if (presets)
21647
21648
  for (let [preset_index, preset] of presets.entries()) {
21648
21649
  let warningAstPath = ["presets", String(preset_index)];
21649
- await checkSettingsAndBlocksForDeprecatedFonts((_a48 = preset.settings) !== null && _a48 !== void 0 ? _a48 : {}, "blocks" in preset ? preset.blocks : void 0, schema, offset, ast, warningAstPath, context);
21650
+ await checkSettingsAndBlocksForDeprecatedFonts((_a50 = preset.settings) !== null && _a50 !== void 0 ? _a50 : {}, "blocks" in preset ? preset.blocks : void 0, schema, offset, ast, warningAstPath, context);
21650
21651
  }
21651
21652
  }
21652
21653
  async function checkSettingsAndBlocksForDeprecatedFonts(settings, blocks2, schema, offset, ast, warningAstPath, context) {
21653
21654
  settings && typeof settings == "object" && Object.entries(settings).forEach(([settingKey, settingValue]) => {
21654
- var _a48;
21655
- if (isFontPickerType((_a48 = schema.settings) !== null && _a48 !== void 0 ? _a48 : [], settingKey) && deprecated_fonts_data_1.DEPRECATED_FONT_HANDLES.has(settingValue)) {
21655
+ var _a50;
21656
+ if (isFontPickerType((_a50 = schema.settings) !== null && _a50 !== void 0 ? _a50 : [], settingKey) && deprecated_fonts_data_1.DEPRECATED_FONT_HANDLES.has(settingValue)) {
21656
21657
  let currentPath = warningAstPath.concat(["settings", settingKey]);
21657
21658
  reportWarning(context, offset, ast, currentPath, `setting '${settingKey}' is using deprecated font '${settingValue}'`);
21658
21659
  }
21659
21660
  }), blocks2 && await checkBlocksForDeprecatedFonts(blocks2, schema, offset, ast, context, warningAstPath);
21660
21661
  }
21661
21662
  async function checkBlocksForDeprecatedFonts(blocks2, schema, offset, ast, context, nodePath2) {
21662
- var _a48, _b, _c, _d;
21663
+ var _a50, _b, _c, _d;
21663
21664
  let iterator = Array.isArray(blocks2) ? blocks2.entries() : Object.entries(blocks2);
21664
21665
  for (let [keyOrIndex, block] of iterator) {
21665
21666
  let currentPath = nodePath2.concat(["blocks", String(keyOrIndex)]), validSchema = null;
21666
- if ((_a48 = schema.blocks) === null || _a48 === void 0 || _a48.forEach((schemaBlock) => {
21667
+ if ((_a50 = schema.blocks) === null || _a50 === void 0 || _a50.forEach((schemaBlock) => {
21667
21668
  schemaBlock.type === block.type && "name" in schemaBlock && (validSchema = schemaBlock);
21668
21669
  }), !validSchema) {
21669
21670
  let blockSchema = await ((_b = context.getBlockSchema) === null || _b === void 0 ? void 0 : _b.call(context, block.type));
@@ -21676,12 +21677,12 @@ var require_deprecated_fonts_on_sections_and_blocks = __commonJS({
21676
21677
  }
21677
21678
  }
21678
21679
  async function checkSchemaDefaultForDeprecatedFonts(schema, offset, ast, context) {
21679
- var _a48;
21680
+ var _a50;
21680
21681
  let defaultValues = schema.default;
21681
21682
  if (!defaultValues || typeof defaultValues != "object")
21682
21683
  return;
21683
21684
  let warningAstPath = ["default"];
21684
- await checkSettingsAndBlocksForDeprecatedFonts((_a48 = defaultValues.settings) !== null && _a48 !== void 0 ? _a48 : {}, "blocks" in defaultValues ? defaultValues.blocks : void 0, schema, offset, ast, warningAstPath, context);
21685
+ await checkSettingsAndBlocksForDeprecatedFonts((_a50 = defaultValues.settings) !== null && _a50 !== void 0 ? _a50 : {}, "blocks" in defaultValues ? defaultValues.blocks : void 0, schema, offset, ast, warningAstPath, context);
21685
21686
  }
21686
21687
  function isFontPickerType(settings, settingKey) {
21687
21688
  return settings.some((setting) => setting.id === settingKey && setting.type === "font_picker");
@@ -21980,10 +21981,10 @@ var require_arguments = __commonJS({
21980
21981
  return node.args.length == 1 || arg.position.start == node.args[node.args.length - 1].position.start;
21981
21982
  }
21982
21983
  function getBlockName(node) {
21983
- var _a48;
21984
+ var _a50;
21984
21985
  if (node.contentForType.value !== "block")
21985
21986
  return;
21986
- let contentForTypeArg = (_a48 = node.args.find((arg) => arg.name == "type")) === null || _a48 === void 0 ? void 0 : _a48.value;
21987
+ let contentForTypeArg = (_a50 = node.args.find((arg) => arg.name == "type")) === null || _a50 === void 0 ? void 0 : _a50.value;
21987
21988
  if (!(!contentForTypeArg || !(0, utils_2.isLiquidString)(contentForTypeArg)))
21988
21989
  return contentForTypeArg.value;
21989
21990
  }
@@ -21994,9 +21995,9 @@ var require_arguments = __commonJS({
21994
21995
  }
21995
21996
  exports.getSnippetName = getSnippetName;
21996
21997
  async function getLiquidDocParams(context, relativePath2) {
21997
- var _a48;
21998
+ var _a50;
21998
21999
  let docDefinition = context.getDocDefinition && await context.getDocDefinition(relativePath2);
21999
- if (!((_a48 = docDefinition?.liquidDoc) === null || _a48 === void 0) && _a48.parameters)
22000
+ if (!((_a50 = docDefinition?.liquidDoc) === null || _a50 === void 0) && _a50.parameters)
22000
22001
  return new Map(docDefinition.liquidDoc.parameters.map((p) => [p.name, p]));
22001
22002
  }
22002
22003
  exports.getLiquidDocParams = getLiquidDocParams;
@@ -22048,12 +22049,12 @@ var require_duplicate_render_snippet_arguments = __commonJS({
22048
22049
  create(context) {
22049
22050
  return {
22050
22051
  async RenderMarkup(node) {
22051
- var _a48;
22052
+ var _a50;
22052
22053
  let snippetName = (0, arguments_1.getSnippetName)(node);
22053
22054
  if (!snippetName)
22054
22055
  return;
22055
22056
  let encounteredArgNames = /* @__PURE__ */ new Set(), duplicateArgs = [];
22056
- !((_a48 = node.alias) === null || _a48 === void 0) && _a48.value && encounteredArgNames.add(node.alias.value);
22057
+ !((_a50 = node.alias) === null || _a50 === void 0) && _a50.value && encounteredArgNames.add(node.alias.value);
22057
22058
  for (let param of node.args)
22058
22059
  encounteredArgNames.has(param.name) && duplicateArgs.push(param), encounteredArgNames.add(param.name);
22059
22060
  (0, arguments_1.reportDuplicateArguments)(context, node, duplicateArgs, snippetName);
@@ -22306,11 +22307,11 @@ var require_missing_block_utils = __commonJS({
22306
22307
  return await (0, file_utils_1.doesFileExist)(context, blockPath);
22307
22308
  }
22308
22309
  async function getThemeBlocks(sectionType, currentPath, context) {
22309
- var _a48, _b;
22310
+ var _a50, _b;
22310
22311
  let themeBlocks = [];
22311
22312
  if (!sectionType)
22312
22313
  return themeBlocks;
22313
- let schema = isNestedBlock(currentPath) ? await ((_a48 = context.getBlockSchema) === null || _a48 === void 0 ? void 0 : _a48.call(context, sectionType)) : await ((_b = context.getSectionSchema) === null || _b === void 0 ? void 0 : _b.call(context, sectionType));
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));
22314
22315
  if (!schema || schema instanceof Error)
22315
22316
  return themeBlocks;
22316
22317
  let { validSchema } = schema;
@@ -22529,9 +22530,9 @@ var require_liquid_free_settings = __commonJS({
22529
22530
  }
22530
22531
  function isInArrayWithParentKey(ancestors, parentKey) {
22531
22532
  return ancestors.some((ancestor, index) => {
22532
- var _a48;
22533
+ var _a50;
22533
22534
  let parent = ancestors[index - 1];
22534
- return (ancestor.type === "Array" || ancestor.type === "Object") && parent?.type === "Property" && ((_a48 = parent.key) === null || _a48 === void 0 ? void 0 : _a48.value) === parentKey;
22535
+ return (ancestor.type === "Array" || ancestor.type === "Object") && parent?.type === "Property" && ((_a50 = parent.key) === null || _a50 === void 0 ? void 0 : _a50.value) === parentKey;
22535
22536
  });
22536
22537
  }
22537
22538
  }
@@ -22591,7 +22592,7 @@ var require_MultipleAssignValues = __commonJS({
22591
22592
  exports.detectMultipleAssignValues = void 0;
22592
22593
  var utils_1 = require_utils5();
22593
22594
  function detectMultipleAssignValues(node) {
22594
- var _a48;
22595
+ var _a50;
22595
22596
  let ASSIGN_MARKUP_REGEX = /([^=]+)(=\s*)([^|]+)(?:\s*\|\s*.*)?$/m;
22596
22597
  if (node.name !== "assign")
22597
22598
  return;
@@ -22610,7 +22611,7 @@ var require_MultipleAssignValues = __commonJS({
22610
22611
  assignmentOperator,
22611
22612
  // '"123" something'
22612
22613
  assignmentValue
22613
- ] = match2, firstAssignmentValue = (_a48 = (0, utils_1.getValuesInMarkup)(assignmentValue).at(0)) === null || _a48 === void 0 ? void 0 : _a48.value;
22614
+ ] = match2, firstAssignmentValue = (_a50 = (0, utils_1.getValuesInMarkup)(assignmentValue).at(0)) === null || _a50 === void 0 ? void 0 : _a50.value;
22614
22615
  if (!firstAssignmentValue)
22615
22616
  return;
22616
22617
  let removalIndices = (source, startingIndex) => {
@@ -22669,7 +22670,7 @@ var require_InvalidEchoValue = __commonJS({
22669
22670
  exports.detectInvalidEchoValue = void 0;
22670
22671
  var liquid_html_parser_1 = require_dist2(), utils_1 = require_utils5();
22671
22672
  function detectInvalidEchoValue(node) {
22672
- var _a48;
22673
+ var _a50;
22673
22674
  let ECHO_MARKUP_REGEX = /([^|]*)(?:\s*\|\s*.*)?$/m;
22674
22675
  if (node.type === liquid_html_parser_1.NodeTypes.LiquidTag && node.name !== "echo")
22675
22676
  return;
@@ -22681,7 +22682,7 @@ var require_InvalidEchoValue = __commonJS({
22681
22682
  let match2 = markup.match(ECHO_MARKUP_REGEX);
22682
22683
  if (!match2)
22683
22684
  return;
22684
- let [, echoValue] = match2, firstEchoValue = (_a48 = (0, utils_1.getValuesInMarkup)(echoValue).at(0)) === null || _a48 === void 0 ? void 0 : _a48.value;
22685
+ let [, echoValue] = match2, firstEchoValue = (_a50 = (0, utils_1.getValuesInMarkup)(echoValue).at(0)) === null || _a50 === void 0 ? void 0 : _a50.value;
22685
22686
  if (!firstEchoValue) {
22686
22687
  let startIndex2 = node.source.indexOf(markup, node.position.start), endIndex2 = startIndex2 + markup.length;
22687
22688
  return {
@@ -22786,12 +22787,12 @@ var require_InvalidConditionalNode = __commonJS({
22786
22787
  return null;
22787
22788
  }
22788
22789
  function checkLaxParsingIssues(tokens) {
22789
- var _a48;
22790
+ var _a50;
22790
22791
  for (let i = 0; i < tokens.length - 1; i++) {
22791
22792
  let current = tokens[i], next = tokens[i + 1];
22792
22793
  if (current.type === "literal" && !isOperatorToken(next)) {
22793
22794
  let remaining = tokens.slice(i + 1);
22794
- if (!(((_a48 = remaining[0]) === null || _a48 === void 0 ? void 0 : _a48.type) === "variable" && remaining.some(isOperatorToken))) {
22795
+ if (!(((_a50 = remaining[0]) === null || _a50 === void 0 ? void 0 : _a50.type) === "variable" && remaining.some(isOperatorToken))) {
22795
22796
  let ignored = remaining.map((t18) => t18.value).join(" ");
22796
22797
  return /&&|\|\|/.test(ignored) ? {
22797
22798
  message: `Expression stops at truthy value '${current.value}', and will ignore: '${ignored}'. Use 'and'/'or' instead of '&&'/'||' for multiple conditions`,
@@ -22910,8 +22911,8 @@ var require_InvalidLoopArguments = __commonJS({
22910
22911
  }
22911
22912
  exports.detectInvalidLoopArguments = detectInvalidLoopArguments;
22912
22913
  function isSupportedTagArgument(tags, tagName, key, positional) {
22913
- var _a48, _b;
22914
- return ((_b = (_a48 = tags.find((tag) => tag.name === tagName)) === null || _a48 === void 0 ? void 0 : _a48.parameters) === null || _b === void 0 ? void 0 : _b.some((parameter) => parameter.name === key && parameter.positional === positional)) || !1;
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;
22915
22916
  }
22916
22917
  }
22917
22918
  });
@@ -22968,13 +22969,13 @@ var require_InvalidFilterName = __commonJS({
22968
22969
  }
22969
22970
  exports.detectInvalidFilterName = detectInvalidFilterName;
22970
22971
  async function detectInvalidFilterNameInMarkup(node, markup, filters) {
22971
- var _a48;
22972
+ var _a50;
22972
22973
  let knownFilters = filters, trimmedMarkup = markup.trim(), problems = [], filterPattern = /\|\s*([a-zA-Z][a-zA-Z0-9_]*)/g, matches2 = Array.from(trimmedMarkup.matchAll(filterPattern));
22973
22974
  for (let match2 of matches2) {
22974
22975
  let filterName = match2[1];
22975
22976
  if (!knownFilters.some((filter) => filter.name === filterName))
22976
22977
  continue;
22977
- let filterEndIndex = match2.index + match2[0].length, invalidSegment = (_a48 = trimmedMarkup.slice(filterEndIndex).match(/^(?!\s*(?::|$|\|\s*[a-zA-Z]|\|\s*\||\s*\|\s*(?:[}%]|$)))([^:|]+?)(?=\s*(?::|$|\|))/)) === null || _a48 === void 0 ? void 0 : _a48[1];
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];
22978
22979
  if (!invalidSegment)
22979
22980
  continue;
22980
22981
  let trailingStartInSource = node.source.indexOf(markup, node.position.start) + filterEndIndex, trailingEndInSource = trailingStartInSource + invalidSegment.length;
@@ -23079,8 +23080,8 @@ var require_liquid_html_syntax_error = __commonJS({
23079
23080
  targets: []
23080
23081
  },
23081
23082
  create(context) {
23082
- var _a48, _b;
23083
- let ast = context.file.ast, filtersPromise = (_a48 = context.themeDocset) === null || _a48 === void 0 ? void 0 : _a48.filters(), tagsPromise = (_b = context.themeDocset) === null || _b === void 0 ? void 0 : _b.tags();
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();
23084
23085
  return (0, utils_1.isError)(ast) ? {
23085
23086
  async onCodePathStart(file) {
23086
23087
  if (isParsingErrorWithLocation(ast)) {
@@ -23170,8 +23171,8 @@ var require_matching_translations = __commonJS({
23170
23171
  if (!isLocaleFile || isDefaultTranslationsFile || ast instanceof Error)
23171
23172
  return {};
23172
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) => {
23173
- var _a48;
23174
- return (_a48 = defaultTranslations.has(translationPath)) !== null && _a48 !== void 0 ? _a48 : !1;
23174
+ var _a50;
23175
+ return (_a50 = defaultTranslations.has(translationPath)) !== null && _a50 !== void 0 ? _a50 : !1;
23175
23176
  }, isPluralizationPath = (path3) => [...PLURALIZATION_KEYS].some((key) => path3.endsWith(key)), jsonPaths = (json) => Object.keys(json).reduce((acc, key) => {
23176
23177
  if (typeof json[key] != "object")
23177
23178
  return acc.concat(key);
@@ -23184,13 +23185,13 @@ var require_matching_translations = __commonJS({
23184
23185
  return i;
23185
23186
  return minLength;
23186
23187
  }, closestTranslationKey = (translationKey) => {
23187
- var _a48;
23188
+ var _a50;
23188
23189
  let translationKeyParts = translationKey.split("."), closestMatch = "", maxCommonParts = 0;
23189
23190
  for (let path3 of nodesByPath.keys()) {
23190
23191
  let pathParts = path3.split("."), commonParts = countCommonParts(pathParts, translationKeyParts);
23191
23192
  commonParts > maxCommonParts && (maxCommonParts = commonParts, closestMatch = path3);
23192
23193
  }
23193
- return (_a48 = nodesByPath.get(closestMatch)) !== null && _a48 !== void 0 ? _a48 : ast;
23194
+ return (_a50 = nodesByPath.get(closestMatch)) !== null && _a50 !== void 0 ? _a50 : ast;
23194
23195
  };
23195
23196
  return {
23196
23197
  async onCodePathStart() {
@@ -23351,8 +23352,8 @@ var require_missing_render_snippet_arguments = __commonJS({
23351
23352
  if (!liquidDocParameters)
23352
23353
  return;
23353
23354
  let providedParams = new Map(node.args.map((arg) => [arg.name, arg])), missingRequiredParams = Array.from(liquidDocParameters.values()).filter((p) => {
23354
- var _a48;
23355
- return p.required && !providedParams.has(p.name) && p.name !== ((_a48 = node.alias) === null || _a48 === void 0 ? void 0 : _a48.value);
23355
+ var _a50;
23356
+ return p.required && !providedParams.has(p.name) && p.name !== ((_a50 = node.alias) === null || _a50 === void 0 ? void 0 : _a50.value);
23356
23357
  });
23357
23358
  (0, arguments_1.reportMissingArguments)(context, node, missingRequiredParams, snippetName);
23358
23359
  }
@@ -23542,8 +23543,8 @@ var require_suggestions = __commonJS({
23542
23543
  var utils_1 = require_utils(), suggestionMessage = (attr) => `Use an HTML script tag with the ${attr} attribute instead`, liquidFilterSuggestion = (attr, node, parentNode, grandParentNode) => ({
23543
23544
  message: suggestionMessage(attr),
23544
23545
  fix(corrector) {
23545
- var _a48, _b;
23546
- let url = `{{ ${node.source.slice(parentNode.expression.position.start, (_b = (_a48 = (0, utils_1.last)(parentNode.filters, -1)) === null || _a48 === void 0 ? void 0 : _a48.position.end) !== null && _b !== void 0 ? _b : node.position.start)} }}`;
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)} }}`;
23547
23548
  corrector.replace(grandParentNode.position.start, grandParentNode.position.end, `<script src="${url}" ${attr}></script>`);
23548
23549
  }
23549
23550
  });
@@ -23740,10 +23741,10 @@ var require_schema_presets_static_blocks = __commonJS({
23740
23741
  }
23741
23742
  return {
23742
23743
  async LiquidTag(node) {
23743
- var _a48, _b;
23744
+ var _a50, _b;
23744
23745
  if (node.name !== liquid_html_parser_1.NamedTags.content_for || !(0, markup_1.isContentForBlock)(node.markup))
23745
23746
  return;
23746
- let idValue = (_a48 = node.markup.args.find((arg) => arg.name === "id")) === null || _a48 === void 0 ? void 0 : _a48.value, typeArg = (_b = node.markup.args.find((arg) => arg.name === "type")) === null || _b === void 0 ? void 0 : _b.value;
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;
23747
23748
  if (!typeArg || typeArg.type !== liquid_html_parser_1.NodeTypes.String)
23748
23749
  return;
23749
23750
  let typeValue = typeArg.value;
@@ -23968,13 +23969,13 @@ var require_required_layout_theme_object = __commonJS({
23968
23969
  (0, utils_1.isHtmlTag)(node, "head") ? headTag = node : (0, utils_1.isHtmlTag)(node, "body") && (bodyTag = node);
23969
23970
  },
23970
23971
  async onCodePathEnd() {
23971
- var _a48, _b;
23972
+ var _a50, _b;
23972
23973
  for (let requiredObject of requiredObjects)
23973
23974
  if (!foundObjects.has(requiredObject)) {
23974
23975
  let message = `The required object '{{ ${requiredObject} }}' is missing in layout/theme.liquid`, insertionNode = requiredObject === "content_for_header" ? headTag : bodyTag, fixInsertPosition = insertionNode?.blockEndPosition.start;
23975
23976
  context.report({
23976
23977
  message,
23977
- startIndex: (_a48 = insertionNode?.position.start) !== null && _a48 !== void 0 ? _a48 : 0,
23978
+ startIndex: (_a50 = insertionNode?.position.start) !== null && _a50 !== void 0 ? _a50 : 0,
23978
23979
  endIndex: (_b = insertionNode?.position.end) !== null && _b !== void 0 ? _b : 0,
23979
23980
  fix: fixInsertPosition !== void 0 ? (corrector) => corrector.insert(fixInsertPosition, `{{ ${requiredObject} }}`) : void 0
23980
23981
  });
@@ -24150,15 +24151,15 @@ var require_translation_key_exists = __commonJS({
24150
24151
  });
24151
24152
  },
24152
24153
  async LiquidRawTag(node) {
24153
- var _a48;
24154
+ var _a50;
24154
24155
  if (node.name !== "schema" || node.body.kind !== "json")
24155
24156
  return;
24156
24157
  let defaultLocale = await context.getDefaultLocale(), schema = (0, json_1.parseJSON)(node.body.value);
24157
- (0, utils_1.isError)(schema) && schema instanceof SyntaxError || (schemaLocales = (_a48 = schema.locales) === null || _a48 === void 0 ? void 0 : _a48[defaultLocale]);
24158
+ (0, utils_1.isError)(schema) && schema instanceof SyntaxError || (schemaLocales = (_a50 = schema.locales) === null || _a50 === void 0 ? void 0 : _a50[defaultLocale]);
24158
24159
  },
24159
24160
  async onCodePathEnd() {
24160
- var _a48;
24161
- let defaultTranslations = await context.getDefaultTranslations(), defaultLocale = await context.getDefaultLocale(), systemTranslations = await ((_a48 = context.themeDocset) === null || _a48 === void 0 ? void 0 : _a48.systemTranslations()), systemTranslationsKeys = Object.keys(systemTranslations ?? {});
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 ?? {});
24162
24163
  !defaultTranslations && systemTranslationsKeys.length === 0 || nodes.forEach(({ translationKey, startIndex, endIndex }) => {
24163
24164
  if (keyExists(translationKey, defaultTranslations) || keyExists(translationKey, schemaLocales) || systemTranslationsKeys.includes(translationKey))
24164
24165
  return;
@@ -24235,10 +24236,10 @@ var require_unclosed_html_element = __commonJS({
24235
24236
  stacks.identifiers.add(identifier), stacks.close.has(identifier) || stacks.close.set(identifier, []), stacks.close.get(identifier).push(node);
24236
24237
  },
24237
24238
  async onCodePathEnd() {
24238
- var _a48, _b;
24239
+ var _a50, _b;
24239
24240
  for (let [grandparent, stacks] of stacksByGrandparent)
24240
24241
  for (let identifier of stacks.identifiers) {
24241
- let openNodes = (_a48 = stacks.open.get(identifier)) !== null && _a48 !== void 0 ? _a48 : [], 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 = [];
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 = [];
24242
24243
  for (let node of nodes)
24243
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);
24244
24245
  for (let node of stack)
@@ -24293,7 +24294,7 @@ var require_unclosed_html_element = __commonJS({
24293
24294
  return typeof conditions == "string" ? conditions : conditions.map(getConditionIdentifierForMarkup).join(" or ");
24294
24295
  }
24295
24296
  function getConditionIdentifierForMarkup(condition) {
24296
- var _a48;
24297
+ var _a50;
24297
24298
  if (typeof condition == "string")
24298
24299
  return condition;
24299
24300
  switch (condition.type) {
@@ -24304,7 +24305,7 @@ var require_unclosed_html_element = __commonJS({
24304
24305
  case liquid_html_parser_1.NodeTypes.Number:
24305
24306
  return condition.value;
24306
24307
  case liquid_html_parser_1.NodeTypes.VariableLookup:
24307
- return `${(_a48 = condition.name) !== null && _a48 !== void 0 ? _a48 : ""}${condition.lookups.map((expression) => `[${getConditionIdentifierForMarkup(expression)}]`)}`;
24308
+ return `${(_a50 = condition.name) !== null && _a50 !== void 0 ? _a50 : ""}${condition.lookups.map((expression) => `[${getConditionIdentifierForMarkup(expression)}]`)}`;
24308
24309
  case liquid_html_parser_1.NodeTypes.Range:
24309
24310
  return `(${getConditionIdentifierForMarkup(condition.start)}..${getConditionIdentifierForMarkup(condition.end)})`;
24310
24311
  case liquid_html_parser_1.NodeTypes.Comparison:
@@ -24355,10 +24356,10 @@ var require_liquidDoc = __commonJS({
24355
24356
  node.name === "doc" && (hasDocTag = !0);
24356
24357
  },
24357
24358
  LiquidDocParamNode(node) {
24358
- var _a48, _b, _c, _d;
24359
+ var _a50, _b, _c, _d;
24359
24360
  return {
24360
24361
  name: node.paramName.value,
24361
- description: (_b = (_a48 = node.paramDescription) === null || _a48 === void 0 ? void 0 : _a48.value) !== null && _b !== void 0 ? _b : null,
24362
+ description: (_b = (_a50 = node.paramDescription) === null || _a50 === void 0 ? void 0 : _a50.value) !== null && _b !== void 0 ? _b : null,
24362
24363
  type: (_d = (_c = node.paramType) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : null,
24363
24364
  required: node.required,
24364
24365
  nodeType: "param"
@@ -24447,24 +24448,24 @@ var require_undefined_object = __commonJS({
24447
24448
  return {};
24448
24449
  let themeDocset = context.themeDocset, scopedVariables = /* @__PURE__ */ new Map(), fileScopedVariables = /* @__PURE__ */ new Set(), variables = [];
24449
24450
  function indexVariableScope(variableName, scope) {
24450
- var _a48;
24451
+ var _a50;
24451
24452
  if (!variableName)
24452
24453
  return;
24453
- let indexedScope = (_a48 = scopedVariables.get(variableName)) !== null && _a48 !== void 0 ? _a48 : [];
24454
+ let indexedScope = (_a50 = scopedVariables.get(variableName)) !== null && _a50 !== void 0 ? _a50 : [];
24454
24455
  scopedVariables.set(variableName, indexedScope.concat(scope));
24455
24456
  }
24456
24457
  return {
24457
24458
  async LiquidDocParamNode(node) {
24458
- var _a48;
24459
- let paramName = (_a48 = node.paramName) === null || _a48 === void 0 ? void 0 : _a48.value;
24459
+ var _a50;
24460
+ let paramName = (_a50 = node.paramName) === null || _a50 === void 0 ? void 0 : _a50.value;
24460
24461
  paramName && fileScopedVariables.add(paramName);
24461
24462
  },
24462
24463
  async LiquidTag(node, ancestors) {
24463
- var _a48, _b, _c, _d;
24464
+ var _a50, _b, _c, _d;
24464
24465
  (0, utils_2.isWithinRawTagThatDoesNotParseItsContents)(ancestors) || (isLiquidTagAssign(node) && indexVariableScope(node.markup.name, {
24465
24466
  start: node.blockStartPosition.end
24466
24467
  }), isLiquidTagCapture(node) && indexVariableScope(node.markup.name, {
24467
- start: (_a48 = node.blockEndPosition) === null || _a48 === void 0 ? void 0 : _a48.end
24468
+ start: (_a50 = node.blockEndPosition) === null || _a50 === void 0 ? void 0 : _a50.end
24468
24469
  }), ["form", "paginate"].includes(node.name) && indexVariableScope(node.name, {
24469
24470
  start: node.blockStartPosition.end,
24470
24471
  end: (_b = node.blockEndPosition) === null || _b === void 0 ? void 0 : _b.start
@@ -25382,8 +25383,8 @@ var require_valid_render_snippet_argument_types = __commonJS({
25382
25383
  },
25383
25384
  create(context) {
25384
25385
  function findAndReportAliasType(node, liquidDocParameters) {
25385
- var _a48, _b, _c;
25386
- if (node.alias && (!((_a48 = node.variable) === null || _a48 === void 0) && _a48.name) && node.variable.name.type !== liquid_html_parser_1.NodeTypes.VariableLookup) {
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) {
25387
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();
25388
25389
  if (paramIsDefinedWithType) {
25389
25390
  let providedParamType = (0, utils_1.inferArgumentType)(node.variable.name);
@@ -25541,7 +25542,7 @@ var require_valid_settings_key = __commonJS({
25541
25542
  create(context) {
25542
25543
  return {
25543
25544
  async LiquidRawTag(node) {
25544
- var _a48;
25545
+ var _a50;
25545
25546
  if (node.name !== "schema" || node.body.kind !== "json")
25546
25547
  return;
25547
25548
  let offset = node.blockStartPosition.end, schema = await (0, to_schema_1.getSchema)(context), { validSchema, ast } = schema ?? {};
@@ -25555,7 +25556,7 @@ var require_valid_settings_key = __commonJS({
25555
25556
  }
25556
25557
  if ((0, to_schema_1.isSectionSchema)(schema) && "default" in validSchema && validSchema.default) {
25557
25558
  let settingsNode = (0, json_1.nodeAtPath)(ast, ["default", "settings"]);
25558
- validateSettingsKey(context, offset, settingsNode, validSchema.settings), (_a48 = validSchema.default.blocks) === null || _a48 === void 0 || _a48.forEach((block, i) => {
25559
+ validateSettingsKey(context, offset, settingsNode, validSchema.settings), (_a50 = validSchema.default.blocks) === null || _a50 === void 0 || _a50.forEach((block, i) => {
25559
25560
  let settingsNode2 = (0, json_1.nodeAtPath)(ast, ["default", "blocks", i, "settings"]);
25560
25561
  validateReferencedBlock(context, offset, settingsNode2, rootLevelLocalBlocks, block);
25561
25562
  });
@@ -25570,7 +25571,7 @@ var require_valid_settings_key = __commonJS({
25570
25571
  }
25571
25572
  };
25572
25573
  async function validateReferencedBlock(context, offset, settingsNode, localBlocks, referencedBlock) {
25573
- var _a48;
25574
+ var _a50;
25574
25575
  if (localBlocks.length > 0) {
25575
25576
  let localBlock = localBlocks.find((localBlock2) => localBlock2.node.type === referencedBlock.type);
25576
25577
  if (!localBlock)
@@ -25578,7 +25579,7 @@ var require_valid_settings_key = __commonJS({
25578
25579
  let localBlockNode = localBlock.node;
25579
25580
  validateSettingsKey(context, offset, settingsNode, localBlockNode.settings);
25580
25581
  } else {
25581
- let blockSchema = await ((_a48 = context.getBlockSchema) === null || _a48 === void 0 ? void 0 : _a48.call(context, referencedBlock.type)), { validSchema: validBlockSchema } = blockSchema ?? {};
25582
+ let blockSchema = await ((_a50 = context.getBlockSchema) === null || _a50 === void 0 ? void 0 : _a50.call(context, referencedBlock.type)), { validSchema: validBlockSchema } = blockSchema ?? {};
25582
25583
  if (!validBlockSchema || validBlockSchema instanceof Error)
25583
25584
  return;
25584
25585
  validateSettingsKey(context, offset, settingsNode, validBlockSchema.settings, referencedBlock);
@@ -25753,11 +25754,11 @@ var require_valid_visible_if = __commonJS({
25753
25754
  create(context) {
25754
25755
  return {
25755
25756
  async LiquidRawTag(node) {
25756
- var _a48;
25757
+ var _a50;
25757
25758
  if (node.name !== "schema" || node.body.kind !== "json")
25758
25759
  return;
25759
25760
  let schema = await (0, to_schema_1.getSchema)(context), { validSchema, ast } = schema ?? {};
25760
- if (!validSchema || validSchema instanceof Error || !(!((_a48 = validSchema.settings) === null || _a48 === void 0) && _a48.some((setting) => "visible_if" in setting)) || !ast || ast 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)
25761
25762
  return;
25762
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 };
25763
25764
  (0, to_schema_1.isSectionSchema)(schema) ? vars.section = { settings: currentFileSettings } : (0, to_schema_1.isBlockSchema)(schema) && (vars.block = { settings: currentFileSettings });
@@ -30142,7 +30143,7 @@ var require_dist3 = __commonJS({
30142
30143
  var defaultErrorHandler = (_error) => {
30143
30144
  };
30144
30145
  async function check2(theme, config2, injectedDependencies) {
30145
- var _a48;
30146
+ var _a50;
30146
30147
  let pipelines = [], offenses = [], { fs: fs7 } = injectedDependencies, { rootUri } = config2, dependencies = {
30147
30148
  ...injectedDependencies,
30148
30149
  mode: config2.context,
@@ -30152,7 +30153,7 @@ var require_dist3 = __commonJS({
30152
30153
  getDefaultTranslations: (0, context_utils_1.makeGetDefaultTranslations)(fs7, theme, rootUri),
30153
30154
  getDefaultSchemaLocale: (0, context_utils_1.makeGetDefaultSchemaLocale)(fs7, rootUri),
30154
30155
  getDefaultSchemaTranslations: (0, context_utils_1.makeGetDefaultSchemaTranslations)(fs7, theme, rootUri),
30155
- getMetafieldDefinitions: (_a48 = injectedDependencies.getMetafieldDefinitions) !== null && _a48 !== void 0 ? _a48 : (0, context_utils_1.makeGetMetafieldDefinitions)(fs7)
30156
+ getMetafieldDefinitions: (_a50 = injectedDependencies.getMetafieldDefinitions) !== null && _a50 !== void 0 ? _a50 : (0, context_utils_1.makeGetMetafieldDefinitions)(fs7)
30156
30157
  }, { DisabledChecksVisitor, isDisabled } = (0, disabled_checks_1.createDisabledChecksModule)(), jsonValidator = await JSONValidator_1.JSONValidator.create(dependencies.jsonValidationSet, config2), validateJSON = jsonValidator?.validate;
30157
30158
  dependencies.themeDocset && !dependencies.themeDocset.isAugmented && (dependencies.themeDocset = new AugmentedThemeDocset_1.AugmentedThemeDocset(dependencies.themeDocset));
30158
30159
  for (let type of Object.values(types_1.SourceCodeType))
@@ -30193,13 +30194,13 @@ var require_dist3 = __commonJS({
30193
30194
  toUri: (relativePath2) => path3.join(config2.rootUri, ...relativePath2.split("/")),
30194
30195
  toRelativePath: (uri) => path3.relative(uri, config2.rootUri),
30195
30196
  report(problem) {
30196
- var _a48;
30197
+ var _a50;
30197
30198
  offenses.push({
30198
30199
  type: check3.meta.type,
30199
30200
  check: check3.meta.code,
30200
30201
  message: problem.message,
30201
30202
  uri: file.uri,
30202
- severity: (_a48 = checkSettings?.severity) !== null && _a48 !== void 0 ? _a48 : check3.meta.severity,
30203
+ severity: (_a50 = checkSettings?.severity) !== null && _a50 !== void 0 ? _a50 : check3.meta.severity,
30203
30204
  start: (0, utils_1.getPosition)(file.source, problem.startIndex),
30204
30205
  end: (0, utils_1.getPosition)(file.source, problem.endIndex),
30205
30206
  fix: problem.fix,
@@ -30210,10 +30211,10 @@ var require_dist3 = __commonJS({
30210
30211
  };
30211
30212
  }
30212
30213
  function createSettings(checkSettings, schema) {
30213
- var _a48;
30214
+ var _a50;
30214
30215
  let settings = {};
30215
30216
  for (let [key, schemaProp] of Object.entries(schema))
30216
- settings[key] = (_a48 = checkSettings?.[key]) !== null && _a48 !== void 0 ? _a48 : schemaProp.defaultValue();
30217
+ settings[key] = (_a50 = checkSettings?.[key]) !== null && _a50 !== void 0 ? _a50 : schemaProp.defaultValue();
30217
30218
  return settings;
30218
30219
  }
30219
30220
  function checksOfType(type, checks) {
@@ -30434,8 +30435,8 @@ var require_themeLiquidDocsManager = __commonJS({
30434
30435
  });
30435
30436
  }
30436
30437
  async latestRevision() {
30437
- var _a48;
30438
- return (_a48 = (await findSuitableResource([loader(() => this.load("latest"), "loadLatestRevision")], JSON.parse, {}, this.log)).revision) !== null && _a48 !== void 0 ? _a48 : "";
30438
+ var _a50;
30439
+ return (_a50 = (await findSuitableResource([loader(() => this.load("latest"), "loadLatestRevision")], JSON.parse, {}, this.log)).revision) !== null && _a50 !== void 0 ? _a50 : "";
30439
30440
  }
30440
30441
  async loadResource(name) {
30441
30442
  return await this.setup(), this.load(name).then((0, utils_1.tap)(() => this.log(`Loaded resource from ${(0, themeLiquidDocsDownloader_1.resourcePath)(name)}`)));
@@ -31676,7 +31677,7 @@ var require_load_config_description = __commonJS({
31676
31677
  exports.loadConfigDescription = void 0;
31677
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();
31678
31679
  async function loadConfigDescription(configDescription, root) {
31679
- var _a48;
31680
+ var _a50;
31680
31681
  let nodeModuleRoot = await findNodeModuleRoot(root), thirdPartyChecksPaths = await Promise.all([
31681
31682
  (0, load_third_party_checks_1.findThirdPartyChecks)((0, installation_location_1.thisNodeModuleRoot)()),
31682
31683
  (0, load_third_party_checks_1.findThirdPartyChecks)(nodeModuleRoot)
@@ -31686,7 +31687,7 @@ var require_load_config_description = __commonJS({
31686
31687
  ]), checks = theme_check_common_1.allChecks.concat(thirdPartyChecks).filter(isEnabledBy(configDescription)), rootUri = vscode_uri_1.URI.file(root);
31687
31688
  return {
31688
31689
  settings: unaliasedSettings(configDescription.checkSettings, checks),
31689
- context: (_a48 = configDescription.context) !== null && _a48 !== void 0 ? _a48 : "theme",
31690
+ context: (_a50 = configDescription.context) !== null && _a50 !== void 0 ? _a50 : "theme",
31690
31691
  checks,
31691
31692
  ignore: configDescription.ignore,
31692
31693
  rootUri: resolveRoot(rootUri, configDescription.root)
@@ -31701,8 +31702,8 @@ var require_load_config_description = __commonJS({
31701
31702
  return theme_check_common_1.path.resolve(root, pathLike);
31702
31703
  }
31703
31704
  var isEnabledBy = (config2) => (checkDefinition) => {
31704
- var _a48;
31705
- let checkSettings = (_a48 = config2.checkSettings[checkDefinition.meta.code]) !== null && _a48 !== void 0 ? _a48 : aliasedSettings(config2, checkDefinition);
31705
+ var _a50;
31706
+ let checkSettings = (_a50 = config2.checkSettings[checkDefinition.meta.code]) !== null && _a50 !== void 0 ? _a50 : aliasedSettings(config2, checkDefinition);
31706
31707
  return checkSettings ? checkSettings.enabled : !1;
31707
31708
  };
31708
31709
  function aliasedSettings(config2, checkDefinition) {
@@ -31717,8 +31718,8 @@ var require_load_config_description = __commonJS({
31717
31718
  }
31718
31719
  function unaliasedCode(code, checks) {
31719
31720
  let check2 = checks.find((check3) => {
31720
- var _a48;
31721
- return check3.meta.code === code || ((_a48 = check3.meta.aliases) === null || _a48 === void 0 ? void 0 : _a48.find((alias) => alias === 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));
31722
31723
  });
31723
31724
  return check2?.meta.code;
31724
31725
  }
@@ -37344,7 +37345,7 @@ var require_merge_fragments = __commonJS({
37344
37345
  Object.defineProperty(exports, "__esModule", { value: !0 });
37345
37346
  exports.mergeFragments = void 0;
37346
37347
  function mergeFragments(baseConfigs, config2) {
37347
- var _a48;
37348
+ var _a50;
37348
37349
  return {
37349
37350
  // we use the last one defined
37350
37351
  root: selectLatest(baseConfigs.map((b) => b.root), config2.root),
@@ -37357,7 +37358,7 @@ var require_merge_fragments = __commonJS({
37357
37358
  // we merge deep the settings
37358
37359
  checkSettings: baseConfigs.map((b) => b.checkSettings).concat(config2.checkSettings).reduce(mergeDeep),
37359
37360
  // We use the last one defined, or default to 'theme'
37360
- context: (_a48 = selectLatest(baseConfigs.map((b) => b.context), config2.context)) !== null && _a48 !== void 0 ? _a48 : "theme"
37361
+ context: (_a50 = selectLatest(baseConfigs.map((b) => b.context), config2.context)) !== null && _a50 !== void 0 ? _a50 : "theme"
37361
37362
  };
37362
37363
  }
37363
37364
  exports.mergeFragments = mergeFragments;
@@ -37656,20 +37657,20 @@ var require_dist6 = __commonJS({
37656
37657
  // In the language server, this is memo'ed in DocumentManager, but we don't have that kind
37657
37658
  // of luxury in CLI-mode.
37658
37659
  getSectionSchema: async (name) => {
37659
- var _a48;
37660
- return (_a48 = sectionSchemas.get(name)) === null || _a48 === void 0 ? void 0 : _a48();
37660
+ var _a50;
37661
+ return (_a50 = sectionSchemas.get(name)) === null || _a50 === void 0 ? void 0 : _a50();
37661
37662
  },
37662
37663
  getBlockSchema: async (name) => {
37663
- var _a48;
37664
- return (_a48 = blockSchemas.get(name)) === null || _a48 === void 0 ? void 0 : _a48();
37664
+ var _a50;
37665
+ return (_a50 = blockSchemas.get(name)) === null || _a50 === void 0 ? void 0 : _a50();
37665
37666
  },
37666
37667
  getAppBlockSchema: async (name) => {
37667
- var _a48;
37668
- return (_a48 = blockSchemas.get(name)) === null || _a48 === void 0 ? void 0 : _a48();
37668
+ var _a50;
37669
+ return (_a50 = blockSchemas.get(name)) === null || _a50 === void 0 ? void 0 : _a50();
37669
37670
  },
37670
37671
  getDocDefinition: async (relativePath2) => {
37671
- var _a48;
37672
- return (_a48 = docDefinitions.get(relativePath2)) === null || _a48 === void 0 ? void 0 : _a48();
37672
+ var _a50;
37673
+ return (_a50 = docDefinitions.get(relativePath2)) === null || _a50 === void 0 ? void 0 : _a50();
37673
37674
  }
37674
37675
  });
37675
37676
  return {
@@ -37958,7 +37959,7 @@ var require_linkedMap = __commonJS({
37958
37959
  "../../node_modules/.pnpm/vscode-jsonrpc@8.1.0/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(exports) {
37959
37960
  "use strict";
37960
37961
  init_cjs_shims();
37961
- var _a48;
37962
+ var _a50;
37962
37963
  Object.defineProperty(exports, "__esModule", { value: !0 });
37963
37964
  exports.LRUCache = exports.LinkedMap = exports.Touch = void 0;
37964
37965
  var Touch;
@@ -37967,7 +37968,7 @@ var require_linkedMap = __commonJS({
37967
37968
  })(Touch = exports.Touch || (exports.Touch = {}));
37968
37969
  var LinkedMap = class {
37969
37970
  constructor() {
37970
- this[_a48] = "LinkedMap", this._map = /* @__PURE__ */ new Map(), this._head = void 0, this._tail = void 0, this._size = 0, this._state = 0;
37971
+ this[_a50] = "LinkedMap", this._map = /* @__PURE__ */ new Map(), this._head = void 0, this._tail = void 0, this._size = 0, this._state = 0;
37971
37972
  }
37972
37973
  clear() {
37973
37974
  this._map.clear(), this._head = void 0, this._tail = void 0, this._size = 0, this._state++;
@@ -38084,7 +38085,7 @@ var require_linkedMap = __commonJS({
38084
38085
  };
38085
38086
  return iterator;
38086
38087
  }
38087
- [(_a48 = Symbol.toStringTag, Symbol.iterator)]() {
38088
+ [(_a50 = Symbol.toStringTag, Symbol.iterator)]() {
38088
38089
  return this.entries();
38089
38090
  }
38090
38091
  trimOld(newSize) {
@@ -40559,8 +40560,8 @@ var DocumentUri2, URI3, integer2, uinteger2, Position2, Range2, Location2, Locat
40559
40560
  }
40560
40561
  Diagnostic3.create = create2;
40561
40562
  function is(value) {
40562
- var _a48, candidate = value;
40563
- 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((_a48 = candidate.codeDescription) === null || _a48 === void 0 ? void 0 : _a48.href)) && (Is2.string(candidate.source) || Is2.undefined(candidate.source)) && (Is2.undefined(candidate.relatedInformation) || Is2.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation2.is));
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));
40564
40565
  }
40565
40566
  Diagnostic3.is = is;
40566
40567
  })(Diagnostic2 || (Diagnostic2 = {}));
@@ -44303,36 +44304,36 @@ var require_ClientCapabilities = __commonJS({
44303
44304
  this.capabilities = capabilities, this.initializationOptions = initializationOptions;
44304
44305
  }
44305
44306
  get hasWorkspaceConfigurationSupport() {
44306
- var _a48, _b;
44307
- return !!(!((_b = (_a48 = this.capabilities) === null || _a48 === void 0 ? void 0 : _a48.workspace) === null || _b === void 0) && _b.configuration);
44307
+ var _a50, _b;
44308
+ return !!(!((_b = (_a50 = this.capabilities) === null || _a50 === void 0 ? void 0 : _a50.workspace) === null || _b === void 0) && _b.configuration);
44308
44309
  }
44309
44310
  get hasApplyEditSupport() {
44310
- var _a48, _b;
44311
- return !!(!((_b = (_a48 = this.capabilities) === null || _a48 === void 0 ? void 0 : _a48.workspace) === null || _b === void 0) && _b.applyEdit);
44311
+ var _a50, _b;
44312
+ return !!(!((_b = (_a50 = this.capabilities) === null || _a50 === void 0 ? void 0 : _a50.workspace) === null || _b === void 0) && _b.applyEdit);
44312
44313
  }
44313
44314
  get hasWorkspaceFoldersSupport() {
44314
- var _a48, _b;
44315
- return !!(!((_b = (_a48 = this.capabilities) === null || _a48 === void 0 ? void 0 : _a48.workspace) === null || _b === void 0) && _b.workspaceFolders);
44315
+ var _a50, _b;
44316
+ return !!(!((_b = (_a50 = this.capabilities) === null || _a50 === void 0 ? void 0 : _a50.workspace) === null || _b === void 0) && _b.workspaceFolders);
44316
44317
  }
44317
44318
  get hasDidChangeConfigurationDynamicRegistrationSupport() {
44318
- var _a48, _b, _c;
44319
- return !!(!((_c = (_b = (_a48 = this.capabilities) === null || _a48 === void 0 ? void 0 : _a48.workspace) === null || _b === void 0 ? void 0 : _b.didChangeConfiguration) === null || _c === void 0) && _c.dynamicRegistration);
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);
44320
44321
  }
44321
44322
  get hasDidChangeWatchedFilesDynamicRegistrationSupport() {
44322
- var _a48, _b, _c;
44323
- return !!(!((_c = (_b = (_a48 = this.capabilities) === null || _a48 === void 0 ? void 0 : _a48.workspace) === null || _b === void 0 ? void 0 : _b.didChangeWatchedFiles) === null || _c === void 0) && _c.dynamicRegistration);
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);
44324
44325
  }
44325
44326
  get hasShowDocumentSupport() {
44326
- var _a48, _b;
44327
- return !!(!((_b = (_a48 = this.capabilities) === null || _a48 === void 0 ? void 0 : _a48.window) === null || _b === void 0) && _b.showDocument);
44327
+ var _a50, _b;
44328
+ return !!(!((_b = (_a50 = this.capabilities) === null || _a50 === void 0 ? void 0 : _a50.window) === null || _b === void 0) && _b.showDocument);
44328
44329
  }
44329
44330
  get hasProgressSupport() {
44330
- var _a48, _b;
44331
- return !!(!((_b = (_a48 = this.capabilities) === null || _a48 === void 0 ? void 0 : _a48.window) === null || _b === void 0) && _b.workDoneProgress);
44331
+ var _a50, _b;
44332
+ return !!(!((_b = (_a50 = this.capabilities) === null || _a50 === void 0 ? void 0 : _a50.window) === null || _b === void 0) && _b.workDoneProgress);
44332
44333
  }
44333
44334
  initializationOption(key, defaultValue) {
44334
- var _a48;
44335
- let direct = (_a48 = this.initializationOptions) === null || _a48 === void 0 ? void 0 : _a48[key];
44335
+ var _a50;
44336
+ let direct = (_a50 = this.initializationOptions) === null || _a50 === void 0 ? void 0 : _a50[key];
44336
44337
  if (direct !== void 0)
44337
44338
  return direct;
44338
44339
  let nested = pathGet(this.initializationOptions, key);
@@ -44419,7 +44420,7 @@ var require_ApplySuggestionProvider = __commonJS({
44419
44420
  exports.applySuggestionCommand = exports.ApplySuggestionProvider = void 0;
44420
44421
  var theme_check_common_1 = require_dist3(), vscode_languageserver_1 = require_main4(), BaseExecuteCommandProvider_1 = require_BaseExecuteCommandProvider(), ApplySuggestionProvider = class extends BaseExecuteCommandProvider_1.BaseExecuteCommandProvider {
44421
44422
  async execute(uri, version, anomalyId, suggestionIndex) {
44422
- var _a48;
44423
+ var _a50;
44423
44424
  if (!this.clientCapabilities.hasApplyEditSupport)
44424
44425
  return;
44425
44426
  let diagnostics = this.diagnosticsManager.get(uri), document2 = this.documentManager.get(uri);
@@ -44428,7 +44429,7 @@ var require_ApplySuggestionProvider = __commonJS({
44428
44429
  let anomaly = diagnostics.anomalies[anomalyId];
44429
44430
  if (!anomaly)
44430
44431
  return;
44431
- let offense = anomaly.offense, suggestion = (_a48 = offense.suggest) === null || _a48 === void 0 ? void 0 : _a48[suggestionIndex];
44432
+ let offense = anomaly.offense, suggestion = (_a50 = offense.suggest) === null || _a50 === void 0 ? void 0 : _a50[suggestionIndex];
44432
44433
  if (!suggestion)
44433
44434
  return;
44434
44435
  let corrector = (0, theme_check_common_1.createCorrector)(document2.type, document2.source);
@@ -44539,10 +44540,10 @@ var require_ExecuteCommandProvider = __commonJS({
44539
44540
  };
44540
44541
  }
44541
44542
  async execute(params) {
44542
- var _a48;
44543
+ var _a50;
44543
44544
  if (!isKnownCommand(params.command))
44544
44545
  return;
44545
- let provider = this.commands[params.command], args = (_a48 = params.arguments) !== null && _a48 !== void 0 ? _a48 : [];
44546
+ let provider = this.commands[params.command], args = (_a50 = params.arguments) !== null && _a50 !== void 0 ? _a50 : [];
44546
44547
  await provider.execute(...args);
44547
44548
  }
44548
44549
  };
@@ -44808,7 +44809,7 @@ var require_TypeSystem = __commonJS({
44808
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 {
44809
44810
  constructor(themeDocset, getThemeSettingsSchemaForURI, getMetafieldDefinitions) {
44810
44811
  this.themeDocset = themeDocset, this.getThemeSettingsSchemaForURI = getThemeSettingsSchemaForURI, this.getMetafieldDefinitions = getMetafieldDefinitions, this.objectMap = async (uri, ast) => {
44811
- var _a48, _b, _c, _d;
44812
+ var _a50, _b, _c, _d;
44812
44813
  let [objectMap, themeSettingProperties, metafieldDefinitionsObjectMap] = await Promise.all([
44813
44814
  this._objectMap(),
44814
44815
  this.themeSettingProperties(uri),
@@ -44816,7 +44817,7 @@ var require_TypeSystem = __commonJS({
44816
44817
  ]), result = {
44817
44818
  ...objectMap,
44818
44819
  settings: {
44819
- ...(_a48 = objectMap.settings) !== null && _a48 !== void 0 ? _a48 : {},
44820
+ ...(_a50 = objectMap.settings) !== null && _a50 !== void 0 ? _a50 : {},
44820
44821
  properties: themeSettingProperties
44821
44822
  },
44822
44823
  ...customMetafieldTypeEntries(objectMap.metafield),
@@ -44867,8 +44868,8 @@ var require_TypeSystem = __commonJS({
44867
44868
  this.contextualVariables(uri)
44868
44869
  ]);
44869
44870
  return globalVariables.concat(contextualVariables).reduce((table, objectEntry) => {
44870
- var _a48, _b;
44871
- return (_a48 = table[_b = objectEntry.name]) !== null && _a48 !== void 0 || (table[_b] = []), table[objectEntry.name].push({
44871
+ var _a50, _b;
44872
+ return (_a50 = table[_b = objectEntry.name]) !== null && _a50 !== void 0 || (table[_b] = []), table[objectEntry.name].push({
44872
44873
  identifier: objectEntry.name,
44873
44874
  type: objectEntryType(objectEntry),
44874
44875
  range: [0]
@@ -44894,10 +44895,10 @@ var require_TypeSystem = __commonJS({
44894
44895
  this.symbolsTable(partialAst, uri)
44895
44896
  ]);
44896
44897
  return Object.entries(symbolsTable).filter(([key, typeRanges]) => key.startsWith(partial) && typeRanges.some((typeRange) => isCorrectTypeRange(typeRange, node))).map(([identifier, typeRanges]) => {
44897
- var _a48;
44898
+ var _a50;
44898
44899
  let typeRange = (0, utils_1.findLast)(typeRanges, (typeRange2) => isCorrectTypeRange(typeRange2, node)), type = resolveTypeRangeType(typeRange.type, symbolsTable, objectMap, filtersMap);
44899
44900
  return {
44900
- entry: { ...(_a48 = objectMap[isArrayType(type) ? type.valueType : type]) !== null && _a48 !== void 0 ? _a48 : {}, name: identifier },
44901
+ entry: { ...(_a50 = objectMap[isArrayType(type) ? type.valueType : type]) !== null && _a50 !== void 0 ? _a50 : {}, name: identifier },
44901
44902
  type
44902
44903
  };
44903
44904
  });
@@ -45026,19 +45027,19 @@ var require_TypeSystem = __commonJS({
45026
45027
  },
45027
45028
  // This also covers tablerow
45028
45029
  ForMarkup(node, ancestors) {
45029
- var _a48;
45030
+ var _a50;
45030
45031
  let parentNode = ancestors.at(-1);
45031
45032
  return {
45032
45033
  identifier: node.variableName,
45033
45034
  type: LazyDeconstructedExpression(node.collection, node.position.start),
45034
- range: [parentNode.blockStartPosition.end, end((_a48 = parentNode.blockEndPosition) === null || _a48 === void 0 ? void 0 : _a48.end)]
45035
+ range: [parentNode.blockStartPosition.end, end((_a50 = parentNode.blockEndPosition) === null || _a50 === void 0 ? void 0 : _a50.end)]
45035
45036
  };
45036
45037
  },
45037
45038
  // {% capture foo %}
45038
45039
  // ...
45039
45040
  // {% endcapture}
45040
45041
  LiquidTag(node) {
45041
- var _a48, _b;
45042
+ var _a50, _b;
45042
45043
  if (node.name === "capture" && typeof node.markup != "string")
45043
45044
  return {
45044
45045
  identifier: node.markup.name,
@@ -45049,7 +45050,7 @@ var require_TypeSystem = __commonJS({
45049
45050
  return {
45050
45051
  identifier: node.name,
45051
45052
  type: node.name,
45052
- range: [node.blockStartPosition.end, end((_a48 = node.blockEndPosition) === null || _a48 === void 0 ? void 0 : _a48.end)]
45053
+ range: [node.blockStartPosition.end, end((_a50 = node.blockEndPosition) === null || _a50 === void 0 ? void 0 : _a50.end)]
45053
45054
  };
45054
45055
  if (["for", "tablerow"].includes(node.name))
45055
45056
  return {
@@ -45071,8 +45072,8 @@ var require_TypeSystem = __commonJS({
45071
45072
  };
45072
45073
  }
45073
45074
  }).sort(({ range: [startA] }, { range: [startB] }) => startA - startB).reduce((table, typeRange) => {
45074
- var _a48, _b;
45075
- return (_a48 = table[_b = typeRange.identifier]) !== null && _a48 !== void 0 || (table[_b] = []), table[typeRange.identifier].push(typeRange), table;
45075
+ var _a50, _b;
45076
+ return (_a50 = table[_b = typeRange.identifier]) !== null && _a50 !== void 0 || (table[_b] = []), table[typeRange.identifier].push(typeRange), table;
45076
45077
  }, seedSymbolsTable);
45077
45078
  }
45078
45079
  function resolveTypeRangeType(typeRangeType, symbolsTable, objectMap, filtersMap) {
@@ -45090,9 +45091,9 @@ var require_TypeSystem = __commonJS({
45090
45091
  }
45091
45092
  }
45092
45093
  function inferType(thing, symbolsTable, objectMap, filtersMap) {
45093
- var _a48, _b;
45094
+ var _a50, _b;
45094
45095
  if (typeof thing == "string")
45095
- return (_b = (_a48 = objectMap[thing]) === null || _a48 === void 0 ? void 0 : _a48.name) !== null && _b !== void 0 ? _b : exports.Untyped;
45096
+ return (_b = (_a50 = objectMap[thing]) === null || _a50 === void 0 ? void 0 : _a50.name) !== null && _b !== void 0 ? _b : exports.Untyped;
45096
45097
  switch (thing.type) {
45097
45098
  case liquid_html_parser_1.NodeTypes.Number:
45098
45099
  return "number";
@@ -45129,8 +45130,8 @@ var require_TypeSystem = __commonJS({
45129
45130
  }
45130
45131
  }
45131
45132
  function inferLiquidDocParamType(node, liquidDrops) {
45132
- var _a48;
45133
- let paramTypeValue = (_a48 = node.paramType) === null || _a48 === void 0 ? void 0 : _a48.value;
45133
+ var _a50;
45134
+ let paramTypeValue = (_a50 = node.paramType) === null || _a50 === void 0 ? void 0 : _a50.value;
45134
45135
  if (!paramTypeValue)
45135
45136
  return exports.Untyped;
45136
45137
  let validParamTypes = (0, theme_check_common_1.getValidParamTypes)(liquidDrops), parsedParamType = (0, theme_check_common_1.parseParamType)(new Set(validParamTypes.keys()), paramTypeValue);
@@ -45176,7 +45177,7 @@ var require_TypeSystem = __commonJS({
45176
45177
  return exports.Untyped;
45177
45178
  }
45178
45179
  function inferPseudoTypePropertyType(curr, lookup3, objectMap) {
45179
- var _a48;
45180
+ var _a50;
45180
45181
  let parentEntry = objectMap[curr];
45181
45182
  if (lookup3.type !== liquid_html_parser_1.NodeTypes.String)
45182
45183
  return exports.Untyped;
@@ -45196,7 +45197,7 @@ var require_TypeSystem = __commonJS({
45196
45197
  }
45197
45198
  return exports.Untyped;
45198
45199
  }
45199
- let propertyName = lookup3.value, property = (_a48 = parentEntry.properties) === null || _a48 === void 0 ? void 0 : _a48.find((property2) => property2.name === propertyName);
45200
+ let propertyName = lookup3.value, property = (_a50 = parentEntry.properties) === null || _a50 === void 0 ? void 0 : _a50.find((property2) => property2.name === propertyName);
45200
45201
  return property ? objectEntryType(property) : exports.Untyped;
45201
45202
  }
45202
45203
  function filterEntryReturnType(entry) {
@@ -45324,18 +45325,18 @@ var require_TypeSystem = __commonJS({
45324
45325
  file_reference: exports.Untyped
45325
45326
  }), REFERENCE_TYPE_METAFIELDS = Object.entries(METAFIELD_TYPE_TO_TYPE).filter(([metafieldType, _type]) => metafieldType.endsWith("_reference")).map(([_metafieldType, type]) => type);
45326
45327
  function metafieldReturnType(metafieldType) {
45327
- var _a48;
45328
+ var _a50;
45328
45329
  let isArray = metafieldType.startsWith("list.");
45329
45330
  isArray && (metafieldType = metafieldType.split(".")[1]);
45330
- let type = "metafield_" + ((_a48 = METAFIELD_TYPE_TO_TYPE[metafieldType]) !== null && _a48 !== void 0 ? _a48 : exports.Untyped);
45331
+ let type = "metafield_" + ((_a50 = METAFIELD_TYPE_TO_TYPE[metafieldType]) !== null && _a50 !== void 0 ? _a50 : exports.Untyped);
45331
45332
  return isArray ? [{ type: `${type}_array`, name: "" }] : [{ type, name: "" }];
45332
45333
  }
45333
45334
  var customMetafieldTypeEntries = (0, utils_1.memo)((baseMetafieldEntry) => baseMetafieldEntry ? [
45334
45335
  .../* @__PURE__ */ new Set([...Object.values(METAFIELD_TYPE_TO_TYPE), ...theme_check_common_1.FETCHED_METAFIELD_CATEGORIES])
45335
45336
  ].reduce((map, type) => {
45336
- var _a48, _b;
45337
+ var _a50, _b;
45337
45338
  {
45338
- let metafieldEntry = JSON.parse(JSON.stringify(baseMetafieldEntry)), metafieldValueProp = (_a48 = metafieldEntry.properties) === null || _a48 === void 0 ? void 0 : _a48.find((prop) => prop.name === "value");
45339
+ let metafieldEntry = JSON.parse(JSON.stringify(baseMetafieldEntry)), metafieldValueProp = (_a50 = metafieldEntry.properties) === null || _a50 === void 0 ? void 0 : _a50.find((prop) => prop.name === "value");
45339
45340
  metafieldValueProp && (metafieldValueProp.return_type = [{ type, name: "" }], metafieldValueProp.description = "", metafieldEntry.name = `metafield_${type}`, map[metafieldEntry.name] = metafieldEntry);
45340
45341
  }
45341
45342
  {
@@ -45513,8 +45514,8 @@ var require_fix = __commonJS({
45513
45514
  }
45514
45515
  }
45515
45516
  shouldIncludeCursorPlaceholder() {
45516
- var _a48, _b;
45517
- let prevCharacter = (_a48 = this.markup.at(-1)) !== null && _a48 !== void 0 ? _a48 : "", 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);
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);
45518
45519
  return isInStringContext && this.stack.at(-2) === ">" && QUOTES.includes(prevCharacter) || isInHtmlContext && (/\s/.test(prevCharacter) || prevCharacter === "<" || prevPrevCharacter === "<" && prevCharacter === "/" || prevPrevCharacter === "%" && prevCharacter === "}") || isInLiquidContext && (!isInStringContext && [" ", " ", `
45519
45520
  `, ".", "{", "[", ","].includes(prevCharacter) || isInStringContext && prevPrevCharacter === "[");
45520
45521
  }
@@ -45953,7 +45954,7 @@ ${example}
45953
45954
  }
45954
45955
  exports.getParameterCompletionTemplate = getParameterCompletionTemplate;
45955
45956
  function formatLiquidDocContentMarkdown(name, docDefinition) {
45956
- var _a48, _b, _c;
45957
+ var _a50, _b, _c;
45957
45958
  let liquidDoc = docDefinition?.liquidDoc;
45958
45959
  if (!liquidDoc)
45959
45960
  return `### ${name}`;
@@ -45963,7 +45964,7 @@ ${example}
45963
45964
  parts.push("", "**Description:**", `
45964
45965
  `, description);
45965
45966
  }
45966
- if (!((_a48 = liquidDoc.parameters) === null || _a48 === void 0) && _a48.length) {
45967
+ if (!((_a50 = liquidDoc.parameters) === null || _a50 === void 0) && _a50.length) {
45967
45968
  let parameters = liquidDoc.parameters.map((param) => formatLiquidDocParameter(param)).join(`
45968
45969
  `);
45969
45970
  parts.push("", "**Parameters:**", parameters);
@@ -45994,7 +45995,7 @@ var require_ContentForParameterCompletionProvider = __commonJS({
45994
45995
  this.getDocDefinitionForURI = getDocDefinitionForURI;
45995
45996
  }
45996
45997
  async completions(params) {
45997
- var _a48;
45998
+ var _a50;
45998
45999
  if (!params.completionContext)
45999
46000
  return [];
46000
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;
@@ -46004,7 +46005,7 @@ var require_ContentForParameterCompletionProvider = __commonJS({
46004
46005
  return [];
46005
46006
  let completionItems = this.staticCompletions(node, parentNode.contentForType.value == "blocks", params.document);
46006
46007
  if (parentNode.contentForType.value === "block") {
46007
- let typeArg = (_a48 = parentNode.args.find((arg) => arg.name === "type")) === null || _a48 === void 0 ? void 0 : _a48.value;
46008
+ let typeArg = (_a50 = parentNode.args.find((arg) => arg.name === "type")) === null || _a50 === void 0 ? void 0 : _a50.value;
46008
46009
  if (typeArg?.type === liquid_html_parser_1.NodeTypes.String) {
46009
46010
  let snippetDefinition = await this.getDocDefinitionForURI(params.textDocument.uri, "blocks", typeArg.value);
46010
46011
  completionItems.push(...this.liquidDocParameterCompletions(node, params.document, snippetDefinition));
@@ -46014,8 +46015,8 @@ var require_ContentForParameterCompletionProvider = __commonJS({
46014
46015
  return completionItems.filter((item) => !existingParams.includes(item.label));
46015
46016
  }
46016
46017
  textEdit(node, document2, name, textTemplate = `${name}: '$1'`) {
46017
- var _a48, _b;
46018
- let remainingText = document2.source.slice(node.position.end), match2 = remainingText.match(/^(.*?)\s*(?=,|\||-?\}\}|-?\%\})|^(.*)$/), offset = match2 ? match2[0].trimEnd().length : remainingText.length, existingParameterOffset = (_b = (_a48 = remainingText.match(/[^a-zA-Z]/)) === null || _a48 === void 0 ? void 0 : _a48.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;
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;
46019
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 += ", ")), {
46020
46021
  textEdit: vscode_languageserver_1.TextEdit.replace({
46021
46022
  start,
@@ -46043,8 +46044,8 @@ var require_ContentForParameterCompletionProvider = __commonJS({
46043
46044
  });
46044
46045
  }
46045
46046
  liquidDocParameterCompletions(node, document2, docDefinition) {
46046
- var _a48;
46047
- return (((_a48 = docDefinition?.liquidDoc) === null || _a48 === void 0 ? void 0 : _a48.parameters) || []).map((liquidDocParam) => {
46047
+ var _a50;
46048
+ return (((_a50 = docDefinition?.liquidDoc) === null || _a50 === void 0 ? void 0 : _a50.parameters) || []).map((liquidDocParam) => {
46048
46049
  let { textEdit, format: format5 } = this.textEdit(node, document2, liquidDocParam.name, (0, liquidDoc_1.getParameterCompletionTemplate)(liquidDocParam.name, liquidDocParam.type));
46049
46050
  return {
46050
46051
  label: liquidDocParam.name,
@@ -52887,10 +52888,10 @@ var require_HtmlTagCompletionProvider = __commonJS({
52887
52888
  };
52888
52889
  }
52889
52890
  function grandParentCloseOption(grandParentNode) {
52890
- var _a48;
52891
+ var _a50;
52891
52892
  let grandParentName = getGrandParentName(grandParentNode);
52892
52893
  return grandParentName ? [
52893
- (_a48 = docset_1.HtmlData.tags.find((tag) => tag.name === grandParentName)) !== null && _a48 !== void 0 ? _a48 : {
52894
+ (_a50 = docset_1.HtmlData.tags.find((tag) => tag.name === grandParentName)) !== null && _a50 !== void 0 ? _a50 : {
52894
52895
  name: grandParentName,
52895
52896
  description: "",
52896
52897
  attributes: [],
@@ -52939,13 +52940,13 @@ var require_HtmlAttributeCompletionProvider = __commonJS({
52939
52940
  // Find the range of the attribute partial. If the attribute contains any liquid code, the range
52940
52941
  // will end before the first character of the liquid block.
52941
52942
  attributeTagRange(node, document2) {
52942
- var _a48, _b;
52943
+ var _a50, _b;
52943
52944
  if (node.type === "TextNode" && node.value === params_1.CURSOR)
52944
52945
  return {
52945
52946
  start: document2.textDocument.positionAt(node.position.start),
52946
52947
  end: document2.textDocument.positionAt(node.position.start)
52947
52948
  };
52948
- let sourcePartialPastCursor = document2.source.slice(node.position.end), attributeEndOffset = (_b = (_a48 = sourcePartialPastCursor.match(/[\s=]|\{%|\{\{|>/)) === null || _a48 === void 0 ? void 0 : _a48.index) !== null && _b !== void 0 ? _b : sourcePartialPastCursor.length;
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;
52949
52950
  return {
52950
52951
  start: document2.textDocument.positionAt(node.position.start),
52951
52952
  end: document2.textDocument.positionAt(node.position.end + attributeEndOffset)
@@ -52954,9 +52955,9 @@ var require_HtmlAttributeCompletionProvider = __commonJS({
52954
52955
  };
52955
52956
  exports.HtmlAttributeCompletionProvider = HtmlAttributeCompletionProvider;
52956
52957
  function getOptions2(partial, parentNodeName) {
52957
- var _a48;
52958
+ var _a50;
52958
52959
  let tag = docset_1.HtmlData.tags.find((tag2) => tag2.name === parentNodeName);
52959
- return [...(_a48 = tag?.attributes) !== null && _a48 !== void 0 ? _a48 : [], ...docset_1.HtmlData.globalAttributes].filter((x) => x.name.startsWith(partial));
52960
+ return [...(_a50 = tag?.attributes) !== null && _a50 !== void 0 ? _a50 : [], ...docset_1.HtmlData.globalAttributes].filter((x) => x.name.startsWith(partial));
52960
52961
  }
52961
52962
  function toCompletionItem(tag, attributeTagRange, hasExistingAttributeValue, hasLiquidTag) {
52962
52963
  let insertSnippet = (!tag.valueSet || tag.valueSet !== "v") && !hasExistingAttributeValue && !hasLiquidTag;
@@ -52985,13 +52986,13 @@ var require_HtmlAttributeValueCompletionProvider = __commonJS({
52985
52986
  constructor() {
52986
52987
  }
52987
52988
  async completions(params) {
52988
- var _a48, _b;
52989
+ var _a50, _b;
52989
52990
  if (!params.completionContext)
52990
52991
  return [];
52991
52992
  let { node, ancestors } = params.completionContext, attributeNode = (0, utils_1.findLast)(ancestors, utils_1.isHtmlAttribute), tagNode = (0, utils_1.findLast)(ancestors, utils_1.isNamedHtmlElementNode);
52992
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))
52993
52994
  return [];
52994
- 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 = (_a48 = docset_1.HtmlData.globalAttributes.find((attr) => attr.name === attrName)) !== null && _a48 !== void 0 ? _a48 : tagEntry?.attributes.find((attr) => attr.name === attrName), valueSetName = attribute?.valueSet, valueSetEntry = docset_1.HtmlData.valueSets.find((valueSet) => valueSet.name === valueSetName);
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);
52995
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));
52996
52997
  }
52997
52998
  };
@@ -53020,8 +53021,8 @@ var require_FilterCompletionProvider = __commonJS({
53020
53021
  constructor(typeSystem) {
53021
53022
  this.typeSystem = typeSystem, this.options = (0, utils_1.memoize)(async (inputType) => {
53022
53023
  let filterEntries = await this.typeSystem.filterEntries(), options = filterEntries.filter((entry) => {
53023
- var _a48;
53024
- return (_a48 = entry.syntax) === null || _a48 === void 0 ? void 0 : _a48.startsWith(inputType);
53024
+ var _a50;
53025
+ return (_a50 = entry.syntax) === null || _a50 === void 0 ? void 0 : _a50.startsWith(inputType);
53025
53026
  }).sort(common_1.sortByName);
53026
53027
  if (inputType === "variable") {
53027
53028
  let entriesWithoutSyntax = filterEntries.filter((entry) => !entry.syntax);
@@ -53056,8 +53057,8 @@ var require_FilterCompletionProvider = __commonJS({
53056
53057
  });
53057
53058
  }
53058
53059
  textEdit(node, document2, entry) {
53059
- var _a48, _b;
53060
- 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 = (_a48 = remainingText.match(/[^a-zA-Z_]/)) === null || _a48 === void 0 ? void 0 : _a48.index) !== null && _b !== void 0 ? _b : remainingText.length;
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;
53061
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), {
53062
53063
  textEdit: vscode_languageserver_1.TextEdit.replace({
53063
53064
  start,
@@ -53072,9 +53073,9 @@ var require_FilterCompletionProvider = __commonJS({
53072
53073
  return { ...entry, deprioritized: !0 };
53073
53074
  }
53074
53075
  function appendRequiredParemeters(entry) {
53075
- var _a48;
53076
+ var _a50;
53076
53077
  let insertText = entry.name, insertStyle = vscode_languageserver_1.InsertTextFormat.PlainText;
53077
- if (!(!((_a48 = entry?.parameters) === null || _a48 === void 0) && _a48.length))
53078
+ if (!(!((_a50 = entry?.parameters) === null || _a50 === void 0) && _a50.length))
53078
53079
  return { insertText, insertStyle };
53079
53080
  let requiredPositionalParams = entry.parameters.filter((p) => p.required && p.positional).map(formatParameter), requiredNamedParams = entry.parameters.filter((p) => p.required && !p.positional).map(formatParameter);
53080
53081
  return requiredPositionalParams.length && (insertText += `: ${requiredPositionalParams.join(", ")}`, insertStyle = vscode_languageserver_1.InsertTextFormat.Snippet), requiredNamedParams.length && (insertText += `: ${requiredNamedParams.join(", ")}`, insertStyle = vscode_languageserver_1.InsertTextFormat.Snippet), {
@@ -53128,8 +53129,8 @@ var require_FilterNamedParameterCompletionProvider = __commonJS({
53128
53129
  }) : [];
53129
53130
  }
53130
53131
  textEdit(node, document2, name, type) {
53131
- var _a48, _b;
53132
- let remainingText = document2.source.slice(node.position.end), match2 = remainingText.match(/^(.*?)\s*(?=,|\||-?\}\}|-?\%\})|^(.*)$/), offset = match2 ? match2[0].length : remainingText.length, existingParameterOffset = (_b = (_a48 = remainingText.match(/[^a-zA-Z]/)) === null || _a48 === void 0 ? void 0 : _a48.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;
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;
53133
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), {
53134
53135
  textEdit: vscode_languageserver_1.TextEdit.replace({
53135
53136
  start,
@@ -53239,8 +53240,8 @@ var require_LiquidTagsCompletionProvider = __commonJS({
53239
53240
  return textDocument.getText(vscode_languageserver_1.Range.create(startPosition, endPosition)).trim() !== "";
53240
53241
  }
53241
53242
  function withCorrectWhitespaceStrippingCharacters(snippet, whitespaceStart, whitespaceEnd) {
53242
- var _a48, _b;
53243
- let starti = 0, endi = 0, countOfEndTags = (_b = (_a48 = snippet.match(/%\}/g)) === null || _a48 === void 0 ? void 0 : _a48.length) !== null && _b !== void 0 ? _b : 0;
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;
53244
53245
  return snippet = snippet.replace(/\{%/g, () => starti++ === 0 ? "{%" + whitespaceStart : "{%" + whitespaceEnd).replace(/%\}/g, () => countOfEndTags > 1 && endi++ === countOfEndTags - 1 ? whitespaceStart + "%}" : whitespaceEnd + "%}"), snippet;
53245
53246
  }
53246
53247
  function findEndOfBlockStart(context, node, isInLiquidLiquidTag) {
@@ -53279,7 +53280,7 @@ var require_ObjectAttributeCompletionProvider = __commonJS({
53279
53280
  this.typeSystem = typeSystem, this.getThemeSettingsSchema = getThemeSettingsSchema;
53280
53281
  }
53281
53282
  async completions(params) {
53282
- var _a48;
53283
+ var _a50;
53283
53284
  if (!params.completionContext)
53284
53285
  return [];
53285
53286
  let { partialAst, node } = params.completionContext;
@@ -53297,7 +53298,7 @@ var require_ObjectAttributeCompletionProvider = __commonJS({
53297
53298
  return completionItems(ArrayCoreProperties.map((name) => ({ name })), partial);
53298
53299
  if (parentType === "string")
53299
53300
  return completionItems(StringCoreProperties.map((name) => ({ name })), partial);
53300
- let parentTypeProperties = ((_a48 = (await this.typeSystem.objectMap(params.textDocument.uri, partialAst))[parentType]) === null || _a48 === void 0 ? void 0 : _a48.properties) || [];
53301
+ let parentTypeProperties = ((_a50 = (await this.typeSystem.objectMap(params.textDocument.uri, partialAst))[parentType]) === null || _a50 === void 0 ? void 0 : _a50.properties) || [];
53301
53302
  return completionItems(parentTypeProperties, partial);
53302
53303
  }
53303
53304
  };
@@ -53422,8 +53423,8 @@ var require_TranslationCompletionProvider = __commonJS({
53422
53423
  if (!node || node.type !== liquid_html_parser_1.NodeTypes.String || !parentNode || parentNode.type !== liquid_html_parser_1.NodeTypes.LiquidVariable || !document2)
53423
53424
  return [];
53424
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) => {
53425
- var _a48;
53426
- return !(!((_a48 = option.path[0]) === null || _a48 === void 0) && _a48.startsWith("shopify")) || partial.startsWith("shopify");
53426
+ var _a50;
53427
+ return !(!((_a50 = option.path[0]) === null || _a50 === void 0) && _a50.startsWith("shopify")) || partial.startsWith("shopify");
53427
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;
53428
53429
  shouldAppendTranslateFilter ? (postFix = quote + " | t", replaceRange = {
53429
53430
  start: textDocument.positionAt(node.position.start + 1),
@@ -53436,8 +53437,8 @@ var require_TranslationCompletionProvider = __commonJS({
53436
53437
  });
53437
53438
  let insertTextStartIndex = partial.lastIndexOf(".") + 1;
53438
53439
  return options.map(({ path: path3, translation }) => {
53439
- var _a48;
53440
- let params2 = (0, translations_1.extractParams)(typeof translation == "string" ? translation : (_a48 = Object.values(translation)[0]) !== null && _a48 !== void 0 ? _a48 : ""), parameters = (0, translations_1.paramsString)(params2);
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);
53441
53442
  return {
53442
53443
  label: quote + path3.join(".") + quote + " | t",
53443
53444
  insertText: path3.join(".").slice(insertTextStartIndex),
@@ -53499,13 +53500,13 @@ var require_RenderSnippetParameterCompletionProvider = __commonJS({
53499
53500
  this.getDocDefinitionForURI = getDocDefinitionForURI;
53500
53501
  }
53501
53502
  async completions(params) {
53502
- var _a48, _b;
53503
+ var _a50, _b;
53503
53504
  if (!params.completionContext)
53504
53505
  return [];
53505
53506
  let { node, ancestors } = params.completionContext, parentNode = ancestors.at(-1);
53506
53507
  if (!node || !parentNode || node.type !== liquid_html_parser_1.NodeTypes.VariableLookup || parentNode.type !== liquid_html_parser_1.NodeTypes.RenderMarkup || parentNode.snippet.type !== "String")
53507
53508
  return [];
53508
- let userInputStr = ((_a48 = node.name) === null || _a48 === void 0 ? void 0 : _a48.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;
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;
53509
53510
  if (!liquidDocParams)
53510
53511
  return [];
53511
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);
@@ -53536,7 +53537,7 @@ var require_LiquidDocTagCompletionProvider = __commonJS({
53536
53537
  constructor() {
53537
53538
  }
53538
53539
  async completions(params) {
53539
- var _a48;
53540
+ var _a50;
53540
53541
  if (!params.completionContext)
53541
53542
  return [];
53542
53543
  if (!(0, theme_check_common_1.filePathSupportsLiquidDoc)(params.document.uri))
@@ -53550,8 +53551,8 @@ var require_LiquidDocTagCompletionProvider = __commonJS({
53550
53551
  case liquid_html_parser_1.NodeTypes.LiquidDocDescriptionNode:
53551
53552
  case liquid_html_parser_1.NodeTypes.LiquidDocExampleNode:
53552
53553
  case liquid_html_parser_1.NodeTypes.LiquidDocPromptNode:
53553
- let lastLine = (_a48 = node.content.value.split(`
53554
- `).at(-1)) === null || _a48 === void 0 ? void 0 : _a48.trim();
53554
+ let lastLine = (_a50 = node.content.value.split(`
53555
+ `).at(-1)) === null || _a50 === void 0 ? void 0 : _a50.trim();
53555
53556
  return lastLine?.startsWith("@") ? this.createCompletionItems(lastLine) : [];
53556
53557
  default:
53557
53558
  return [];
@@ -89107,8 +89108,8 @@ var require_TranslationStringDefinitionProvider = __commonJS({
89107
89108
  this.documentManager = documentManager, this.getDefaultLocaleSourceCode = getDefaultLocaleSourceCode;
89108
89109
  }
89109
89110
  async definitions(params, node, ancestors) {
89110
- var _a48;
89111
- let doc = (_a48 = this.documentManager.get(params.textDocument.uri)) === null || _a48 === void 0 ? void 0 : _a48.textDocument;
89111
+ var _a50;
89112
+ let doc = (_a50 = this.documentManager.get(params.textDocument.uri)) === null || _a50 === void 0 ? void 0 : _a50.textDocument;
89112
89113
  if (!doc)
89113
89114
  return [];
89114
89115
  if (node.type !== liquid_html_parser_1.NodeTypes.String)
@@ -89390,8 +89391,8 @@ var require_HtmlTagNameDocumentHighlightsProvider = __commonJS({
89390
89391
  this.documentManager = documentManager;
89391
89392
  }
89392
89393
  async documentHighlights(node, ancestors, params) {
89393
- var _a48;
89394
- let textDocument = (_a48 = this.documentManager.get(params.textDocument.uri)) === null || _a48 === void 0 ? void 0 : _a48.textDocument;
89394
+ var _a50;
89395
+ let textDocument = (_a50 = this.documentManager.get(params.textDocument.uri)) === null || _a50 === void 0 ? void 0 : _a50.textDocument;
89395
89396
  if (!textDocument)
89396
89397
  return null;
89397
89398
  let ranges = (0, htmlTagNames_1.getHtmlElementNameRanges)(node, ancestors, params, textDocument);
@@ -89414,8 +89415,8 @@ var require_LiquidBlockTagDocumentHighlightsProvider = __commonJS({
89414
89415
  this.documentManager = documentManager;
89415
89416
  }
89416
89417
  async documentHighlights(node, ancestors, params) {
89417
- var _a48;
89418
- let textDocument = (_a48 = this.documentManager.get(params.textDocument.uri)) === null || _a48 === void 0 ? void 0 : _a48.textDocument;
89418
+ var _a50;
89419
+ let textDocument = (_a50 = this.documentManager.get(params.textDocument.uri)) === null || _a50 === void 0 ? void 0 : _a50.textDocument;
89419
89420
  if (!textDocument || (isLiquidBranch(node) && (node = ancestors.at(-1)), !isLiquidBlock(node) || !node.blockEndPosition))
89420
89421
  return null;
89421
89422
  let nameOffset = node.source.indexOf(node.name, node.blockStartPosition.start), endblockNameOffset = node.source.indexOf("end" + node.name, node.blockEndPosition.start), ranges = [
@@ -89482,12 +89483,12 @@ var require_DocumentHighlightsProvider = __commonJS({
89482
89483
  ];
89483
89484
  }
89484
89485
  async documentHighlights(params) {
89485
- var _a48;
89486
+ var _a50;
89486
89487
  let document2 = this.documentManager.get(params.textDocument.uri);
89487
89488
  if (!document2 || document2.type !== theme_check_common_1.SourceCodeType.LiquidHtml || document2.ast instanceof Error)
89488
89489
  return exports.PREVENT_DEFAULT;
89489
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));
89490
- return (_a48 = (await Promise.all(promises)).find(Boolean)) !== null && _a48 !== void 0 ? _a48 : exports.PREVENT_DEFAULT;
89491
+ return (_a50 = (await Promise.all(promises)).find(Boolean)) !== null && _a50 !== void 0 ? _a50 : exports.PREVENT_DEFAULT;
89491
89492
  }
89492
89493
  };
89493
89494
  exports.DocumentHighlightsProvider = DocumentHighlightsProvider;
@@ -89695,11 +89696,11 @@ var require_DocumentManager = __commonJS({
89695
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));
89696
89697
  }
89697
89698
  augmentedSourceCode(uri, source, version) {
89698
- var _a48;
89699
+ var _a50;
89699
89700
  let sourceCode = (0, theme_check_common_1.toSourceCode)(uri, source, version), textDocument = vscode_languageserver_textdocument_1.TextDocument.create(
89700
89701
  uri,
89701
89702
  sourceCode.type,
89702
- (_a48 = sourceCode.version) !== null && _a48 !== void 0 ? _a48 : 0,
89703
+ (_a50 = sourceCode.version) !== null && _a50 !== void 0 ? _a50 : 0,
89703
89704
  // create doesn't let us put undefined here.
89704
89705
  sourceCode.source
89705
89706
  );
@@ -89918,14 +89919,14 @@ var require_HtmlElementAutoclosingOnTypeFormattingProvider = __commonJS({
89918
89919
  };
89919
89920
  exports.HtmlElementAutoclosingOnTypeFormattingProvider = HtmlElementAutoclosingOnTypeFormattingProvider;
89920
89921
  function nodeAtCursor(textDocument, position) {
89921
- var _a48;
89922
+ var _a50;
89922
89923
  let text = textDocument.getText(vscode_languageserver_protocol_1.Range.create(vscode_languageserver_protocol_1.Position.create(0, 0), position));
89923
89924
  try {
89924
89925
  let ast = (0, liquid_html_parser_1.toLiquidHtmlAST)(text, {
89925
89926
  allowUnclosedDocumentNode: !0,
89926
89927
  mode: "tolerant"
89927
89928
  }), [node, ancestors] = (0, theme_check_common_1.findCurrentNode)(ast, textDocument.offsetAt(position));
89928
- return ((_a48 = ancestors.at(-1)) === null || _a48 === void 0 ? void 0 : _a48.type) === liquid_html_parser_1.NodeTypes.HtmlElement || node.type === liquid_html_parser_1.NodeTypes.LiquidBranch ? ancestors.at(-1) : node;
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;
89929
89930
  } catch {
89930
89931
  return null;
89931
89932
  }
@@ -89955,9 +89956,9 @@ var require_OnTypeFormattingProvider = __commonJS({
89955
89956
  ];
89956
89957
  }
89957
89958
  async onTypeFormatting(params) {
89958
- var _a48;
89959
+ var _a50;
89959
89960
  let document2 = this.documentManager.get(params.textDocument.uri);
89960
- return document2 && (_a48 = this.providers.map((provider) => provider.onTypeFormatting(document2, params)).find((result) => result !== null)) !== null && _a48 !== void 0 ? _a48 : null;
89961
+ return document2 && (_a50 = this.providers.map((provider) => provider.onTypeFormatting(document2, params)).find((result) => result !== null)) !== null && _a50 !== void 0 ? _a50 : null;
89961
89962
  }
89962
89963
  };
89963
89964
  exports.OnTypeFormattingProvider = OnTypeFormattingProvider;
@@ -90044,14 +90045,14 @@ var require_LiquidFilterArgumentHoverProvider = __commonJS({
90044
90045
  this.themeDocset = themeDocset;
90045
90046
  }
90046
90047
  async hover(currentNode, ancestors) {
90047
- var _a48;
90048
+ var _a50;
90048
90049
  let parentNode = ancestors.at(-1);
90049
90050
  if (!parentNode || parentNode.type !== liquid_html_parser_1.NodeTypes.LiquidFilter || currentNode.type !== liquid_html_parser_1.NodeTypes.NamedArgument)
90050
90051
  return null;
90051
90052
  let parentName = parentNode.name, entry = (await this.themeDocset.filters()).find((entry2) => entry2.name === parentName);
90052
90053
  if (!entry)
90053
90054
  return null;
90054
- let argument = (_a48 = entry.parameters) === null || _a48 === void 0 ? void 0 : _a48.find((argument2) => argument2.name === currentNode.name);
90055
+ let argument = (_a50 = entry.parameters) === null || _a50 === void 0 ? void 0 : _a50.find((argument2) => argument2.name === currentNode.name);
90055
90056
  return argument ? {
90056
90057
  contents: {
90057
90058
  kind: "markdown",
@@ -90076,7 +90077,7 @@ var require_LiquidObjectHoverProvider = __commonJS({
90076
90077
  this.typeSystem = typeSystem;
90077
90078
  }
90078
90079
  async hover(currentNode, ancestors, params) {
90079
- var _a48;
90080
+ var _a50;
90080
90081
  if (currentNode.type !== liquid_html_parser_1.NodeTypes.VariableLookup && currentNode.type !== liquid_html_parser_1.NodeTypes.AssignMarkup || !currentNode.name)
90081
90082
  return null;
90082
90083
  let node = currentNode;
@@ -90088,7 +90089,7 @@ var require_LiquidObjectHoverProvider = __commonJS({
90088
90089
  if (type === TypeSystem_1.Unknown)
90089
90090
  return null;
90090
90091
  if (!entry) {
90091
- let entryByName = (_a48 = objectMap[currentNode.name]) !== null && _a48 !== void 0 ? _a48 : {};
90092
+ let entryByName = (_a50 = objectMap[currentNode.name]) !== null && _a50 !== void 0 ? _a50 : {};
90092
90093
  return {
90093
90094
  contents: {
90094
90095
  kind: "markdown",
@@ -90123,7 +90124,7 @@ var require_LiquidObjectAttributeHoverProvider = __commonJS({
90123
90124
  this.typeSystem = typeSystem;
90124
90125
  }
90125
90126
  async hover(currentNode, ancestors, params) {
90126
- var _a48, _b;
90127
+ var _a50, _b;
90127
90128
  let parentNode = ancestors.at(-1), uri = params.textDocument.uri;
90128
90129
  if (currentNode.type !== liquid_html_parser_1.NodeTypes.String || !parentNode || parentNode.type !== liquid_html_parser_1.NodeTypes.VariableLookup || !parentNode.lookups.includes(currentNode))
90129
90130
  return null;
@@ -90135,7 +90136,7 @@ var require_LiquidObjectAttributeHoverProvider = __commonJS({
90135
90136
  let nodeType = await this.typeSystem.inferType({ ...parentNode, lookups: parentNode.lookups.slice(0, lookupIndex + 1) }, ancestors[0], uri);
90136
90137
  if ((0, TypeSystem_1.isArrayType)(nodeType) || nodeType === TypeSystem_1.Unknown)
90137
90138
  return null;
90138
- let entry2 = { ...(_a48 = objectMap[nodeType]) !== null && _a48 !== void 0 ? _a48 : {}, name: currentNode.value };
90139
+ let entry2 = { ...(_a50 = objectMap[nodeType]) !== null && _a50 !== void 0 ? _a50 : {}, name: currentNode.value };
90139
90140
  return {
90140
90141
  contents: {
90141
90142
  kind: "markdown",
@@ -90192,11 +90193,11 @@ var require_HtmlAttributeHoverProvider = __commonJS({
90192
90193
  exports.HtmlAttributeHoverProvider = void 0;
90193
90194
  var docset_1 = require_docset(), utils_1 = require_utils8(), HtmlAttributeHoverProvider = class {
90194
90195
  async hover(currentNode, ancestors) {
90195
- var _a48;
90196
+ var _a50;
90196
90197
  let attributeNode = ancestors.at(-1), tagNode = (0, utils_1.findLast)(ancestors, utils_1.isNamedHtmlElementNode);
90197
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))
90198
90199
  return null;
90199
- let name = currentNode.value, tagName = (0, utils_1.getCompoundName)(tagNode), tagEntry = docset_1.HtmlData.tags.find((tag) => tag.name === tagName), tagEntryAttributes = tagEntry?.attributes || [], attribute = (_a48 = docset_1.HtmlData.globalAttributes.find((attr) => attr.name === name)) !== null && _a48 !== void 0 ? _a48 : tagEntryAttributes.find((attr) => attr.name === name);
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);
90200
90201
  return attribute ? {
90201
90202
  contents: {
90202
90203
  kind: "markdown",
@@ -90218,11 +90219,11 @@ var require_HtmlAttributeValueHoverProvider = __commonJS({
90218
90219
  exports.HtmlAttributeValueHoverProvider = void 0;
90219
90220
  var liquid_html_parser_1 = require_dist2(), docset_1 = require_docset(), utils_1 = require_utils8(), HtmlAttributeValueHoverProvider = class {
90220
90221
  async hover(currentNode, ancestors) {
90221
- var _a48;
90222
+ var _a50;
90222
90223
  let attributeNode = (0, utils_1.findLast)(ancestors, utils_1.isHtmlAttribute), tagNode = (0, utils_1.findLast)(ancestors, utils_1.isNamedHtmlElementNode);
90223
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))
90224
90225
  return null;
90225
- 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 = (_a48 = docset_1.HtmlData.globalAttributes.find((attr) => attr.name === attrName)) !== null && _a48 !== void 0 ? _a48 : 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);
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);
90226
90227
  return valueEntry ? {
90227
90228
  contents: {
90228
90229
  kind: "markdown",
@@ -90247,11 +90248,11 @@ var require_TranslationHoverProvider = __commonJS({
90247
90248
  this.getTranslationsForUri = getTranslationsForUri, this.documentManager = documentManager;
90248
90249
  }
90249
90250
  async hover(currentNode, ancestors, params) {
90250
- var _a48;
90251
+ var _a50;
90251
90252
  let parentNode = ancestors.at(-1);
90252
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))
90253
90254
  return null;
90254
- let translations = await this.getTranslationsForUri(params.textDocument.uri), translation = (0, translations_1.translationValue)(currentNode.value, translations), document2 = (_a48 = this.documentManager.get(params.textDocument.uri)) === null || _a48 === void 0 ? void 0 : _a48.textDocument;
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;
90255
90256
  return !translation || !document2 ? null : {
90256
90257
  contents: {
90257
90258
  kind: "markdown",
@@ -90308,11 +90309,11 @@ var require_RenderSnippetParameterHoverProvider = __commonJS({
90308
90309
  this.getDocDefinitionForURI = getDocDefinitionForURI;
90309
90310
  }
90310
90311
  async hover(currentNode, ancestors, params) {
90311
- var _a48, _b;
90312
+ var _a50, _b;
90312
90313
  let parentNode = ancestors.at(-1);
90313
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)
90314
90315
  return null;
90315
- let docDefinition = await this.getDocDefinitionForURI(params.textDocument.uri, "snippets", parentNode.snippet.value), paramName = currentNode.name, hoveredParameter = (_b = (_a48 = docDefinition?.liquidDoc) === null || _a48 === void 0 ? void 0 : _a48.parameters) === null || _b === void 0 ? void 0 : _b.find((parameter) => parameter.name === paramName);
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);
90316
90317
  return hoveredParameter ? {
90317
90318
  contents: {
90318
90319
  kind: "markdown",
@@ -90391,11 +90392,11 @@ var require_LiquidDocTagHoverProvider = __commonJS({
90391
90392
  this.documentManager = documentManager;
90392
90393
  }
90393
90394
  async hover(currentNode, ancestors, params) {
90394
- var _a48;
90395
+ var _a50;
90395
90396
  let parentNode = ancestors.at(-1);
90396
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)
90397
90398
  return null;
90398
- let document2 = (_a48 = this.documentManager.get(params.textDocument.uri)) === null || _a48 === void 0 ? void 0 : _a48.textDocument;
90399
+ let document2 = (_a50 = this.documentManager.get(params.textDocument.uri)) === null || _a50 === void 0 ? void 0 : _a50.textDocument;
90399
90400
  if (document2 && document2.offsetAt(params.position) > currentNode.position.start + currentNode.name.length)
90400
90401
  return null;
90401
90402
  let docTagData = liquidDoc_1.SUPPORTED_LIQUID_DOC_TAG_HANDLES[currentNode.name];
@@ -90423,14 +90424,14 @@ var require_ContentForArgumentHoverProvider = __commonJS({
90423
90424
  this.getDocDefinitionForURI = getDocDefinitionForURI;
90424
90425
  }
90425
90426
  async hover(currentNode, ancestors, params) {
90426
- var _a48, _b;
90427
+ var _a50, _b;
90427
90428
  let parentNode = ancestors.at(-1);
90428
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)
90429
90430
  return null;
90430
90431
  let blockName = (0, theme_check_common_1.getBlockName)(parentNode);
90431
90432
  if (!blockName)
90432
90433
  return null;
90433
- let docDefinition = await this.getDocDefinitionForURI(params.textDocument.uri, "blocks", blockName), hoverArgument = (_b = (_a48 = docDefinition?.liquidDoc) === null || _a48 === void 0 ? void 0 : _a48.parameters) === null || _b === void 0 ? void 0 : _b.find((argument) => argument.name === currentNode.name);
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);
90434
90435
  return hoverArgument ? {
90435
90436
  contents: {
90436
90437
  kind: "markdown",
@@ -90501,12 +90502,12 @@ var require_HoverProvider = __commonJS({
90501
90502
  ];
90502
90503
  }
90503
90504
  async hover(params) {
90504
- var _a48;
90505
+ var _a50;
90505
90506
  let uri = params.textDocument.uri, document2 = this.documentManager.get(uri);
90506
90507
  if (document2?.type !== theme_check_common_1.SourceCodeType.LiquidHtml || document2.ast instanceof Error)
90507
90508
  return null;
90508
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));
90509
- return (_a48 = (await Promise.all(promises)).find(Boolean)) !== null && _a48 !== void 0 ? _a48 : null;
90510
+ return (_a50 = (await Promise.all(promises)).find(Boolean)) !== null && _a50 !== void 0 ? _a50 : null;
90510
90511
  }
90511
90512
  };
90512
90513
  exports.HoverProvider = HoverProvider;
@@ -90717,13 +90718,13 @@ var require_SchemaTranslationCompletionProvider = __commonJS({
90717
90718
  this.getDefaultSchemaTranslations = getDefaultSchemaTranslations;
90718
90719
  }
90719
90720
  async completeValue(context, path3) {
90720
- var _a48;
90721
+ var _a50;
90721
90722
  if (!(0, utils_1.isSectionOrBlockFile)(context.doc.uri) || !(0, RequestContext_1.isLiquidRequestContext)(context))
90722
90723
  return [];
90723
90724
  let { doc, parsed } = context, label = (0, theme_check_common_1.deepGet)(parsed, path3);
90724
90725
  if (!label || typeof label != "string" || !label.startsWith("t:"))
90725
90726
  return [];
90726
- if (((_a48 = /^t:(.*)/.exec(label)) === null || _a48 === void 0 ? void 0 : _a48[1]) === void 0)
90727
+ if (((_a50 = /^t:(.*)/.exec(label)) === null || _a50 === void 0 ? void 0 : _a50[1]) === void 0)
90727
90728
  return [];
90728
90729
  let translations = await this.getDefaultSchemaTranslations(doc.uri);
90729
90730
  return (0, translations_1.translationOptions)(translations).map((option) => {
@@ -90856,8 +90857,8 @@ var require_schemaSettings = __commonJS({
90856
90857
  }
90857
90858
  exports.schemaSettingsPropertyCompletionItems = schemaSettingsPropertyCompletionItems;
90858
90859
  function getSectionBlockByName(parsedSchema = {}, blockName) {
90859
- var _a48, _b;
90860
- return (_b = (_a48 = parsedSchema.blocks) === null || _a48 === void 0 ? void 0 : _a48.filter((block) => "name" in block)) === null || _b === void 0 ? void 0 : _b.find((block) => block.type === blockName);
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);
90861
90862
  }
90862
90863
  exports.getSectionBlockByName = getSectionBlockByName;
90863
90864
  }
@@ -90933,10 +90934,10 @@ var require_SettingsHoverProvider = __commonJS({
90933
90934
  return path3.at(0) === "default" && path3.at(1) === "settings" && path3.at(2) !== void 0 && typeof path3.at(2) == "string";
90934
90935
  }
90935
90936
  async function getSettingsLabel(doc, label) {
90936
- var _a48;
90937
+ var _a50;
90937
90938
  let schema = await doc.getSchema();
90938
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)))
90939
- return (_a48 = schema.parsed.settings.find((setting) => setting?.id === label)) === null || _a48 === void 0 ? void 0 : _a48.label;
90940
+ return (_a50 = schema.parsed.settings.find((setting) => setting?.id === label)) === null || _a50 === void 0 ? void 0 : _a50.label;
90940
90941
  }
90941
90942
  }
90942
90943
  });
@@ -90953,7 +90954,7 @@ var require_BlockSettingsPropertyCompletionProvider = __commonJS({
90953
90954
  this.getDefaultSchemaTranslations = getDefaultSchemaTranslations, this.getThemeBlockSchema = getThemeBlockSchema;
90954
90955
  }
90955
90956
  async completeProperty(context, path3) {
90956
- var _a48, _b;
90957
+ var _a50, _b;
90957
90958
  let { doc } = context;
90958
90959
  if (doc.type !== theme_check_common_1.SourceCodeType.LiquidHtml)
90959
90960
  return [];
@@ -90971,7 +90972,7 @@ var require_BlockSettingsPropertyCompletionProvider = __commonJS({
90971
90972
  return (0, schemaSettings_1.schemaSettingsPropertyCompletionItems)(localBlock.settings, translations);
90972
90973
  } else {
90973
90974
  let blockOriginSchema = await this.getThemeBlockSchema(doc.uri, blockType);
90974
- return !blockOriginSchema || (0, theme_check_common_1.isError)(blockOriginSchema.parsed) || !(0, BlockTypeCompletionProvider_1.isSectionOrBlockSchema)(blockOriginSchema) ? [] : !(!((_a48 = blockOriginSchema.parsed) === null || _a48 === void 0) && _a48.settings) || !Array.isArray((_b = blockOriginSchema.parsed) === null || _b === void 0 ? void 0 : _b.settings) ? [] : (0, schemaSettings_1.schemaSettingsPropertyCompletionItems)(blockOriginSchema.parsed.settings, translations);
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);
90975
90976
  }
90976
90977
  return [];
90977
90978
  }
@@ -91041,8 +91042,8 @@ var require_BlockSettingsHoverProvider = __commonJS({
91041
91042
  return settings !== void 0 && Array.isArray(settings);
91042
91043
  }
91043
91044
  function getSettingLabelById(settings, id) {
91044
- var _a48;
91045
- return (_a48 = settings.find((setting) => setting.id === id)) === null || _a48 === void 0 ? void 0 : _a48.label;
91045
+ var _a50;
91046
+ return (_a50 = settings.find((setting) => setting.id === id)) === null || _a50 === void 0 ? void 0 : _a50.label;
91046
91047
  }
91047
91048
  }
91048
91049
  });
@@ -91273,8 +91274,8 @@ var require_JSONLanguageService = __commonJS({
91273
91274
  }
91274
91275
  }
91275
91276
  async getSchemaForURI(uri) {
91276
- var _a48;
91277
- let schema = (_a48 = this.schemas[uri]) === null || _a48 === void 0 ? void 0 : _a48.schema;
91277
+ var _a50;
91278
+ let schema = (_a50 = this.schemas[uri]) === null || _a50 === void 0 ? void 0 : _a50.schema;
91278
91279
  return schema || `Could not get schema for '${uri}'`;
91279
91280
  }
91280
91281
  };
@@ -91343,10 +91344,10 @@ var require_HtmlTagNameLinkedRangesProvider = __commonJS({
91343
91344
  this.documentManager = documentManager;
91344
91345
  }
91345
91346
  async linkedEditingRanges(node, ancestors, params) {
91346
- var _a48;
91347
+ var _a50;
91347
91348
  if (!node || !ancestors)
91348
91349
  return null;
91349
- let textDocument = (_a48 = this.documentManager.get(params.textDocument.uri)) === null || _a48 === void 0 ? void 0 : _a48.textDocument;
91350
+ let textDocument = (_a50 = this.documentManager.get(params.textDocument.uri)) === null || _a50 === void 0 ? void 0 : _a50.textDocument;
91350
91351
  if (!textDocument)
91351
91352
  return null;
91352
91353
  let ranges = (0, htmlTagNames_1.getHtmlElementNameRanges)(node, ancestors, params, textDocument);
@@ -91393,14 +91394,14 @@ var require_LinkedEditingRangesProvider = __commonJS({
91393
91394
  ];
91394
91395
  }
91395
91396
  async linkedEditingRanges(params) {
91396
- var _a48;
91397
+ var _a50;
91397
91398
  let document2 = this.documentManager.get(params.textDocument.uri);
91398
91399
  if (!document2 || document2.type !== theme_check_common_1.SourceCodeType.LiquidHtml)
91399
91400
  return null;
91400
91401
  let currentNode = null, ancestors = null;
91401
91402
  document2.ast instanceof Error || ([currentNode, ancestors] = (0, theme_check_common_2.findCurrentNode)(document2.ast, document2.textDocument.offsetAt(params.position)));
91402
91403
  let promises = this.providers.map((p) => p.linkedEditingRanges(currentNode, ancestors, params).catch(() => null));
91403
- return (_a48 = (await Promise.all(promises)).find(Boolean)) !== null && _a48 !== void 0 ? _a48 : null;
91404
+ return (_a50 = (await Promise.all(promises)).find(Boolean)) !== null && _a50 !== void 0 ? _a50 : null;
91404
91405
  }
91405
91406
  };
91406
91407
  exports.LinkedEditingRangesProvider = LinkedEditingRangesProvider;
@@ -91419,8 +91420,8 @@ var require_HtmlTagNameRenameProvider = __commonJS({
91419
91420
  this.documentManager = documentManager;
91420
91421
  }
91421
91422
  async prepare(node, ancestors, params) {
91422
- var _a48;
91423
- let textDocument = (_a48 = this.documentManager.get(params.textDocument.uri)) === null || _a48 === void 0 ? void 0 : _a48.textDocument;
91423
+ var _a50;
91424
+ let textDocument = (_a50 = this.documentManager.get(params.textDocument.uri)) === null || _a50 === void 0 ? void 0 : _a50.textDocument;
91424
91425
  if (!textDocument || !node || !ancestors)
91425
91426
  return null;
91426
91427
  let ranges = (0, htmlTagNames_1.getHtmlElementNameRanges)(node, ancestors, params, textDocument);
@@ -91430,8 +91431,8 @@ var require_HtmlTagNameRenameProvider = __commonJS({
91430
91431
  };
91431
91432
  }
91432
91433
  async rename(node, ancestors, params) {
91433
- var _a48;
91434
- let textDocument = (_a48 = this.documentManager.get(params.textDocument.uri)) === null || _a48 === void 0 ? void 0 : _a48.textDocument;
91434
+ var _a50;
91435
+ let textDocument = (_a50 = this.documentManager.get(params.textDocument.uri)) === null || _a50 === void 0 ? void 0 : _a50.textDocument;
91435
91436
  if (!textDocument || !node || !ancestors)
91436
91437
  return null;
91437
91438
  let ranges = (0, htmlTagNames_1.getHtmlElementNameRanges)(node, ancestors, params, textDocument);
@@ -91511,8 +91512,8 @@ var require_LiquidVariableRenameProvider = __commonJS({
91511
91512
  AssignMarkup: replaceRange,
91512
91513
  ForMarkup: replaceRange,
91513
91514
  TextNode: (node2, ancestors2) => {
91514
- var _a48;
91515
- if (((_a48 = ancestors2.at(-1)) === null || _a48 === void 0 ? void 0 : _a48.type) === liquid_html_parser_1.NodeTypes.LiquidDocParamNode)
91515
+ var _a50;
91516
+ if (((_a50 = ancestors2.at(-1)) === null || _a50 === void 0 ? void 0 : _a50.type) === liquid_html_parser_1.NodeTypes.LiquidDocParamNode)
91516
91517
  return liquidDocParamUpdated = !0, replaceRange(node2, ancestors2);
91517
91518
  }
91518
91519
  });
@@ -91534,11 +91535,11 @@ var require_LiquidVariableRenameProvider = __commonJS({
91534
91535
  return !!parentNode && parentNode.type === liquid_html_parser_1.NodeTypes.LiquidDocParamNode && parentNode.paramName === node && node.type === liquid_html_parser_1.NodeTypes.TextNode;
91535
91536
  }
91536
91537
  function variableName(node) {
91537
- var _a48, _b;
91538
+ var _a50, _b;
91538
91539
  switch (node.type) {
91539
91540
  case liquid_html_parser_1.NodeTypes.VariableLookup:
91540
91541
  case liquid_html_parser_1.NodeTypes.AssignMarkup:
91541
- return (_a48 = node.name) !== null && _a48 !== void 0 ? _a48 : "";
91542
+ return (_a50 = node.name) !== null && _a50 !== void 0 ? _a50 : "";
91542
91543
  case liquid_html_parser_1.NodeTypes.ForMarkup:
91543
91544
  return (_b = node.variableName) !== null && _b !== void 0 ? _b : "";
91544
91545
  case liquid_html_parser_1.NodeTypes.TextNode:
@@ -91572,7 +91573,7 @@ var require_LiquidVariableRenameProvider = __commonJS({
91572
91573
  };
91573
91574
  }
91574
91575
  async function updateRenderTags(connection, liquidSourceCodes, snippetName, oldParamName, newParamName) {
91575
- var _a48;
91576
+ var _a50;
91576
91577
  let editLabel = `Rename snippet parameter '${oldParamName}' to '${newParamName}'`, annotationId = "renameSnippetParameter", workspaceEdit = {
91577
91578
  documentChanges: [],
91578
91579
  changeAnnotations: {
@@ -91587,7 +91588,7 @@ var require_LiquidVariableRenameProvider = __commonJS({
91587
91588
  continue;
91588
91589
  let textDocument = sourceCode.textDocument, edits = (0, theme_check_common_1.visit)(sourceCode.ast, {
91589
91590
  RenderMarkup(node) {
91590
- var _a49;
91591
+ var _a51;
91591
91592
  if (node.snippet.type !== liquid_html_parser_1.NodeTypes.String || node.snippet.value !== snippetName)
91592
91593
  return;
91593
91594
  let renamedNameParamNode = node.args.find((arg) => arg.name === oldParamName);
@@ -91596,7 +91597,7 @@ var require_LiquidVariableRenameProvider = __commonJS({
91596
91597
  newText: `${newParamName}: `,
91597
91598
  range: vscode_languageserver_1.Range.create(textDocument.positionAt(renamedNameParamNode.position.start), textDocument.positionAt(renamedNameParamNode.value.position.start))
91598
91599
  };
91599
- if (((_a49 = node.alias) === null || _a49 === void 0 ? void 0 : _a49.value) === oldParamName && node.variable) {
91600
+ if (((_a51 = node.alias) === null || _a51 === void 0 ? void 0 : _a51.value) === oldParamName && node.variable) {
91600
91601
  let match2 = /as\s+([^\s,]+)/g.exec(node.source.slice(node.position.start, node.position.end));
91601
91602
  return match2 ? {
91602
91603
  newText: `as ${newParamName}`,
@@ -91608,7 +91609,7 @@ var require_LiquidVariableRenameProvider = __commonJS({
91608
91609
  edits.length !== 0 && workspaceEdit.documentChanges.push({
91609
91610
  textDocument: {
91610
91611
  uri: textDocument.uri,
91611
- version: (_a48 = sourceCode.version) !== null && _a48 !== void 0 ? _a48 : null
91612
+ version: (_a50 = sourceCode.version) !== null && _a50 !== void 0 ? _a50 : null
91612
91613
  },
91613
91614
  annotationId,
91614
91615
  edits
@@ -91642,21 +91643,21 @@ var require_RenameProvider = __commonJS({
91642
91643
  }
91643
91644
  /** Prepare is for telling if you can rename this thing or not, and what text to rename */
91644
91645
  async prepare(params) {
91645
- var _a48;
91646
+ var _a50;
91646
91647
  let [currentNode, ancestors] = this.nodes(params);
91647
91648
  if (currentNode === null || ancestors === null)
91648
91649
  return null;
91649
91650
  let promises = this.providers.map((provider) => provider.prepare(currentNode, ancestors, params).catch(() => null));
91650
- return (_a48 = (await Promise.all(promises)).find(Boolean)) !== null && _a48 !== void 0 ? _a48 : null;
91651
+ return (_a50 = (await Promise.all(promises)).find(Boolean)) !== null && _a50 !== void 0 ? _a50 : null;
91651
91652
  }
91652
91653
  /** Rename is for actually renaming something */
91653
91654
  async rename(params) {
91654
- var _a48;
91655
+ var _a50;
91655
91656
  let [currentNode, ancestors] = this.nodes(params);
91656
91657
  if (currentNode === null || ancestors === null)
91657
91658
  return null;
91658
91659
  let promises = this.providers.map((provider) => provider.rename(currentNode, ancestors, params).catch(() => null));
91659
- return (_a48 = (await Promise.all(promises)).find(Boolean)) !== null && _a48 !== void 0 ? _a48 : null;
91660
+ return (_a50 = (await Promise.all(promises)).find(Boolean)) !== null && _a50 !== void 0 ? _a50 : null;
91660
91661
  }
91661
91662
  /** a helper for getting the node under the cursor and its ancestry */
91662
91663
  nodes(params) {
@@ -91680,7 +91681,7 @@ var require_AssetRenameHandler = __commonJS({
91680
91681
  this.documentManager = documentManager, this.connection = connection, this.capabilities = capabilities, this.findThemeRootURI = findThemeRootURI;
91681
91682
  }
91682
91683
  async onDidRenameFiles(params) {
91683
- var _a48;
91684
+ var _a50;
91684
91685
  if (!this.capabilities.hasApplyEditSupport)
91685
91686
  return;
91686
91687
  let relevantRenames = params.files.filter((file) => (0, uri_1.isAsset)(file.oldUri) && (0, uri_1.isAsset)(file.newUri));
@@ -91718,7 +91719,7 @@ var require_AssetRenameHandler = __commonJS({
91718
91719
  edits.length !== 0 && workspaceEdit.documentChanges.push({
91719
91720
  textDocument: {
91720
91721
  uri: textDocument.uri,
91721
- version: (_a48 = sourceCode.version) !== null && _a48 !== void 0 ? _a48 : null
91722
+ version: (_a50 = sourceCode.version) !== null && _a50 !== void 0 ? _a50 : null
91722
91723
  },
91723
91724
  annotationId,
91724
91725
  edits
@@ -91919,11 +91920,11 @@ var require_BlockRenameHandler = __commonJS({
91919
91920
  };
91920
91921
  }
91921
91922
  function documentChanges(sourceCode, edits) {
91922
- var _a48;
91923
+ var _a50;
91923
91924
  return {
91924
91925
  textDocument: {
91925
91926
  uri: sourceCode.uri,
91926
- version: (_a48 = sourceCode.version) !== null && _a48 !== void 0 ? _a48 : null
91927
+ version: (_a50 = sourceCode.version) !== null && _a50 !== void 0 ? _a50 : null
91927
91928
  },
91928
91929
  edits
91929
91930
  };
@@ -92039,11 +92040,11 @@ var require_SectionRenameHandler = __commonJS({
92039
92040
  };
92040
92041
  exports.SectionRenameHandler = SectionRenameHandler;
92041
92042
  function documentChanges(sourceCode, edits) {
92042
- var _a48;
92043
+ var _a50;
92043
92044
  return {
92044
92045
  textDocument: {
92045
92046
  uri: sourceCode.uri,
92046
- version: (_a48 = sourceCode.version) !== null && _a48 !== void 0 ? _a48 : null
92047
+ version: (_a50 = sourceCode.version) !== null && _a50 !== void 0 ? _a50 : null
92047
92048
  },
92048
92049
  edits
92049
92050
  };
@@ -92063,7 +92064,7 @@ var require_SnippetRenameHandler = __commonJS({
92063
92064
  this.documentManager = documentManager, this.connection = connection, this.capabilities = capabilities, this.findThemeRootURI = findThemeRootURI;
92064
92065
  }
92065
92066
  async onDidRenameFiles(params) {
92066
- var _a48;
92067
+ var _a50;
92067
92068
  if (!this.capabilities.hasApplyEditSupport)
92068
92069
  return;
92069
92070
  let relevantRenames = params.files.filter((file) => (0, uri_1.isSnippet)(file.oldUri) && (0, uri_1.isSnippet)(file.newUri));
@@ -92104,7 +92105,7 @@ var require_SnippetRenameHandler = __commonJS({
92104
92105
  edits.length !== 0 && workspaceEdit.documentChanges.push({
92105
92106
  textDocument: {
92106
92107
  uri: textDocument.uri,
92107
- version: (_a48 = sourceCode.version) !== null && _a48 !== void 0 ? _a48 : null
92108
+ version: (_a50 = sourceCode.version) !== null && _a50 !== void 0 ? _a50 : null
92108
92109
  },
92109
92110
  annotationId,
92110
92111
  edits
@@ -92245,7 +92246,7 @@ var require_Configuration = __commonJS({
92245
92246
  "../../node_modules/.pnpm/@shopify+theme-language-server-common@2.20.0/node_modules/@shopify/theme-language-server-common/dist/server/Configuration.js"(exports) {
92246
92247
  "use strict";
92247
92248
  init_cjs_shims();
92248
- var _a48, _b, _c, _d;
92249
+ var _a50, _b, _c, _d;
92249
92250
  Object.defineProperty(exports, "__esModule", { value: !0 });
92250
92251
  exports.Configuration = exports.ConfigurationKeys = exports.PRELOAD_ON_BOOT = exports.CHECK_ON_CHANGE = exports.CHECK_ON_SAVE = exports.CHECK_ON_OPEN = void 0;
92251
92252
  var theme_check_common_1 = require_dist3(), vscode_languageserver_1 = require_main4();
@@ -92261,7 +92262,7 @@ var require_Configuration = __commonJS({
92261
92262
  ];
92262
92263
  var Configuration = class {
92263
92264
  constructor(connection, capabilities) {
92264
- this.connection = connection, this.capabilities = capabilities, this[_a48] = !0, this[_b] = !0, this[_c] = !0, this[_d] = !0, this.fetchConfiguration = (0, theme_check_common_1.memo)(async () => {
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 () => {
92265
92266
  if (!this.capabilities.hasWorkspaceConfigurationSupport)
92266
92267
  return;
92267
92268
  let configs = await this.connection.workspace.getConfiguration(exports.ConfigurationKeys.map((key) => ({ section: key })));
@@ -92297,7 +92298,7 @@ var require_Configuration = __commonJS({
92297
92298
  }
92298
92299
  };
92299
92300
  exports.Configuration = Configuration;
92300
- _a48 = exports.CHECK_ON_OPEN, _b = exports.CHECK_ON_SAVE, _c = exports.CHECK_ON_CHANGE, _d = exports.PRELOAD_ON_BOOT;
92301
+ _a50 = exports.CHECK_ON_OPEN, _b = exports.CHECK_ON_SAVE, _c = exports.CHECK_ON_CHANGE, _d = exports.PRELOAD_ON_BOOT;
92301
92302
  }
92302
92303
  });
92303
92304
 
@@ -95255,13 +95256,13 @@ var require_utils12 = __commonJS({
95255
95256
  }
95256
95257
  exports.exists = exists;
95257
95258
  async function acceptsLocalBlocks(sectionType, deps) {
95258
- var _a48;
95259
+ var _a50;
95259
95260
  let sectionSchema = await deps.getSectionSchema(sectionType).catch((_4) => {
95260
95261
  });
95261
95262
  if (!sectionSchema)
95262
95263
  return new Error("Section does not exist");
95263
95264
  let validSchema = sectionSchema.validSchema;
95264
- return validSchema instanceof Error ? validSchema : ((_a48 = validSchema.blocks) !== null && _a48 !== void 0 ? _a48 : []).some((block) => block.type && "name" in block && block.name);
95265
+ return validSchema instanceof Error ? validSchema : ((_a50 = validSchema.blocks) !== null && _a50 !== void 0 ? _a50 : []).some((block) => block.type && "name" in block && block.name);
95265
95266
  }
95266
95267
  exports.acceptsLocalBlocks = acceptsLocalBlocks;
95267
95268
  }
@@ -95350,13 +95351,13 @@ var require_augment = __commonJS({
95350
95351
  exports.augmentDependencies = void 0;
95351
95352
  var theme_check_common_1 = require_dist3(), toSourceCode_1 = require_toSourceCode(), utils_1 = require_utils12();
95352
95353
  function augmentDependencies(rootUri, ideps) {
95353
- var _a48;
95354
+ var _a50;
95354
95355
  return {
95355
95356
  fs: ideps.fs,
95356
95357
  getBlockSchema: (0, theme_check_common_1.memoize)(ideps.getBlockSchema, utils_1.identity),
95357
95358
  getSectionSchema: (0, theme_check_common_1.memoize)(ideps.getSectionSchema, utils_1.identity),
95358
95359
  // parse at most once
95359
- getSourceCode: (0, theme_check_common_1.memoize)((_a48 = ideps.getSourceCode) !== null && _a48 !== void 0 ? _a48 : async function(uri) {
95360
+ getSourceCode: (0, theme_check_common_1.memoize)((_a50 = ideps.getSourceCode) !== null && _a50 !== void 0 ? _a50 : async function(uri) {
95360
95361
  let contents = await ideps.fs.readFile(uri);
95361
95362
  return (0, toSourceCode_1.toSourceCode)(uri, contents);
95362
95363
  }, utils_1.identity),
@@ -96281,7 +96282,7 @@ var require_ThemeGraphManager = __commonJS({
96281
96282
  }));
96282
96283
  }
96283
96284
  async getDependencies(uri, offset, { includeIndirect = !0, includePreset = !0 } = {}) {
96284
- var _a48;
96285
+ var _a50;
96285
96286
  let graph = await this.getThemeGraphForURI(uri);
96286
96287
  if (!graph)
96287
96288
  return [];
@@ -96292,7 +96293,7 @@ var require_ThemeGraphManager = __commonJS({
96292
96293
  "direct",
96293
96294
  includeIndirect ? "indirect" : void 0,
96294
96295
  includePreset ? "preset" : void 0
96295
- ], deps = (_a48 = module2.dependencies.filter((dep) => includedTypes.includes(dep.type))) !== null && _a48 !== void 0 ? _a48 : [];
96296
+ ], deps = (_a50 = module2.dependencies.filter((dep) => includedTypes.includes(dep.type))) !== null && _a50 !== void 0 ? _a50 : [];
96296
96297
  return Promise.all(deps.map(async (dep) => {
96297
96298
  let [source, target] = await Promise.all([
96298
96299
  this.augmentedLocation(dep.source),
@@ -96306,12 +96307,12 @@ var require_ThemeGraphManager = __commonJS({
96306
96307
  }));
96307
96308
  }
96308
96309
  async augmentedLocation(loc) {
96309
- var _a48;
96310
+ var _a50;
96310
96311
  let sourceCode = await this.getSourceCode(loc.uri).catch(() => {
96311
96312
  }), { uri, range } = loc;
96312
96313
  if (!sourceCode || !range)
96313
96314
  return { exists: !!sourceCode, ...loc };
96314
- let doc = (_a48 = this.documentManager.get(loc.uri)) === null || _a48 === void 0 ? void 0 : _a48.textDocument;
96315
+ let doc = (_a50 = this.documentManager.get(loc.uri)) === null || _a50 === void 0 ? void 0 : _a50.textDocument;
96315
96316
  return doc || (doc = vscode_languageserver_textdocument_1.TextDocument.create(sourceCode.uri, sourceCode.type, 0, sourceCode.source)), {
96316
96317
  uri,
96317
96318
  range,
@@ -96464,21 +96465,21 @@ var require_startServer = __commonJS({
96464
96465
  }
96465
96466
  let getDefaultLocaleFileUri = (0, theme_check_common_1.makeGetDefaultLocaleFileUri)(fs7);
96466
96467
  async function getDefaultLocaleSourceCode(uri) {
96467
- var _a48;
96468
+ var _a50;
96468
96469
  let rootUri = await findThemeRootURI(uri);
96469
96470
  if (!rootUri)
96470
96471
  return null;
96471
96472
  let defaultLocaleFileUri = await getDefaultLocaleFileUri(rootUri);
96472
- return defaultLocaleFileUri && (_a48 = documentManager.get(defaultLocaleFileUri)) !== null && _a48 !== void 0 ? _a48 : null;
96473
+ return defaultLocaleFileUri && (_a50 = documentManager.get(defaultLocaleFileUri)) !== null && _a50 !== void 0 ? _a50 : null;
96473
96474
  }
96474
96475
  let getDefaultSchemaLocaleFileUri = (0, theme_check_common_1.makeGetDefaultSchemaLocaleFileUri)(fs7);
96475
96476
  async function getDefaultSchemaLocaleSourceCode(uri) {
96476
- var _a48;
96477
+ var _a50;
96477
96478
  let rootUri = await findThemeRootURI(uri);
96478
96479
  if (!rootUri)
96479
96480
  return null;
96480
96481
  let defaultLocaleFileUri = await getDefaultSchemaLocaleFileUri(rootUri);
96481
- return defaultLocaleFileUri && (_a48 = documentManager.get(defaultLocaleFileUri)) !== null && _a48 !== void 0 ? _a48 : null;
96482
+ return defaultLocaleFileUri && (_a50 = documentManager.get(defaultLocaleFileUri)) !== null && _a50 !== void 0 ? _a50 : null;
96482
96483
  }
96483
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({
96484
96485
  documentManager,
@@ -96619,18 +96620,18 @@ var require_startServer = __commonJS({
96619
96620
  }), connection.onDefinition(async (params) => hasUnsupportedDocument(params) ? [] : definitionsProvider.definitions(params)), connection.onCodeAction(async (params) => codeActionsProvider.codeActions(params)), connection.onExecuteCommand(async (params) => {
96620
96621
  await executeCommandProvider.execute(params);
96621
96622
  }), connection.onCompletion(async (params) => {
96622
- var _a48, _b;
96623
- return hasUnsupportedDocument(params) ? [] : (_b = (_a48 = await cssLanguageService.completions(params)) !== null && _a48 !== void 0 ? _a48 : await jsonLanguageService.completions(params)) !== null && _b !== void 0 ? _b : await completionsProvider.completions(params);
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);
96624
96625
  }), connection.onHover(async (params) => {
96625
- var _a48, _b;
96626
- return hasUnsupportedDocument(params) ? null : (_b = (_a48 = await cssLanguageService.hover(params)) !== null && _a48 !== void 0 ? _a48 : await jsonLanguageService.hover(params)) !== null && _b !== void 0 ? _b : await hoverProvider.hover(params);
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);
96627
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) => {
96628
96629
  let triggerUris = params.files.map((fileRename) => fileRename.newUri);
96629
96630
  for (let { oldUri, newUri } of params.files)
96630
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);
96631
96632
  await renameHandler.onDidRenameFiles(params), runChecks.force(triggerUris);
96632
96633
  }), connection.onDidChangeWatchedFiles(async (params) => {
96633
- var _a48;
96634
+ var _a50;
96634
96635
  if (params.changes.length === 0)
96635
96636
  return;
96636
96637
  let triggerUris = params.changes.map((change) => change.uri), updates = [];
@@ -96648,7 +96649,7 @@ var require_startServer = __commonJS({
96648
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));
96649
96650
  break;
96650
96651
  case vscode_languageserver_1.FileChangeType.Changed:
96651
- fs7.readFile.invalidate(change.uri), fs7.stat.invalidate(change.uri), themeGraphManager.change(change.uri), ((_a48 = documentManager.get(change.uri)) === null || _a48 === void 0 ? void 0 : _a48.version) === void 0 && updates.push(documentManager.changeFromDisk(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));
96652
96653
  break;
96653
96654
  case vscode_languageserver_1.FileChangeType.Deleted:
96654
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);
@@ -106627,8 +106628,8 @@ var require_lib10 = __commonJS({
106627
106628
  }
106628
106629
  };
106629
106630
  return node.kind === "OperationDefinition" ? node.selectionSet.selections.forEach((selection) => {
106630
- var _a48;
106631
- selection.kind === "Field" && ((_a48 = selection.selectionSet) == null || _a48.selections.forEach(handleSelectionNode));
106631
+ var _a50;
106632
+ selection.kind === "Field" && ((_a50 = selection.selectionSet) == null || _a50.selections.forEach(handleSelectionNode));
106632
106633
  }) : node.selectionSet.selections.forEach(handleSelectionNode), references;
106633
106634
  }, generateContentsFromGraphqlString = (graphqlString, mapDocumentNode) => {
106634
106635
  let graphqlDocument = graphql_tag.default(graphqlString), documentNodeAsString = generateDocumentNodeString(graphqlDocument, mapDocumentNode), allFragments = collectAllFragmentDefinitions(graphqlDocument), lines = graphqlDocument.definitions.reduce((accumulator, definition) => {
@@ -110308,26 +110309,26 @@ var require_utils13 = __commonJS({
110308
110309
  }
110309
110310
  exports.generateName = generateName;
110310
110311
  function error(...messages) {
110311
- var _a48;
110312
+ var _a50;
110312
110313
  if (!process.env.VERBOSE)
110313
110314
  return console.error(messages);
110314
- console.error((_a48 = getStyledTextForLogging("red")) === null || _a48 === void 0 ? void 0 : _a48("error"), ...messages);
110315
+ console.error((_a50 = getStyledTextForLogging("red")) === null || _a50 === void 0 ? void 0 : _a50("error"), ...messages);
110315
110316
  }
110316
110317
  exports.error = error;
110317
110318
  function log(style, title, ...messages) {
110318
- var _a48, _b;
110319
+ var _a50, _b;
110319
110320
  if (!process.env.VERBOSE)
110320
110321
  return;
110321
110322
  let lastMessage = null;
110322
- messages.length > 1 && typeof messages[messages.length - 1] != "string" && (lastMessage = messages.splice(messages.length - 1, 1)), console.info((_a48 = color()) === null || _a48 === void 0 ? void 0 : _a48.whiteBright.bgCyan("debug"), (_b = getStyledTextForLogging(style)) === null || _b === void 0 ? void 0 : _b(title), ...messages), lastMessage && console.dir(lastMessage, { depth: 6, maxArrayLength: 6 });
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 });
110323
110324
  }
110324
110325
  exports.log = log;
110325
110326
  function getStyledTextForLogging(style) {
110326
- var _a48, _b, _c, _d, _e, _f2, _g;
110327
+ var _a50, _b, _c, _d, _e, _f2, _g;
110327
110328
  if (process.env.VERBOSE)
110328
110329
  switch (style) {
110329
110330
  case "blue":
110330
- return (_a48 = color()) === null || _a48 === void 0 ? void 0 : _a48.whiteBright.bgBlue;
110331
+ return (_a50 = color()) === null || _a50 === void 0 ? void 0 : _a50.whiteBright.bgBlue;
110331
110332
  case "cyan":
110332
110333
  return (_b = color()) === null || _b === void 0 ? void 0 : _b.whiteBright.bgCyan;
110333
110334
  case "green":
@@ -110734,7 +110735,7 @@ var require_applySchemaTyping = __commonJS({
110734
110735
  exports.applySchemaTyping = void 0;
110735
110736
  var JSONSchema_1 = require_JSONSchema(), typesOfSchema_1 = require_typesOfSchema();
110736
110737
  function applySchemaTyping(schema) {
110737
- var _a48;
110738
+ var _a50;
110738
110739
  let types = (0, typesOfSchema_1.typesOfSchema)(schema);
110739
110740
  if (Object.defineProperty(schema, JSONSchema_1.Types, {
110740
110741
  enumerable: !1,
@@ -110749,7 +110750,7 @@ var require_applySchemaTyping = __commonJS({
110749
110750
  description: schema.description,
110750
110751
  name: schema.name,
110751
110752
  title: schema.title,
110752
- allOf: (_a48 = schema.allOf) !== null && _a48 !== void 0 ? _a48 : [],
110753
+ allOf: (_a50 = schema.allOf) !== null && _a50 !== void 0 ? _a50 : [],
110753
110754
  required: [],
110754
110755
  additionalProperties: !1
110755
110756
  };
@@ -110869,8 +110870,8 @@ var require_normalizer = __commonJS({
110869
110870
  schema.const !== void 0 && (schema.enum = [schema.const], delete schema.const);
110870
110871
  });
110871
110872
  rules.set("Add tsEnumNames to enum types", (schema, _4, options) => {
110872
- var _a48;
110873
- isEnumTypeWithoutTsEnumNames(schema) && options.inferStringEnumKeysFromValues && (schema.tsEnumNames = (_a48 = schema.enum) === null || _a48 === void 0 ? void 0 : _a48.map(String));
110873
+ var _a50;
110874
+ isEnumTypeWithoutTsEnumNames(schema) && options.inferStringEnumKeysFromValues && (schema.tsEnumNames = (_a50 = schema.enum) === null || _a50 === void 0 ? void 0 : _a50.map(String));
110874
110875
  });
110875
110876
  rules.set("Pre-calculate schema types and intersections", (schema) => {
110876
110877
  schema !== null && typeof schema == "object" && (0, applySchemaTyping_1.applySchemaTyping)(schema);
@@ -111160,8 +111161,8 @@ var require_parser2 = __commonJS({
111160
111161
  }
111161
111162
  }
111162
111163
  function standaloneName(schema, keyNameFromDefinition, usedNames, options) {
111163
- var _a48;
111164
- let name = ((_a48 = options.customName) === null || _a48 === void 0 ? void 0 : _a48.call(options, schema, keyNameFromDefinition)) || schema.title || schema.$id || keyNameFromDefinition;
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;
111165
111166
  if (name)
111166
111167
  return (0, utils_1.generateName)(name, usedNames);
111167
111168
  }
@@ -113482,7 +113483,7 @@ var require_resolver = __commonJS({
113482
113483
  Object.defineProperty(exports, "__esModule", { value: !0 });
113483
113484
  exports.dereference = void 0;
113484
113485
  var json_schema_ref_parser_1 = require_lib11(), utils_1 = require_utils13();
113485
- function dereference(schema_1, _a48) {
113486
+ function dereference(schema_1, _a50) {
113486
113487
  return __awaiter(this, arguments, void 0, function* (schema, { cwd: cwd3, $refOptions }) {
113487
113488
  (0, utils_1.log)("green", "dereferencer", "Dereferencing input schema:", cwd3, schema);
113488
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) {
@@ -201725,7 +201726,7 @@ function pollThemeEditorChanges(targetTheme, session, remoteChecksum, localFileS
201725
201726
  });
201726
201727
  }
201727
201728
  async function pollRemoteJsonChanges(targetTheme, currentSession, remoteChecksums, localFileSystem, options) {
201728
- let previousChecksums = applyFileFilters(remoteChecksums, localFileSystem), latestChecksums = await fetchChecksums(targetTheme.id, currentSession).then((checksums) => applyFileFilters(checksums, localFileSystem)), changedAssets = getAssetsChangedOnRemote(previousChecksums, latestChecksums), deletedAssets = getAssetsDeletedFromRemote(latestChecksums, previousChecksums);
201729
+ let currentUnsyncedKeys = new Set(localFileSystem.unsyncedFileKeys), previousChecksums = applyFileFilters(remoteChecksums, localFileSystem, currentUnsyncedKeys), latestChecksums = await fetchChecksums(targetTheme.id, currentSession).then((checksums) => applyFileFilters(checksums, localFileSystem, currentUnsyncedKeys)), changedAssets = getAssetsChangedOnRemote(previousChecksums, latestChecksums), deletedAssets = getAssetsDeletedFromRemote(latestChecksums, previousChecksums);
201729
201730
  return await abortIfMultipleSourcesChange(localFileSystem, changedAssets), await syncChangedAssets(targetTheme, currentSession, localFileSystem, changedAssets), await deleteRemovedAssets(localFileSystem, deletedAssets, options), latestChecksums;
201730
201731
  }
201731
201732
  function getAssetsDeletedFromRemote(latestChecksums, previousChecksums) {
@@ -201764,8 +201765,8 @@ async function abortIfMultipleSourcesChange(localFileSystem, assetsChangedOnRemo
201764
201765
  throw new PollingError(`Detected changes to the file '${asset.key}' on both local and remote sources. Aborting...`);
201765
201766
  }
201766
201767
  }
201767
- function applyFileFilters(files, localThemeFileSystem) {
201768
- return localThemeFileSystem.applyIgnoreFilters(files).filter((file) => file.key.endsWith(".json")).filter((file) => !localThemeFileSystem.unsyncedFileKeys.has(file.key));
201768
+ function applyFileFilters(files, localThemeFileSystem, unsyncedKeys) {
201769
+ return localThemeFileSystem.applyIgnoreFilters(files).filter((file) => file.key.endsWith(".json")).filter((file) => !unsyncedKeys.has(file.key));
201769
201770
  }
201770
201771
 
201771
201772
  // ../theme/dist/cli/utilities/theme-environment/theme-reconciliation.js
@@ -209604,7 +209605,7 @@ var import_core27 = __toESM(require_lib5(), 1);
209604
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
209605
209606
  init_cjs_shims();
209606
209607
  async function startMiniOxygen(options) {
209607
- let { startWorkerdServer } = await import("./workerd-BHG6KDEK.js");
209608
+ let { startWorkerdServer } = await import("./workerd-EPURL4IC.js");
209608
209609
  return startWorkerdServer(options);
209609
209610
  }
209610
209611
 
@@ -211013,6 +211014,8 @@ var MAX_EXTENSION_HANDLE_LENGTH = 50, MAX_UID_LENGTH = 250, MetafieldSchema = z.
211013
211014
  api_access: z.boolean().optional(),
211014
211015
  collect_buyer_consent: CollectBuyerConsentCapabilitySchema.optional(),
211015
211016
  iframe: IframeCapabilitySchema.optional()
211017
+ }), SupportedFeaturesSchema = z.object({
211018
+ offline_mode: z.boolean().optional()
211016
211019
  }), ExtensionsArraySchema = z.object({
211017
211020
  type: z.string().optional(),
211018
211021
  extensions: z.array(z.any()).optional()
@@ -211056,6 +211059,7 @@ var MAX_EXTENSION_HANDLE_LENGTH = 50, MAX_UID_LENGTH = 250, MetafieldSchema = z.
211056
211059
  api_version: ApiVersionSchema.optional(),
211057
211060
  extension_points: z.any().optional(),
211058
211061
  capabilities: CapabilitiesSchema.optional(),
211062
+ supported_features: SupportedFeaturesSchema.optional(),
211059
211063
  settings: SettingsSchema.optional()
211060
211064
  }), BaseSchemaWithHandle = BaseSchema.extend({
211061
211065
  handle: HandleSchema
@@ -212844,6 +212848,7 @@ var dependency2 = "@shopify/checkout-ui-extensions", CheckoutSchema = BaseSchema
212844
212848
  deployConfig: async (config2, directory) => ({
212845
212849
  extension_points: config2.extension_points,
212846
212850
  capabilities: config2.capabilities,
212851
+ supported_features: config2.supported_features,
212847
212852
  metafields: config2.metafields ?? [],
212848
212853
  name: config2.name,
212849
212854
  settings: config2.settings,
@@ -214113,7 +214118,6 @@ var dependency5 = "@shopify/checkout-ui-extensions", validatePoints = (config2)
214113
214118
  }
214114
214119
  };
214115
214120
  return {
214116
- tools: targeting.tools,
214117
214121
  target: targeting.target,
214118
214122
  module: targeting.module,
214119
214123
  metafields: targeting.metafields ?? config2.metafields ?? [],
@@ -214121,7 +214125,9 @@ var dependency5 = "@shopify/checkout-ui-extensions", validatePoints = (config2)
214121
214125
  urls: targeting.urls ?? {},
214122
214126
  capabilities: targeting.capabilities,
214123
214127
  preloads: targeting.preloads ?? {},
214124
- build_manifest: buildManifest
214128
+ build_manifest: buildManifest,
214129
+ tools: targeting.tools,
214130
+ instructions: targeting.instructions
214125
214131
  };
214126
214132
  });
214127
214133
  return { ...config2, extension_points: extensionPoints };
@@ -214141,6 +214147,7 @@ var dependency5 = "@shopify/checkout-ui-extensions", validatePoints = (config2)
214141
214147
  api_version: config2.api_version,
214142
214148
  extension_points: transformedExtensionPoints,
214143
214149
  capabilities: config2.capabilities,
214150
+ supported_features: config2.supported_features,
214144
214151
  name: config2.name,
214145
214152
  description: config2.description,
214146
214153
  settings: config2.settings,
@@ -214151,13 +214158,8 @@ var dependency5 = "@shopify/checkout-ui-extensions", validatePoints = (config2)
214151
214158
  let shouldIncludeShopifyExtend = isRemoteDomExtension(config2), extensionPoints = config2.extension_points || [], main = extensionPoints.map(({ target, module }, index) => shouldIncludeShopifyExtend ? `import Target_${index} from '${module}';shopify.extend('${target}', (...args) => Target_${index}(...args));` : `import '${module}';`).join(`
214152
214159
  `), assets = {};
214153
214160
  extensionPoints.forEach((extensionPoint) => {
214154
- Object.entries(extensionPoint.build_manifest.assets).forEach(([identifier, asset]) => {
214155
- identifier !== AssetIdentifier.Main && (asset.static && asset.module || (assets[identifier] = {
214156
- identifier,
214157
- outputFileName: asset.filepath,
214158
- content: shouldIncludeShopifyExtend ? `import shouldRender from '${asset.module}';shopify.extend('${getShouldRenderTarget(extensionPoint.target)}', (...args) => shouldRender(...args));` : `import '${asset.module}'`
214159
- }));
214160
- });
214161
+ let shouldRenderAsset = buildShouldRenderAsset(extensionPoint, shouldIncludeShopifyExtend);
214162
+ shouldRenderAsset && (assets[AssetIdentifier.ShouldRender] = shouldRenderAsset);
214161
214163
  });
214162
214164
  let assetsArray = Object.values(assets);
214163
214165
  return {
@@ -214166,7 +214168,7 @@ var dependency5 = "@shopify/checkout-ui-extensions", validatePoints = (config2)
214166
214168
  };
214167
214169
  },
214168
214170
  copyStaticAssets: async (config2, directory, outputPath) => {
214169
- isRemoteDomExtension(config2) && await Promise.all(config2.extension_points.map((extensionPoint) => "build_manifest" in extensionPoint ? Object.entries(extensionPoint.build_manifest.assets).map(([_4, asset]) => {
214171
+ isRemoteDomExtension(config2) && await Promise.all(config2.extension_points.flatMap((extensionPoint) => "build_manifest" in extensionPoint ? Object.entries(extensionPoint.build_manifest.assets).map(([_4, asset]) => {
214170
214172
  if (asset.static && asset.module) {
214171
214173
  let sourceFile = joinPath(directory, asset.module), outputFilePath = joinPath(dirname(outputPath), asset.filepath);
214172
214174
  return copyFile(sourceFile, outputFilePath).catch((error) => {
@@ -214174,7 +214176,7 @@ var dependency5 = "@shopify/checkout-ui-extensions", validatePoints = (config2)
214174
214176
  });
214175
214177
  }
214176
214178
  return Promise.resolve();
214177
- }) : Promise.resolve()));
214179
+ }) : []));
214178
214180
  },
214179
214181
  hasExtensionPointTarget: (config2, requestedTarget) => config2.extension_points?.find((extensionPoint) => extensionPoint.target === requestedTarget) !== void 0,
214180
214182
  contributeToSharedTypeFile: async (extension, typeDefinitionsByFile) => {
@@ -214298,6 +214300,15 @@ function isRemoteDomExtension(config2) {
214298
214300
  function getShouldRenderTarget(target) {
214299
214301
  return target.replace(/\.render$/, ".should-render");
214300
214302
  }
214303
+ function buildShouldRenderAsset(extensionPoint, shouldIncludeShopifyExtend) {
214304
+ let shouldRenderAsset = extensionPoint.build_manifest.assets[AssetIdentifier.ShouldRender];
214305
+ if (shouldRenderAsset)
214306
+ return {
214307
+ identifier: AssetIdentifier.ShouldRender,
214308
+ outputFileName: shouldRenderAsset.filepath,
214309
+ content: shouldIncludeShopifyExtend ? `import shouldRender from '${shouldRenderAsset.module}';shopify.extend('${getShouldRenderTarget(extensionPoint.target)}', (...args) => shouldRender(...args));` : `import '${shouldRenderAsset.module}'`
214310
+ };
214311
+ }
214301
214312
  var ui_extension_default = uiExtensionSpec;
214302
214313
 
214303
214314
  // ../app/dist/cli/models/extensions/specifications/web_pixel_extension.js
@@ -216794,6 +216805,71 @@ function organizationBetaFlagsQuery(flags) {
216794
216805
  }`;
216795
216806
  }
216796
216807
 
216808
+ // ../app/dist/cli/api/graphql/business-platform-organizations/generated/organization_exp_flags.js
216809
+ init_cjs_shims();
216810
+ var OrganizationExpFlags = {
216811
+ kind: "Document",
216812
+ definitions: [
216813
+ {
216814
+ kind: "OperationDefinition",
216815
+ operation: "query",
216816
+ name: { kind: "Name", value: "OrganizationExpFlags" },
216817
+ variableDefinitions: [
216818
+ {
216819
+ kind: "VariableDefinition",
216820
+ variable: { kind: "Variable", name: { kind: "Name", value: "organizationId" } },
216821
+ type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "OrganizationID" } } }
216822
+ },
216823
+ {
216824
+ kind: "VariableDefinition",
216825
+ variable: { kind: "Variable", name: { kind: "Name", value: "flagHandles" } },
216826
+ type: {
216827
+ kind: "NonNullType",
216828
+ type: {
216829
+ kind: "ListType",
216830
+ type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }
216831
+ }
216832
+ }
216833
+ }
216834
+ ],
216835
+ selectionSet: {
216836
+ kind: "SelectionSet",
216837
+ selections: [
216838
+ {
216839
+ kind: "Field",
216840
+ name: { kind: "Name", value: "organization" },
216841
+ arguments: [
216842
+ {
216843
+ kind: "Argument",
216844
+ name: { kind: "Name", value: "organizationId" },
216845
+ value: { kind: "Variable", name: { kind: "Name", value: "organizationId" } }
216846
+ }
216847
+ ],
216848
+ selectionSet: {
216849
+ kind: "SelectionSet",
216850
+ selections: [
216851
+ { kind: "Field", name: { kind: "Name", value: "id" } },
216852
+ {
216853
+ kind: "Field",
216854
+ name: { kind: "Name", value: "enabledFlags" },
216855
+ arguments: [
216856
+ {
216857
+ kind: "Argument",
216858
+ name: { kind: "Name", value: "flagHandles" },
216859
+ value: { kind: "Variable", name: { kind: "Name", value: "flagHandles" } }
216860
+ }
216861
+ ]
216862
+ },
216863
+ { kind: "Field", name: { kind: "Name", value: "__typename" } }
216864
+ ]
216865
+ }
216866
+ }
216867
+ ]
216868
+ }
216869
+ }
216870
+ ]
216871
+ };
216872
+
216797
216873
  // ../app/dist/cli/api/graphql/business-platform-destinations/generated/organizations.js
216798
216874
  init_cjs_shims();
216799
216875
  var ListOrganizations = {
@@ -216871,6 +216947,11 @@ var DevSessionCreate = {
216871
216947
  kind: "VariableDefinition",
216872
216948
  variable: { kind: "Variable", name: { kind: "Name", value: "assetsUrl" } },
216873
216949
  type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }
216950
+ },
216951
+ {
216952
+ kind: "VariableDefinition",
216953
+ variable: { kind: "Variable", name: { kind: "Name", value: "websocketUrl" } },
216954
+ type: { kind: "NamedType", name: { kind: "Name", value: "String" } }
216874
216955
  }
216875
216956
  ],
216876
216957
  selectionSet: {
@@ -216889,6 +216970,11 @@ var DevSessionCreate = {
216889
216970
  kind: "Argument",
216890
216971
  name: { kind: "Name", value: "assetsUrl" },
216891
216972
  value: { kind: "Variable", name: { kind: "Name", value: "assetsUrl" } }
216973
+ },
216974
+ {
216975
+ kind: "Argument",
216976
+ name: { kind: "Name", value: "websocketUrl" },
216977
+ value: { kind: "Variable", name: { kind: "Name", value: "websocketUrl" } }
216892
216978
  }
216893
216979
  ],
216894
216980
  selectionSet: {
@@ -219178,7 +219264,7 @@ var TEMPLATE_JSON_URL = "https://cdn.shopify.com/static/cli/extensions/templates
219178
219264
  "This likely means a problem with your internet connection."
219179
219265
  ]);
219180
219266
  }
219181
- let counter = 0, filteredTemplates = (await allowedTemplates(templates2, async (betaFlags) => this.organizationBetaFlags(organizationId, betaFlags))).map((template) => ({ ...template, sortPriority: counter++ })), groupOrder = [];
219267
+ let counter = 0, filteredTemplates = (await allowedTemplates(templates2, async (betaFlags) => this.organizationBetaFlags(organizationId, betaFlags), async (expFlags) => this.organizationExpFlags(organizationId, expFlags))).map((template) => ({ ...template, sortPriority: counter++ })), groupOrder = [];
219182
219268
  for (let template of templates2)
219183
219269
  template.group && !groupOrder.includes(template.group) && groupOrder.push(template.group);
219184
219270
  return {
@@ -219521,12 +219607,12 @@ var TEMPLATE_JSON_URL = "https://cdn.shopify.com/static/cli/extensions/templates
219521
219607
  async appDeepLink({ id, organizationId }) {
219522
219608
  return appDeepLink({ id, organizationId });
219523
219609
  }
219524
- async devSessionCreate({ appId, assetsUrl, shopFqdn }) {
219610
+ async devSessionCreate({ appId, assetsUrl, shopFqdn, websocketUrl }) {
219525
219611
  let appIdNumber = String(numberFromGid(appId));
219526
219612
  return this.appDevRequest({
219527
219613
  query: DevSessionCreate,
219528
219614
  shopFqdn,
219529
- variables: { appId: appIdNumber, assetsUrl: assetsUrl ?? "" },
219615
+ variables: { appId: appIdNumber, assetsUrl: assetsUrl ?? "", websocketUrl },
219530
219616
  requestOptions: { requestMode: "slow-request" }
219531
219617
  });
219532
219618
  }
@@ -219567,6 +219653,21 @@ var TEMPLATE_JSON_URL = "https://cdn.shopify.com/static/cli/extensions/templates
219567
219653
  result[flag] = !!flagsResult.organization[`flag_${flag}`];
219568
219654
  }), result;
219569
219655
  }
219656
+ async organizationExpFlags(organizationId, allExpFlags) {
219657
+ let variables = {
219658
+ organizationId: encodedGidFromOrganizationIdForBP(organizationId),
219659
+ flagHandles: allExpFlags
219660
+ }, flagsResult = await businessPlatformOrganizationsRequestDoc({
219661
+ query: OrganizationExpFlags,
219662
+ token: await this.businessPlatformToken(),
219663
+ organizationId,
219664
+ variables,
219665
+ unauthorizedHandler: this.createUnauthorizedHandler()
219666
+ }), result = {}, enabledFlags = flagsResult.organization?.enabledFlags ?? [];
219667
+ return allExpFlags.forEach((flag, index) => {
219668
+ result[flag] = !!enabledFlags[index];
219669
+ }), result;
219670
+ }
219570
219671
  async appManagementRequest(options) {
219571
219672
  return appManagementRequestDoc({
219572
219673
  ...options,
@@ -219680,11 +219781,14 @@ function diffAppModules({ currentModules, selectedVersionModules }) {
219680
219781
  let currentModuleUids = currentModules.map((mod) => mod.userIdentifier), selectedVersionModuleUids = selectedVersionModules.map((mod) => mod.userIdentifier), added = selectedVersionModules.filter((mod) => !currentModuleUids.includes(mod.userIdentifier)), removed = currentModules.filter((mod) => !selectedVersionModuleUids.includes(mod.userIdentifier)), removedUids = removed.map((mod) => mod.userIdentifier), updated = currentModules.filter((mod) => !removedUids.includes(mod.userIdentifier));
219681
219782
  return { added, removed, updated };
219682
219783
  }
219683
- async function allowedTemplates(templates2, betaFlagsFetcher, version = CLI_KIT_VERSION) {
219684
- let allBetaFlags = Array.from(new Set(templates2.map((ext) => ext.organizationBetaFlags ?? []).flat())), enabledBetaFlags = await betaFlagsFetcher(allBetaFlags);
219784
+ async function allowedTemplates(templates2, betaFlagsFetcher, expFlagsFetcher, version = CLI_KIT_VERSION) {
219785
+ let allBetaFlags = Array.from(new Set(templates2.map((ext) => ext.organizationBetaFlags ?? []).flat())), allExpFlags = Array.from(new Set(templates2.map((ext) => ext.organizationExpFlags ?? []).flat())), [enabledBetaFlags, enabledExpFlags] = await Promise.all([
219786
+ allBetaFlags.length > 0 ? betaFlagsFetcher(allBetaFlags) : Promise.resolve({}),
219787
+ allExpFlags.length > 0 ? expFlagsFetcher(allExpFlags) : Promise.resolve({})
219788
+ ]);
219685
219789
  return templates2.filter((ext) => {
219686
- let hasAnyNeededBetas = !ext.organizationBetaFlags || ext.organizationBetaFlags.every((flag) => enabledBetaFlags[flag]), satisfiesMinCliVersion = !ext.minimumCliVersion || versionSatisfies(version, `>=${ext.minimumCliVersion}`), satisfiesDeprecatedFromCliVersion = !ext.deprecatedFromCliVersion || versionSatisfies(version, `<${ext.deprecatedFromCliVersion}`), satisfiesVersion = satisfiesMinCliVersion && satisfiesDeprecatedFromCliVersion, satisfiesPreReleaseVersion = isPreReleaseVersion(version) && ext.deprecatedFromCliVersion === void 0;
219687
- return hasAnyNeededBetas && (satisfiesVersion || satisfiesPreReleaseVersion);
219790
+ let hasNeededBetaFlags = !ext.organizationBetaFlags || ext.organizationBetaFlags.every((flag) => enabledBetaFlags[flag]), hasNeededExpFlags = !ext.organizationExpFlags || ext.organizationExpFlags.every((flag) => enabledExpFlags[flag]), satisfiesMinCliVersion = !ext.minimumCliVersion || versionSatisfies(version, `>=${ext.minimumCliVersion}`), satisfiesDeprecatedFromCliVersion = !ext.deprecatedFromCliVersion || versionSatisfies(version, `<${ext.deprecatedFromCliVersion}`), satisfiesVersion = satisfiesMinCliVersion && satisfiesDeprecatedFromCliVersion, satisfiesPreReleaseVersion = isPreReleaseVersion(version) && ext.deprecatedFromCliVersion === void 0;
219791
+ return hasNeededBetaFlags && hasNeededExpFlags && (satisfiesVersion || satisfiesPreReleaseVersion);
219688
219792
  });
219689
219793
  }
219690
219794
  function experience(identifier) {
@@ -221731,13 +221835,16 @@ async function prepareAppStoreContext(flags) {
221731
221835
  }
221732
221836
  async function prepareExecuteContext(flags) {
221733
221837
  let query;
221734
- if (flags.query)
221838
+ if (flags.query !== void 0) {
221839
+ if (!flags.query.trim())
221840
+ throw new AbortError("The --query flag value is empty. Please provide a valid GraphQL query or mutation.");
221735
221841
  query = flags.query;
221736
- else if (flags["query-file"]) {
221842
+ } else if (flags["query-file"]) {
221737
221843
  let queryFile = flags["query-file"];
221738
221844
  if (!await fileExists(queryFile))
221739
221845
  throw new AbortError(outputContent`Query file not found at ${outputToken.path(queryFile)}. Please check the path and try again.`);
221740
- query = await readFile(queryFile, { encoding: "utf8" });
221846
+ if (query = await readFile(queryFile, { encoding: "utf8" }), !query.trim())
221847
+ throw new AbortError(outputContent`Query file at ${outputToken.path(queryFile)} is empty. Please provide a valid GraphQL query or mutation.`);
221741
221848
  }
221742
221849
  if (!query)
221743
221850
  throw new BugError("Query should have been provided via --query or --query-file flags due to exactlyOne constraint. This indicates the oclif flag validation failed.");
@@ -221834,11 +221941,6 @@ var ListBulkOperations = {
221834
221941
  kind: "VariableDefinition",
221835
221942
  variable: { kind: "Variable", name: { kind: "Name", value: "sortKey" } },
221836
221943
  type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "BulkOperationsSortKeys" } } }
221837
- },
221838
- {
221839
- kind: "VariableDefinition",
221840
- variable: { kind: "Variable", name: { kind: "Name", value: "reverse" } },
221841
- type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }
221842
221944
  }
221843
221945
  ],
221844
221946
  selectionSet: {
@@ -221862,11 +221964,6 @@ var ListBulkOperations = {
221862
221964
  kind: "Argument",
221863
221965
  name: { kind: "Name", value: "sortKey" },
221864
221966
  value: { kind: "Variable", name: { kind: "Name", value: "sortKey" } }
221865
- },
221866
- {
221867
- kind: "Argument",
221868
- name: { kind: "Name", value: "reverse" },
221869
- value: { kind: "Variable", name: { kind: "Name", value: "reverse" } }
221870
221967
  }
221871
221968
  ],
221872
221969
  selectionSet: {
@@ -221957,8 +222054,7 @@ async function listBulkOperations(options) {
221957
222054
  variables: {
221958
222055
  query: `created_at:>=${sevenDaysAgo}`,
221959
222056
  first: 100,
221960
- sortKey: "CREATED_AT",
221961
- reverse: !0
222057
+ sortKey: "CREATED_AT"
221962
222058
  },
221963
222059
  version: await resolveApiVersion({
221964
222060
  adminSession,
@@ -222172,7 +222268,7 @@ async function cancelBulkOperation(options) {
222172
222268
  version: API_VERSION
222173
222269
  });
222174
222270
  if (response.bulkOperationCancel?.userErrors?.length) {
222175
- renderBulkOperationUserErrors(response.bulkOperationCancel.userErrors, "Bulk operation cancellation errors.");
222271
+ renderBulkOperationUserErrors(response.bulkOperationCancel.userErrors, "Failed to cancel bulk operation.");
222176
222272
  return;
222177
222273
  }
222178
222274
  let operation = response.bulkOperationCancel?.bulkOperation;
@@ -222216,7 +222312,6 @@ var _a19, BulkCancel = class extends AppLinkedCommand {
222216
222312
  _a19 = BulkCancel;
222217
222313
  BulkCancel.summary = "Cancel a bulk operation.";
222218
222314
  BulkCancel.description = "Cancels a running bulk operation by ID.";
222219
- BulkCancel.hidden = !0;
222220
222315
  BulkCancel.flags = {
222221
222316
  ...globalFlags,
222222
222317
  ...appFlags,
@@ -222254,13 +222349,17 @@ var _a20, BulkStatus = class extends AppLinkedCommand {
222254
222349
  };
222255
222350
  _a20 = BulkStatus;
222256
222351
  BulkStatus.summary = "Check the status of bulk operations.";
222257
- BulkStatus.description = "Check the status of a specific bulk operation by ID, or list all bulk operations in the last 7 days.";
222258
- BulkStatus.hidden = !0;
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();
222259
222358
  BulkStatus.flags = {
222260
222359
  ...globalFlags,
222261
222360
  ...appFlags,
222262
222361
  id: import_core33.Flags.string({
222263
- 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.",
222264
222363
  env: "SHOPIFY_FLAG_ID"
222265
222364
  }),
222266
222365
  store: import_core33.Flags.string({
@@ -222466,8 +222565,8 @@ var import_ignore2 = __toESM(require_ignore(), 1), DEFAULT_DEBOUNCE_TIME_IN_MS =
222466
222565
  }
222467
222566
  updateApp(app) {
222468
222567
  this.app = app, this.extensionPaths = this.app.nonConfigExtensions.map((ext) => normalizePath(ext.directory)).filter((dir) => dir !== this.app.directory), this.extensionPaths.forEach((path3) => {
222469
- var _a48;
222470
- (_a48 = this.ignored)[path3] ?? (_a48[path3] = this.createIgnoreInstance(path3));
222568
+ var _a50;
222569
+ (_a50 = this.ignored)[path3] ?? (_a50[path3] = this.createIgnoreInstance(path3));
222471
222570
  });
222472
222571
  }
222473
222572
  addAbortListener() {
@@ -223791,7 +223890,8 @@ Deploy2.flags = {
223791
223890
  hidden: !1,
223792
223891
  description: "Creates a version but doesn't release it - it's not made available to merchants. With this flag, a user confirmation is not required.",
223793
223892
  env: "SHOPIFY_FLAG_NO_RELEASE",
223794
- default: !1
223893
+ default: !1,
223894
+ exclusive: ["allow-updates", "allow-deletes"]
223795
223895
  }),
223796
223896
  "no-build": import_core35.Flags.boolean({
223797
223897
  description: "Use with caution: Skips building any elements of the app that require building. You should ensure your app has been prepared in advance, such as by running `shopify app build` or by caching build artifacts.",
@@ -224052,6 +224152,9 @@ async function getUIExtensionPayload(extension, bundlePath, options) {
224052
224152
  lastUpdated: await fileLastUpdatedTimestamp(extensionOutputPath) ?? 0
224053
224153
  }
224054
224154
  },
224155
+ supportedFeatures: {
224156
+ offlineMode: extension.configuration.supported_features?.offline_mode ?? !1
224157
+ },
224055
224158
  capabilities: {
224056
224159
  blockProgress: extension.configuration.capabilities?.block_progress ?? !1,
224057
224160
  networkAccess: extension.configuration.capabilities?.network_access ?? !1,
@@ -224098,34 +224201,43 @@ async function getUIExtensionPayload(extension, bundlePath, options) {
224098
224201
  async function getExtensionPoints(extension, url) {
224099
224202
  let extensionPoints = extension.configuration.extension_points;
224100
224203
  return extension.type === "checkout_post_purchase" && (extensionPoints = [{ target: "purchase.post.render" }]), isNewExtensionPointsSchema(extensionPoints) ? Promise.all(extensionPoints.map(async (extensionPoint) => {
224101
- let { target, resource } = extensionPoint;
224102
- return {
224204
+ let { target, resource } = extensionPoint, payload = {
224103
224205
  ...extensionPoint,
224104
- ...extensionPoint.build_manifest ? { assets: await extractAssetsFromBuildManifest(extensionPoint.build_manifest, url, extension) } : {},
224105
224206
  surface: getExtensionPointTargetSurface(target),
224106
224207
  root: {
224107
224208
  url: `${url}/${target}`
224108
224209
  },
224109
224210
  resource: resource || { url: "" }
224110
224211
  };
224212
+ return "build_manifest" in extensionPoint ? {
224213
+ ...payload,
224214
+ ...await mapBuildManifestToPayload(extensionPoint.build_manifest, extensionPoint, url, extension)
224215
+ } : payload;
224111
224216
  })) : extensionPoints;
224112
224217
  }
224113
- async function extractAssetsFromBuildManifest(buildManifest, url, extension) {
224114
- if (!buildManifest?.assets)
224115
- return {};
224116
- let assets = {};
224117
- for (let [name, asset] of Object.entries(buildManifest.assets))
224118
- assets[name] = {
224119
- name,
224120
- url: `${url}${joinPath("/assets/", asset.filepath)}`,
224121
- // eslint-disable-next-line no-await-in-loop
224122
- lastUpdated: await fileLastUpdatedTimestamp(joinPath(dirname(extension.outputPath), asset.filepath)) ?? 0
224123
- };
224124
- return assets;
224218
+ async function defaultAssetMapper({ identifier, asset, url, extension }) {
224219
+ let payload = await getAssetPayload(identifier, asset, url, extension);
224220
+ return {
224221
+ assets: { [payload.name]: payload }
224222
+ };
224223
+ }
224224
+ async function mapBuildManifestToPayload(buildManifest, _extensionPoint, url, extension) {
224225
+ return buildManifest?.assets ? (await Promise.all(Object.entries(buildManifest.assets).map(async ([identifier, asset]) => defaultAssetMapper({ identifier, asset, url, extension })))).reduce((acc, result) => ({
224226
+ ...acc,
224227
+ ...result,
224228
+ assets: { ...acc.assets, ...result.assets }
224229
+ }), {}) : {};
224125
224230
  }
224126
224231
  function isNewExtensionPointsSchema(extensionPoints) {
224127
224232
  return Array.isArray(extensionPoints) && extensionPoints.every((extensionPoint) => typeof extensionPoint == "object");
224128
224233
  }
224234
+ async function getAssetPayload(name, asset, url, extension) {
224235
+ return {
224236
+ name,
224237
+ url: `${url}${joinPath("/assets/", asset.filepath)}`,
224238
+ lastUpdated: await fileLastUpdatedTimestamp(joinPath(dirname(extension.outputPath), asset.filepath)) ?? 0
224239
+ };
224240
+ }
224129
224241
 
224130
224242
  // ../app/dist/cli/utilities/app/app-url.js
224131
224243
  init_cjs_shims();
@@ -224999,7 +225111,7 @@ function getExtensionPayloadMiddleware({ devOptions, getExtensions: getExtension
224999
225111
  url: new URL("/extensions", devOptions.url).toString()
225000
225112
  },
225001
225113
  socket: {
225002
- url: getWebsocketUrl(devOptions)
225114
+ url: getWebSocketUrl(devOptions.url)
225003
225115
  },
225004
225116
  devConsole: {
225005
225117
  url: new URL("/extensions/dev-console", devOptions.url).toString()
@@ -225031,10 +225143,6 @@ function getExtensionPointMiddleware({ devOptions, getExtensions: getExtensions2
225031
225143
  await sendRedirect(response.event, url, 307);
225032
225144
  };
225033
225145
  }
225034
- function getWebsocketUrl(devOptions) {
225035
- let socket = new URL("/extensions", devOptions.url);
225036
- return socket.protocol = "wss:", socket.toString();
225037
- }
225038
225146
 
225039
225147
  // ../app/dist/cli/services/dev/extension/server.js
225040
225148
  import { createServer as createServer4 } from "http";
@@ -225708,7 +225816,7 @@ function graphiqlTemplate({ apiVersion, apiVersions, appName, appUrl, key, store
225708
225816
  {query: "{%if query.preface %}{{query.preface}}\\n{% endif %}{{query.query}}", variables: "{{query.variables}}"},
225709
225817
  {%endfor%}
225710
225818
  ],
225711
- isHeadersEditorEnabled: false,
225819
+ isHeadersEditorEnabled: true,
225712
225820
  }),
225713
225821
  document.getElementById('graphiql-explorer'),
225714
225822
  )
@@ -225932,6 +226040,35 @@ var import_react6 = __toESM(require_react(), 1), import_server8 = __toESM(requir
225932
226040
  </html>
225933
226041
  `;
225934
226042
 
226043
+ // ../app/dist/cli/services/dev/graphiql/utilities.js
226044
+ init_cjs_shims();
226045
+ var BLOCKED_HEADERS = /* @__PURE__ */ new Set([
226046
+ // Hop-by-hop headers (RFC 7230 Section 6.1)
226047
+ "connection",
226048
+ "keep-alive",
226049
+ "proxy-authenticate",
226050
+ "proxy-authorization",
226051
+ "te",
226052
+ "trailer",
226053
+ "transfer-encoding",
226054
+ "upgrade",
226055
+ // Headers the proxy controls
226056
+ "host",
226057
+ "content-length",
226058
+ "content-type",
226059
+ "accept",
226060
+ "user-agent",
226061
+ "authorization",
226062
+ "cookie",
226063
+ "x-shopify-access-token"
226064
+ ]);
226065
+ function filterCustomHeaders(headers) {
226066
+ let customHeaders = {};
226067
+ for (let [key, value] of Object.entries(headers))
226068
+ !BLOCKED_HEADERS.has(key.toLowerCase()) && typeof value == "string" && (customHeaders[key] = value);
226069
+ return customHeaders;
226070
+ }
226071
+
225935
226072
  // ../app/dist/cli/services/dev/graphiql/server.js
225936
226073
  var import_express = __toESM(require_express2(), 1), import_body_parser = __toESM(require_body_parser(), 1);
225937
226074
  import { createRequire as createRequire5 } from "module";
@@ -226025,8 +226162,9 @@ function setupGraphiQLServer({ stdout, port, appName, appUrl, apiKey, apiSecret,
226025
226162
  return;
226026
226163
  let graphqlUrl = adminUrl(storeFqdn, req.query.api_version);
226027
226164
  try {
226028
- let reqBody = JSON.stringify(req.body), runRequest = async () => {
226165
+ let reqBody = JSON.stringify(req.body), customHeaders = filterCustomHeaders(req.headers), runRequest = async () => {
226029
226166
  let headers = {
226167
+ ...customHeaders,
226030
226168
  Accept: "application/json",
226031
226169
  "Content-Type": "application/json",
226032
226170
  "X-Shopify-Access-Token": await token(),
@@ -226357,10 +226495,11 @@ var DevSession = class _DevSession {
226357
226495
  /**
226358
226496
  * Update the preview URL, it only changes if we move between a non-previewable state and a previewable state.
226359
226497
  * (i.e. if we go from a state with no extensions to a state with ui-extensions or vice versa)
226498
+ * Skip the dev console only when BOTH: SHOPIFY_CLI_1P_DEV is NOT enabled AND SHOPIFY_SKIP_LOCAL_DEV_CONSOLE is set.
226360
226499
  * @param event - The app event
226361
226500
  */
226362
226501
  updatePreviewURL(event) {
226363
- let newPreviewURL = event.app.allExtensions.filter((ext) => ext.isPreviewable).length > 0 ? this.options.appLocalProxyURL : this.options.appPreviewURL;
226502
+ let hasPreview = event.app.allExtensions.filter((ext) => ext.isPreviewable).length > 0, newPreviewURL = !(!firstPartyDev() && skipLocalDevConsole()) && hasPreview ? this.options.appLocalProxyURL : this.options.appPreviewURL;
226364
226503
  this.statusManager.updateStatus({ previewURL: newPreviewURL });
226365
226504
  }
226366
226505
  /**
@@ -226382,14 +226521,25 @@ var DevSession = class _DevSession {
226382
226521
  */
226383
226522
  async bundleExtensionsAndUpload(appEvent) {
226384
226523
  try {
226385
- let { manifest, inheritedModuleUids, assets } = await this.createManifest(appEvent), signedURL = await this.uploadAssetsIfNeeded(assets, !this.statusManager.status.isReady), payload = {
226386
- shopFqdn: this.options.storeFqdn,
226387
- appId: this.options.appId,
226388
- assetsUrl: signedURL,
226389
- manifest,
226390
- inheritedModuleUids
226391
- };
226392
- return this.statusManager.status.isReady ? this.devSessionUpdateWithRetry(payload) : this.devSessionCreateWithRetry(payload);
226524
+ let { manifest, inheritedModuleUids, assets } = await this.createManifest(appEvent), signedURL = await this.uploadAssetsIfNeeded(assets, !this.statusManager.status.isReady), websocketUrl = getWebSocketUrl(this.options.url);
226525
+ if (this.statusManager.status.isReady) {
226526
+ let payload = {
226527
+ shopFqdn: this.options.storeFqdn,
226528
+ appId: this.options.appId,
226529
+ assetsUrl: signedURL,
226530
+ manifest,
226531
+ inheritedModuleUids
226532
+ };
226533
+ return this.devSessionUpdateWithRetry(payload);
226534
+ } else {
226535
+ let payload = {
226536
+ shopFqdn: this.options.storeFqdn,
226537
+ appId: this.options.appId,
226538
+ assetsUrl: signedURL,
226539
+ websocketUrl
226540
+ };
226541
+ return this.devSessionCreateWithRetry(payload);
226542
+ }
226393
226543
  } catch (error) {
226394
226544
  if (error.statusCode === 401)
226395
226545
  throw new Error("Unauthorized");
@@ -227119,7 +227269,7 @@ function match(rules, req, websocket = !1) {
227119
227269
 
227120
227270
  // ../app/dist/cli/services/dev/processes/setup-dev-processes.js
227121
227271
  async function setupDevProcesses({ localApp, remoteAppUpdated, developerPlatformClient, remoteApp, storeFqdn, storeId, commandOptions, network, graphiqlPort, graphiqlKey }) {
227122
- let apiKey = remoteApp.apiKey, apiSecret = remoteApp.apiSecretKeys[0]?.secret ?? "", appPreviewUrl = buildAppURLForWeb(storeFqdn, apiKey), env4 = getEnvironmentVariables(), shouldRenderGraphiQL = !isTruthy(env4[environmentVariableNames.disableGraphiQLExplorer]), reloadedApp = await reloadApp(localApp), appWatcher = new AppEventWatcher(reloadedApp, network.proxyUrl), anyPreviewableExtensions = reloadedApp.allExtensions.some((ext) => ext.isPreviewable), devConsoleURL = `${network.proxyUrl}/extensions/dev-console`, previewURL = anyPreviewableExtensions ? devConsoleURL : appPreviewUrl, graphiqlURL = shouldRenderGraphiQL ? `http://localhost:${graphiqlPort}/graphiql${graphiqlKey ? `?key=${graphiqlKey}` : ""}` : void 0, devSessionStatusManager = new DevSessionStatusManager({ isReady: !1, previewURL, graphiqlURL }), processes = [
227272
+ let apiKey = remoteApp.apiKey, apiSecret = remoteApp.apiSecretKeys[0]?.secret ?? "", appPreviewUrl = buildAppURLForWeb(storeFqdn, apiKey), env4 = getEnvironmentVariables(), shouldRenderGraphiQL = !isTruthy(env4[environmentVariableNames.disableGraphiQLExplorer]), reloadedApp = await reloadApp(localApp), appWatcher = new AppEventWatcher(reloadedApp, network.proxyUrl), anyPreviewableExtensions = reloadedApp.allExtensions.some((ext) => ext.isPreviewable), devConsoleURL = `${network.proxyUrl}/extensions/dev-console`, previewURL = !(!firstPartyDev() && skipLocalDevConsole()) && anyPreviewableExtensions ? devConsoleURL : appPreviewUrl, graphiqlURL = shouldRenderGraphiQL ? `http://localhost:${graphiqlPort}/graphiql${graphiqlKey ? `?key=${graphiqlKey}` : ""}` : void 0, devSessionStatusManager = new DevSessionStatusManager({ isReady: !1, previewURL, graphiqlURL }), processes = [
227123
227273
  ...await setupWebProcesses({
227124
227274
  webs: reloadedApp.webs,
227125
227275
  proxyUrl: network.proxyUrl,
@@ -229083,8 +229233,7 @@ var StagedUploadsCreate = {
229083
229233
 
229084
229234
  // ../app/dist/cli/services/bulk-operations/stage-file.js
229085
229235
  async function stageFile(options) {
229086
- let { adminSession, variablesJsonl } = options, buffer = Buffer.from(variablesJsonl ? `${variablesJsonl}
229087
- ` : "", "utf-8"), filename = "bulk-variables.jsonl", size = buffer.length, response = await requestStagedUpload(adminSession, filename, size), target = validateStagedUploadResponse(response);
229236
+ let { adminSession, variablesJsonl } = options, buffer = Buffer.from(variablesJsonl ?? "", "utf-8"), filename = "bulk-variables.jsonl", size = buffer.length, response = await requestStagedUpload(adminSession, filename, size), target = validateStagedUploadResponse(response);
229088
229237
  return await uploadFileToStagedUrl(buffer, target.url, target.parameters, filename), target.stagedUploadKey;
229089
229238
  }
229090
229239
  async function requestStagedUpload(adminSession, filename, size) {
@@ -229352,10 +229501,17 @@ async function parseVariablesToJsonl(variables, variableFile) {
229352
229501
  return;
229353
229502
  }
229354
229503
  async function executeBulkOperation(input) {
229355
- let { organization, remoteApp, store, query, variables, variableFile, outputFile, watch = !1, version: userSpecifiedVersion } = input, adminSession = await createAdminSessionAsApp(remoteApp, store.shopDomain), version = await resolveApiVersion({
229356
- adminSession,
229357
- userSpecifiedVersion,
229358
- minimumDefaultVersion: BULK_OPERATIONS_MIN_API_VERSION
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 }
229359
229515
  }), variablesJsonl = await parseVariablesToJsonl(variables, variableFile);
229360
229516
  validateBulkOperationVariables(query, variablesJsonl), validateMutationStore(query, store), renderInfo({
229361
229517
  headline: "Starting bulk operation.",
@@ -229389,7 +229545,11 @@ async function executeBulkOperation(input) {
229389
229545
  }) : await renderBulkOperationResult(operation, outputFile);
229390
229546
  } else {
229391
229547
  let operation = await shortBulkOperationPoll(adminSession, createdOperation.id);
229392
- await renderBulkOperationResult(operation, outputFile);
229548
+ ["FAILED", "CANCELED", "EXPIRED"].includes(operation.status) ? await renderBulkOperationResult(operation, outputFile) : renderSuccess({
229549
+ headline: "Bulk operation is running.",
229550
+ body: statusCommandHelpMessage(operation.id),
229551
+ customSections: [{ body: [{ list: { items: [outputContent`ID: ${outputToken.cyan(operation.id)}`.value] } }] }]
229552
+ });
229393
229553
  }
229394
229554
  else
229395
229555
  throw renderWarning({
@@ -229450,6 +229610,8 @@ function resultsContainUserErrors(results) {
229450
229610
  });
229451
229611
  }
229452
229612
  function validateBulkOperationVariables(graphqlOperation, variablesJsonl) {
229613
+ if (isMutation(graphqlOperation) && !variablesJsonl)
229614
+ throw new AbortError(outputContent`Bulk mutations require variables. Provide a JSONL file with ${outputToken.yellow("--variable-file")} or individual JSON objects with ${outputToken.yellow("--variables")}.`);
229453
229615
  if (!isMutation(graphqlOperation) && variablesJsonl)
229454
229616
  throw new AbortError(outputContent`The ${outputToken.yellow("--variables")} and ${outputToken.yellow("--variable-file")} flags can only be used with mutations, not queries.`);
229455
229617
  }
@@ -229462,9 +229624,9 @@ function statusCommandHelpMessage(operationId) {
229462
229624
  }
229463
229625
 
229464
229626
  // ../app/dist/cli/commands/app/bulk/execute.js
229465
- var BulkExecute = class _BulkExecute extends AppLinkedCommand {
229627
+ var _a30, BulkExecute = class extends AppLinkedCommand {
229466
229628
  async run() {
229467
- let { flags } = await this.parse(_BulkExecute), { query, appContextResult, store } = await prepareExecuteContext(flags);
229629
+ let { flags } = await this.parse(_a30), { query, appContextResult, store } = await prepareExecuteContext(flags);
229468
229630
  return await executeBulkOperation({
229469
229631
  organization: appContextResult.organization,
229470
229632
  remoteApp: appContextResult.remoteApp,
@@ -229478,9 +229640,14 @@ var BulkExecute = class _BulkExecute extends AppLinkedCommand {
229478
229640
  }), { app: appContextResult.app };
229479
229641
  }
229480
229642
  };
229643
+ _a30 = BulkExecute;
229481
229644
  BulkExecute.summary = "Execute bulk operations.";
229482
- BulkExecute.description = "Executes an Admin API GraphQL query or mutation on the specified dev store, as a bulk operation.";
229483
- BulkExecute.hidden = !0;
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();
229484
229651
  BulkExecute.flags = {
229485
229652
  ...globalFlags,
229486
229653
  ...appFlags,
@@ -229515,18 +229682,14 @@ async function parseVariables(variables, variableFile) {
229515
229682
  }
229516
229683
  }
229517
229684
  async function executeOperation(input) {
229518
- let { organization, remoteApp, store, query, variables, variableFile, version: userSpecifiedVersion, outputFile } = input, adminSession = await createAdminSessionAsApp(remoteApp, store.shopDomain), version = await resolveApiVersion({ adminSession, userSpecifiedVersion });
229519
- renderInfo({
229520
- headline: "Executing GraphQL operation.",
229521
- body: [
229522
- {
229523
- list: {
229524
- items: formatOperationInfo({ organization, remoteApp, storeFqdn: store.shopDomain, version })
229525
- }
229526
- }
229527
- ]
229528
- });
229529
- 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);
229530
229693
  validateSingleOperation(query), validateMutationStore(query, store);
229531
229694
  try {
229532
229695
  let result = await renderSingleTask({
@@ -229562,9 +229725,9 @@ async function executeOperation(input) {
229562
229725
  }
229563
229726
 
229564
229727
  // ../app/dist/cli/commands/app/execute.js
229565
- var Execute = class _Execute extends AppLinkedCommand {
229728
+ var _a31, Execute = class extends AppLinkedCommand {
229566
229729
  async run() {
229567
- let { flags } = await this.parse(_Execute), { query, appContextResult, store } = await prepareExecuteContext(flags);
229730
+ let { flags } = await this.parse(_a31), { query, appContextResult, store } = await prepareExecuteContext(flags);
229568
229731
  return await executeOperation({
229569
229732
  organization: appContextResult.organization,
229570
229733
  remoteApp: appContextResult.remoteApp,
@@ -229577,9 +229740,10 @@ var Execute = class _Execute extends AppLinkedCommand {
229577
229740
  }), { app: appContextResult.app };
229578
229741
  }
229579
229742
  };
229743
+ _a31 = Execute;
229580
229744
  Execute.summary = "Execute GraphQL queries and mutations.";
229581
- Execute.hidden = !0;
229582
- Execute.description = "Executes an Admin API GraphQL query or mutation on the specified dev store.";
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();
229583
229747
  Execute.flags = {
229584
229748
  ...globalFlags,
229585
229749
  ...appFlags,
@@ -229683,9 +229847,9 @@ async function getOrGenerateSchemaPath(extension, appDirectory, clientId, forceR
229683
229847
  }
229684
229848
 
229685
229849
  // ../app/dist/cli/commands/app/function/build.js
229686
- var _a30, FunctionBuild = class extends AppUnlinkedCommand {
229850
+ var _a32, FunctionBuild = class extends AppUnlinkedCommand {
229687
229851
  async run() {
229688
- let { flags } = await this.parse(_a30), app = await localAppContext({
229852
+ let { flags } = await this.parse(_a32), app = await localAppContext({
229689
229853
  directory: flags.path,
229690
229854
  userProvidedConfigName: flags.config
229691
229855
  }), ourFunction = await chooseFunction(app, flags.path);
@@ -229698,10 +229862,10 @@ var _a30, FunctionBuild = class extends AppUnlinkedCommand {
229698
229862
  }), renderSuccess({ headline: "Function built successfully." }), { app };
229699
229863
  }
229700
229864
  };
229701
- _a30 = FunctionBuild;
229865
+ _a32 = FunctionBuild;
229702
229866
  FunctionBuild.summary = "Compile a function to wasm.";
229703
229867
  FunctionBuild.descriptionWithMarkdown = "Compiles the function in your current directory to WebAssembly (Wasm) for testing purposes.";
229704
- FunctionBuild.description = _a30.descriptionWithoutMarkdown();
229868
+ FunctionBuild.description = _a32.descriptionWithoutMarkdown();
229705
229869
  FunctionBuild.flags = {
229706
229870
  ...globalFlags,
229707
229871
  ...appFlags,
@@ -230073,9 +230237,9 @@ function getAllFunctionRunFileNames(functionRunsDir) {
230073
230237
  }
230074
230238
 
230075
230239
  // ../app/dist/cli/commands/app/function/replay.js
230076
- var import_core40 = __toESM(require_lib(), 1), _a31, FunctionReplay = class extends AppLinkedCommand {
230240
+ var import_core40 = __toESM(require_lib(), 1), _a33, FunctionReplay = class extends AppLinkedCommand {
230077
230241
  async run() {
230078
- let { flags } = await this.parse(_a31), { app } = await linkedAppContext({
230242
+ let { flags } = await this.parse(_a33), { app } = await linkedAppContext({
230079
230243
  directory: flags.path,
230080
230244
  clientId: flags["client-id"],
230081
230245
  forceRelink: flags.reset,
@@ -230091,10 +230255,10 @@ var import_core40 = __toESM(require_lib(), 1), _a31, FunctionReplay = class exte
230091
230255
  }), { app };
230092
230256
  }
230093
230257
  };
230094
- _a31 = FunctionReplay;
230258
+ _a33 = FunctionReplay;
230095
230259
  FunctionReplay.summary = "Replays a function run from an app log.";
230096
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).";
230097
- FunctionReplay.description = _a31.descriptionWithoutMarkdown();
230261
+ FunctionReplay.description = _a33.descriptionWithoutMarkdown();
230098
230262
  FunctionReplay.flags = {
230099
230263
  ...globalFlags,
230100
230264
  ...appFlags,
@@ -230119,9 +230283,9 @@ var replay_default = FunctionReplay;
230119
230283
  // ../app/dist/cli/commands/app/function/run.js
230120
230284
  init_cjs_shims();
230121
230285
  var import_core41 = __toESM(require_lib(), 1);
230122
- var _a32, DEFAULT_FUNCTION_EXPORT = "_start", FunctionRun = class extends AppUnlinkedCommand {
230286
+ var _a34, DEFAULT_FUNCTION_EXPORT = "_start", FunctionRun = class extends AppUnlinkedCommand {
230123
230287
  async run() {
230124
- let { flags } = await this.parse(_a32), functionExport = DEFAULT_FUNCTION_EXPORT, app = await localAppContext({
230288
+ let { flags } = await this.parse(_a34), functionExport = DEFAULT_FUNCTION_EXPORT, app = await localAppContext({
230125
230289
  directory: flags.path,
230126
230290
  userProvidedConfigName: flags.config
230127
230291
  }), ourFunction = await chooseFunction(app, flags.path);
@@ -230154,10 +230318,10 @@ var _a32, DEFAULT_FUNCTION_EXPORT = "_start", FunctionRun = class extends AppUnl
230154
230318
  }), { app };
230155
230319
  }
230156
230320
  };
230157
- _a32 = FunctionRun;
230321
+ _a34 = FunctionRun;
230158
230322
  FunctionRun.summary = "Run a function locally for testing.";
230159
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).";
230160
- FunctionRun.description = _a32.descriptionWithoutMarkdown();
230324
+ FunctionRun.description = _a34.descriptionWithoutMarkdown();
230161
230325
  FunctionRun.flags = {
230162
230326
  ...globalFlags,
230163
230327
  ...appFlags,
@@ -230180,9 +230344,9 @@ var run_default = FunctionRun;
230180
230344
  // ../app/dist/cli/commands/app/function/schema.js
230181
230345
  init_cjs_shims();
230182
230346
  var import_core42 = __toESM(require_lib(), 1);
230183
- var _a33, FetchSchema = class extends AppLinkedCommand {
230347
+ var _a35, FetchSchema = class extends AppLinkedCommand {
230184
230348
  async run() {
230185
- let { flags } = await this.parse(_a33), { app, developerPlatformClient, organization } = await linkedAppContext({
230349
+ let { flags } = await this.parse(_a35), { app, developerPlatformClient, organization } = await linkedAppContext({
230186
230350
  directory: flags.path,
230187
230351
  clientId: flags["client-id"],
230188
230352
  forceRelink: flags.reset,
@@ -230197,10 +230361,10 @@ var _a33, FetchSchema = class extends AppLinkedCommand {
230197
230361
  }), { app };
230198
230362
  }
230199
230363
  };
230200
- _a33 = FetchSchema;
230364
+ _a35 = FetchSchema;
230201
230365
  FetchSchema.summary = "Fetch the latest GraphQL schema for a function.";
230202
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.";
230203
- FetchSchema.description = _a33.descriptionWithoutMarkdown();
230367
+ FetchSchema.description = _a35.descriptionWithoutMarkdown();
230204
230368
  FetchSchema.flags = {
230205
230369
  ...globalFlags,
230206
230370
  ...appFlags,
@@ -230216,19 +230380,19 @@ var schema_default = FetchSchema;
230216
230380
 
230217
230381
  // ../app/dist/cli/commands/app/function/typegen.js
230218
230382
  init_cjs_shims();
230219
- var _a34, FunctionTypegen = class extends AppUnlinkedCommand {
230383
+ var _a36, FunctionTypegen = class extends AppUnlinkedCommand {
230220
230384
  async run() {
230221
- let { flags } = await this.parse(_a34), app = await localAppContext({
230385
+ let { flags } = await this.parse(_a36), app = await localAppContext({
230222
230386
  directory: flags.path,
230223
230387
  userProvidedConfigName: flags.config
230224
230388
  }), ourFunction = await chooseFunction(app, flags.path);
230225
230389
  return await buildGraphqlTypes(ourFunction, { stdout: process.stdout, stderr: process.stderr, app }), renderSuccess({ headline: "GraphQL types generated successfully." }), { app };
230226
230390
  }
230227
230391
  };
230228
- _a34 = FunctionTypegen;
230392
+ _a36 = FunctionTypegen;
230229
230393
  FunctionTypegen.summary = "Generate GraphQL types for a JavaScript function.";
230230
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.";
230231
- FunctionTypegen.description = _a34.descriptionWithoutMarkdown();
230395
+ FunctionTypegen.description = _a36.descriptionWithoutMarkdown();
230232
230396
  FunctionTypegen.flags = {
230233
230397
  ...globalFlags,
230234
230398
  ...appFlags,
@@ -230573,12 +230737,12 @@ var generate_default = generate;
230573
230737
 
230574
230738
  // ../app/dist/cli/commands/app/generate/extension.js
230575
230739
  var import_core43 = __toESM(require_lib(), 1);
230576
- var _a35, AppGenerateExtension = class extends AppLinkedCommand {
230740
+ var _a37, AppGenerateExtension = class extends AppLinkedCommand {
230577
230741
  static analyticsNameOverride() {
230578
230742
  return "app scaffold extension";
230579
230743
  }
230580
230744
  async run() {
230581
- let { flags } = await this.parse(_a35);
230745
+ let { flags } = await this.parse(_a37);
230582
230746
  await metadata_default.addPublicMetadata(() => ({
230583
230747
  cmd_scaffold_required_auth: !0,
230584
230748
  cmd_scaffold_template_custom: flags["clone-url"] !== void 0,
@@ -230607,13 +230771,13 @@ var _a35, AppGenerateExtension = class extends AppLinkedCommand {
230607
230771
  }), { app };
230608
230772
  }
230609
230773
  };
230610
- _a35 = AppGenerateExtension;
230774
+ _a37 = AppGenerateExtension;
230611
230775
  AppGenerateExtension.summary = "Generate a new app Extension.";
230612
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).
230613
230777
 
230614
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.
230615
230779
  `;
230616
- AppGenerateExtension.description = _a35.descriptionWithoutMarkdown();
230780
+ AppGenerateExtension.description = _a37.descriptionWithoutMarkdown();
230617
230781
  AppGenerateExtension.flags = {
230618
230782
  ...globalFlags,
230619
230783
  ...appFlags,
@@ -230652,12 +230816,12 @@ var extension_default2 = AppGenerateExtension;
230652
230816
 
230653
230817
  // ../app/dist/cli/commands/app/generate/schema.js
230654
230818
  init_cjs_shims();
230655
- var _a36, GenerateSchema = class extends schema_default {
230819
+ var _a38, GenerateSchema = class extends schema_default {
230656
230820
  };
230657
- _a36 = GenerateSchema;
230821
+ _a38 = GenerateSchema;
230658
230822
  GenerateSchema.hidden = !0;
230659
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.";
230660
- GenerateSchema.description = _a36.descriptionWithoutMarkdown();
230824
+ GenerateSchema.description = _a38.descriptionWithoutMarkdown();
230661
230825
  var schema_default2 = GenerateSchema;
230662
230826
 
230663
230827
  // ../app/dist/cli/commands/app/import-extensions.js
@@ -230873,9 +231037,9 @@ Directory components`.toUpperCase(),
230873
231037
 
230874
231038
  // ../app/dist/cli/commands/app/info.js
230875
231039
  var import_core45 = __toESM(require_lib(), 1);
230876
- var _a37, AppInfo2 = class extends AppLinkedCommand {
231040
+ var _a39, AppInfo2 = class extends AppLinkedCommand {
230877
231041
  async run() {
230878
- let { flags } = await this.parse(_a37), { app, remoteApp, organization, developerPlatformClient } = await linkedAppContext({
231042
+ let { flags } = await this.parse(_a39), { app, remoteApp, organization, developerPlatformClient } = await linkedAppContext({
230879
231043
  directory: flags.path,
230880
231044
  clientId: flags["client-id"],
230881
231045
  forceRelink: flags.reset,
@@ -230890,7 +231054,7 @@ var _a37, AppInfo2 = class extends AppLinkedCommand {
230890
231054
  return typeof results == "string" || "value" in results ? outputResult(results) : renderInfo({ customSections: results }), app.errors && process.exit(2), { app };
230891
231055
  }
230892
231056
  };
230893
- _a37 = AppInfo2;
231057
+ _a39 = AppInfo2;
230894
231058
  AppInfo2.summary = "Print basic information about your app and extensions.";
230895
231059
  AppInfo2.descriptionWithMarkdown = `The information returned includes the following:
230896
231060
 
@@ -230898,7 +231062,7 @@ AppInfo2.descriptionWithMarkdown = `The information returned includes the follow
230898
231062
  - The [structure](https://shopify.dev/docs/apps/tools/cli/structure) of your app project.
230899
231063
  - The [access scopes](https://shopify.dev/docs/api/usage) your app has requested.
230900
231064
  - System information, including the package manager and version of Shopify CLI used in the project.`;
230901
- AppInfo2.description = _a37.descriptionWithoutMarkdown();
231065
+ AppInfo2.description = _a39.descriptionWithoutMarkdown();
230902
231066
  AppInfo2.flags = {
230903
231067
  ...globalFlags,
230904
231068
  ...appFlags,
@@ -231225,9 +231389,9 @@ function validateFlavorValue(template, flavor) {
231225
231389
 
231226
231390
  // ../app/dist/cli/commands/app/init.js
231227
231391
  var import_core46 = __toESM(require_lib(), 1);
231228
- var _a38, Init3 = class extends AppLinkedCommand {
231392
+ var _a40, Init3 = class extends AppLinkedCommand {
231229
231393
  async run() {
231230
- let { flags } = await this.parse(_a38);
231394
+ let { flags } = await this.parse(_a40);
231231
231395
  validateTemplateValue(flags.template), validateFlavorValue(flags.template, flags.flavor);
231232
231396
  let inferredPackageManager = inferPackageManager(flags["package-manager"]), name = flags.name ?? await getAppName(flags.path), developerPlatformClient = selectDeveloperPlatformClient();
231233
231397
  await developerPlatformClient.session();
@@ -231264,7 +231428,7 @@ var _a38, Init3 = class extends AppLinkedCommand {
231264
231428
  return { app };
231265
231429
  }
231266
231430
  };
231267
- _a38 = Init3;
231431
+ _a40 = Init3;
231268
231432
  Init3.summary = "Create a new app project";
231269
231433
  Init3.flags = {
231270
231434
  ...globalFlags,
@@ -231391,9 +231555,9 @@ ${versionDetails.message}` : ""
231391
231555
 
231392
231556
  // ../app/dist/cli/commands/app/release.js
231393
231557
  var import_core47 = __toESM(require_lib(), 1);
231394
- var _a39, Release = class extends AppLinkedCommand {
231558
+ var _a41, Release = class extends AppLinkedCommand {
231395
231559
  async run() {
231396
- let { flags } = await this.parse(_a39), clientId = flags["client-id"];
231560
+ let { flags } = await this.parse(_a41), clientId = flags["client-id"];
231397
231561
  await addPublicMetadata(() => ({
231398
231562
  cmd_app_reset_used: flags.reset
231399
231563
  }));
@@ -231416,11 +231580,11 @@ var _a39, Release = class extends AppLinkedCommand {
231416
231580
  }), { app };
231417
231581
  }
231418
231582
  };
231419
- _a39 = Release;
231583
+ _a41 = Release;
231420
231584
  Release.summary = "Release an app version.";
231421
231585
  Release.usage = "app release --version <version>";
231422
231586
  Release.descriptionWithMarkdown = "Releases an existing app version. Pass the name of the version that you want to release using the `--version` flag.";
231423
- Release.description = _a39.descriptionWithoutMarkdown();
231587
+ Release.description = _a41.descriptionWithoutMarkdown();
231424
231588
  Release.flags = {
231425
231589
  ...globalFlags,
231426
231590
  ...appFlags,
@@ -231514,9 +231678,9 @@ async function versionList(options) {
231514
231678
  }
231515
231679
 
231516
231680
  // ../app/dist/cli/commands/app/versions/list.js
231517
- var _a40, VersionsList = class extends AppLinkedCommand {
231681
+ var _a42, VersionsList = class extends AppLinkedCommand {
231518
231682
  async run() {
231519
- let { flags } = await this.parse(_a40), { app, remoteApp, developerPlatformClient, organization } = await linkedAppContext({
231683
+ let { flags } = await this.parse(_a42), { app, remoteApp, developerPlatformClient, organization } = await linkedAppContext({
231520
231684
  directory: flags.path,
231521
231685
  clientId: flags["client-id"],
231522
231686
  forceRelink: flags.reset,
@@ -231531,10 +231695,10 @@ var _a40, VersionsList = class extends AppLinkedCommand {
231531
231695
  }), { app };
231532
231696
  }
231533
231697
  };
231534
- _a40 = VersionsList;
231698
+ _a42 = VersionsList;
231535
231699
  VersionsList.summary = "List deployed versions of your app.";
231536
231700
  VersionsList.descriptionWithMarkdown = "Lists the deployed app versions. An app version is a snapshot of your app extensions.";
231537
- VersionsList.description = _a40.descriptionWithoutMarkdown();
231701
+ VersionsList.description = _a42.descriptionWithoutMarkdown();
231538
231702
  VersionsList.flags = {
231539
231703
  ...globalFlags,
231540
231704
  ...appFlags,
@@ -231678,9 +231842,9 @@ function formatErrors(errors) {
231678
231842
 
231679
231843
  // ../app/dist/cli/commands/app/webhook/trigger.js
231680
231844
  var import_core48 = __toESM(require_lib(), 1);
231681
- var _a41, WebhookTrigger = class extends AppLinkedCommand {
231845
+ var _a43, WebhookTrigger = class extends AppLinkedCommand {
231682
231846
  async run() {
231683
- let { flags } = await this.parse(_a41);
231847
+ let { flags } = await this.parse(_a43);
231684
231848
  flags["shared-secret"] && renderWarning({
231685
231849
  headline: [
231686
231850
  "The flag shared-secret has been deprecated in favor of client-secret and will eventually be deleted."
@@ -231707,7 +231871,7 @@ var _a41, WebhookTrigger = class extends AppLinkedCommand {
231707
231871
  return await webhookTriggerService(usedFlags), { app: appContextResult.app };
231708
231872
  }
231709
231873
  };
231710
- _a41 = WebhookTrigger;
231874
+ _a43 = WebhookTrigger;
231711
231875
  WebhookTrigger.summary = "Trigger delivery of a sample webhook topic payload to a designated address.";
231712
231876
  WebhookTrigger.descriptionWithMarkdown = `
231713
231877
  Triggers the delivery of a sample Admin API event topic payload to a designated address.
@@ -231725,7 +231889,7 @@ WebhookTrigger.descriptionWithMarkdown = `
231725
231889
  - Trigger requests are rate-limited using the [Partner API rate limit](https://shopify.dev/docs/api/partner#rate_limits).
231726
231890
  - You can't use this method to validate your API webhook subscriptions.
231727
231891
  `;
231728
- WebhookTrigger.description = _a41.descriptionWithoutMarkdown();
231892
+ WebhookTrigger.description = _a43.descriptionWithoutMarkdown();
231729
231893
  WebhookTrigger.flags = {
231730
231894
  ...appFlags,
231731
231895
  help: import_core48.Flags.help({
@@ -231837,9 +232001,9 @@ async function devClean(options) {
231837
232001
 
231838
232002
  // ../app/dist/cli/commands/app/dev/clean.js
231839
232003
  var import_core49 = __toESM(require_lib(), 1);
231840
- var _a42, DevClean = class extends AppLinkedCommand {
232004
+ var _a44, DevClean = class extends AppLinkedCommand {
231841
232005
  async run() {
231842
- let { flags } = await this.parse(_a42), appContextResult = await linkedAppContext({
232006
+ let { flags } = await this.parse(_a44), appContextResult = await linkedAppContext({
231843
232007
  directory: flags.path,
231844
232008
  clientId: flags["client-id"],
231845
232009
  forceRelink: flags.reset,
@@ -231852,13 +232016,13 @@ var _a42, DevClean = class extends AppLinkedCommand {
231852
232016
  return await devClean({ appContextResult, store }), { app: appContextResult.app };
231853
232017
  }
231854
232018
  };
231855
- _a42 = DevClean;
232019
+ _a44 = DevClean;
231856
232020
  DevClean.summary = "Cleans up the dev preview from the selected store.";
231857
232021
  DevClean.descriptionWithMarkdown = `Stop the dev preview that was started with \`shopify app dev\`.
231858
232022
 
231859
232023
  It restores the app's active version to the selected development store.
231860
232024
  `;
231861
- DevClean.description = _a42.descriptionWithoutMarkdown();
232025
+ DevClean.description = _a44.descriptionWithoutMarkdown();
231862
232026
  DevClean.flags = {
231863
232027
  ...globalFlags,
231864
232028
  ...appFlags,
@@ -231961,9 +232125,9 @@ function functionInfo(ourFunction, options) {
231961
232125
  }
231962
232126
 
231963
232127
  // ../app/dist/cli/commands/app/function/info.js
231964
- var _a43, FunctionInfo = class extends AppUnlinkedCommand {
232128
+ var _a45, FunctionInfo = class extends AppUnlinkedCommand {
231965
232129
  async run() {
231966
- let { flags } = await this.parse(_a43), app = await localAppContext({
232130
+ let { flags } = await this.parse(_a45), app = await localAppContext({
231967
232131
  directory: flags.path,
231968
232132
  userProvidedConfigName: flags.config
231969
232133
  }), ourFunction = await chooseFunction(app, flags.path), functionRunner = functionRunnerBinary();
@@ -231978,7 +232142,7 @@ var _a43, FunctionInfo = class extends AppUnlinkedCommand {
231978
232142
  }), { app };
231979
232143
  }
231980
232144
  };
231981
- _a43 = FunctionInfo;
232145
+ _a45 = FunctionInfo;
231982
232146
  FunctionInfo.summary = "Print basic information about your function.";
231983
232147
  FunctionInfo.descriptionWithMarkdown = `The information returned includes the following:
231984
232148
 
@@ -231989,7 +232153,7 @@ FunctionInfo.descriptionWithMarkdown = `The information returned includes the fo
231989
232153
  - The schema path
231990
232154
  - The WASM path
231991
232155
  - The function runner path`;
231992
- FunctionInfo.description = _a43.descriptionWithoutMarkdown();
232156
+ FunctionInfo.description = _a45.descriptionWithoutMarkdown();
231993
232157
  FunctionInfo.flags = {
231994
232158
  ...globalFlags,
231995
232159
  ...appFlags,
@@ -232756,12 +232920,12 @@ function cleanPatch(patch) {
232756
232920
 
232757
232921
  // ../app/dist/cli/commands/app/import-custom-data-definitions.js
232758
232922
  var import_core50 = __toESM(require_lib(), 1);
232759
- var _a44, ImportCustomDataDefinitions = class extends AppLinkedCommand {
232923
+ var _a46, ImportCustomDataDefinitions = class extends AppLinkedCommand {
232760
232924
  async run() {
232761
232925
  let { appContextResult, ...options } = await renderSingleTask({
232762
232926
  title: outputContent`Loading application`,
232763
232927
  task: async () => {
232764
- let { flags } = await this.parse(_a44);
232928
+ let { flags } = await this.parse(_a46);
232765
232929
  await checkFolderIsValidApp(flags.path);
232766
232930
  let appContextResult2 = await linkedAppContext({
232767
232931
  directory: flags.path,
@@ -232785,10 +232949,10 @@ var _a44, ImportCustomDataDefinitions = class extends AppLinkedCommand {
232785
232949
  return await importDeclarativeDefinitions(options), { app: appContextResult.app };
232786
232950
  }
232787
232951
  };
232788
- _a44 = ImportCustomDataDefinitions;
232952
+ _a46 = ImportCustomDataDefinitions;
232789
232953
  ImportCustomDataDefinitions.summary = "Import metafield and metaobject definitions.";
232790
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).";
232791
- ImportCustomDataDefinitions.description = _a44.descriptionWithoutMarkdown();
232955
+ ImportCustomDataDefinitions.description = _a46.descriptionWithoutMarkdown();
232792
232956
  ImportCustomDataDefinitions.flags = {
232793
232957
  ...globalFlags,
232794
232958
  ...appFlags,
@@ -237059,12 +237223,12 @@ var autocorrectStatus = {
237059
237223
  };
237060
237224
 
237061
237225
  // ../plugin-did-you-mean/dist/commands/config/autocorrect/off.js
237062
- var _a45, AutocorrectOff = class extends base_command_default {
237226
+ var _a47, AutocorrectOff = class extends base_command_default {
237063
237227
  async run() {
237064
237228
  setAutocorrect(!1), renderInfo({ body: autocorrectStatus.off });
237065
237229
  }
237066
237230
  };
237067
- _a45 = AutocorrectOff;
237231
+ _a47 = AutocorrectOff;
237068
237232
  AutocorrectOff.summary = "Disable autocorrect. Off by default.";
237069
237233
  AutocorrectOff.descriptionWithMarkdown = `Disable autocorrect. Off by default.
237070
237234
 
@@ -237072,17 +237236,17 @@ AutocorrectOff.descriptionWithMarkdown = `Disable autocorrect. Off by default.
237072
237236
 
237073
237237
  When autocorrection is disabled, you need to confirm that you want to run corrections for mistyped commands.
237074
237238
  `;
237075
- AutocorrectOff.description = _a45.descriptionWithoutMarkdown();
237239
+ AutocorrectOff.description = _a47.descriptionWithoutMarkdown();
237076
237240
  var off_default = AutocorrectOff;
237077
237241
 
237078
237242
  // ../plugin-did-you-mean/dist/commands/config/autocorrect/status.js
237079
237243
  init_cjs_shims();
237080
- var _a46, AutocorrectStatus = class extends base_command_default {
237244
+ var _a48, AutocorrectStatus = class extends base_command_default {
237081
237245
  async run() {
237082
237246
  isAutocorrectEnabled() ? renderInfo({ body: autocorrectStatus.on }) : renderInfo({ body: autocorrectStatus.off });
237083
237247
  }
237084
237248
  };
237085
- _a46 = AutocorrectStatus;
237249
+ _a48 = AutocorrectStatus;
237086
237250
  AutocorrectStatus.summary = "Check whether autocorrect is enabled or disabled. On by default.";
237087
237251
  AutocorrectStatus.descriptionWithMarkdown = `Check whether autocorrect is enabled or disabled. On by default.
237088
237252
 
@@ -237090,17 +237254,17 @@ AutocorrectStatus.descriptionWithMarkdown = `Check whether autocorrect is enable
237090
237254
 
237091
237255
  When autocorrection is disabled, you need to confirm that you want to run corrections for mistyped commands.
237092
237256
  `;
237093
- AutocorrectStatus.description = _a46.descriptionWithoutMarkdown();
237257
+ AutocorrectStatus.description = _a48.descriptionWithoutMarkdown();
237094
237258
  var status_default2 = AutocorrectStatus;
237095
237259
 
237096
237260
  // ../plugin-did-you-mean/dist/commands/config/autocorrect/on.js
237097
237261
  init_cjs_shims();
237098
- var _a47, AutocorrectOn = class extends base_command_default {
237262
+ var _a49, AutocorrectOn = class extends base_command_default {
237099
237263
  async run() {
237100
237264
  setAutocorrect(!0), renderInfo({ body: autocorrectStatus.on });
237101
237265
  }
237102
237266
  };
237103
- _a47 = AutocorrectOn;
237267
+ _a49 = AutocorrectOn;
237104
237268
  AutocorrectOn.summary = "Enable autocorrect. Off by default.";
237105
237269
  AutocorrectOn.descriptionWithMarkdown = `Enable autocorrect. Off by default.
237106
237270
 
@@ -237108,7 +237272,7 @@ AutocorrectOn.descriptionWithMarkdown = `Enable autocorrect. Off by default.
237108
237272
 
237109
237273
  When autocorrection is disabled, you need to confirm that you want to run corrections for mistyped commands.
237110
237274
  `;
237111
- AutocorrectOn.description = _a47.descriptionWithoutMarkdown();
237275
+ AutocorrectOn.description = _a49.descriptionWithoutMarkdown();
237112
237276
  var on_default = AutocorrectOn;
237113
237277
 
237114
237278
  // ../../node_modules/.pnpm/n-gram@2.0.2/node_modules/n-gram/index.js