@eclipse-glsp/cli 2.8.0-next.16 → 2.8.0-next.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -7118,15 +7118,15 @@ var require_pattern = __commonJS({
7118
7118
  exports2.removeDuplicateSlashes = removeDuplicateSlashes;
7119
7119
  function partitionAbsoluteAndRelative(patterns) {
7120
7120
  const absolute = [];
7121
- const relative4 = [];
7121
+ const relative5 = [];
7122
7122
  for (const pattern of patterns) {
7123
7123
  if (isAbsolute(pattern)) {
7124
7124
  absolute.push(pattern);
7125
7125
  } else {
7126
- relative4.push(pattern);
7126
+ relative5.push(pattern);
7127
7127
  }
7128
7128
  }
7129
- return [absolute, relative4];
7129
+ return [absolute, relative5];
7130
7130
  }
7131
7131
  exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
7132
7132
  function isAbsolute(pattern) {
@@ -17212,10 +17212,10 @@ var require_resolve_block_map = __commonJS({
17212
17212
  let offset = bm.offset;
17213
17213
  let commentEnd = null;
17214
17214
  for (const collItem of bm.items) {
17215
- const { start, key, sep: sep2, value } = collItem;
17215
+ const { start, key, sep: sep3, value } = collItem;
17216
17216
  const keyProps = resolveProps.resolveProps(start, {
17217
17217
  indicator: "explicit-key-ind",
17218
- next: key ?? sep2?.[0],
17218
+ next: key ?? sep3?.[0],
17219
17219
  offset,
17220
17220
  onError,
17221
17221
  parentIndent: bm.indent,
@@ -17229,7 +17229,7 @@ var require_resolve_block_map = __commonJS({
17229
17229
  else if ("indent" in key && key.indent !== bm.indent)
17230
17230
  onError(offset, "BAD_INDENT", startColMsg);
17231
17231
  }
17232
- if (!keyProps.anchor && !keyProps.tag && !sep2) {
17232
+ if (!keyProps.anchor && !keyProps.tag && !sep3) {
17233
17233
  commentEnd = keyProps.end;
17234
17234
  if (keyProps.comment) {
17235
17235
  if (map.comment)
@@ -17253,7 +17253,7 @@ var require_resolve_block_map = __commonJS({
17253
17253
  ctx.atKey = false;
17254
17254
  if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))
17255
17255
  onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
17256
- const valueProps = resolveProps.resolveProps(sep2 ?? [], {
17256
+ const valueProps = resolveProps.resolveProps(sep3 ?? [], {
17257
17257
  indicator: "map-value-ind",
17258
17258
  next: value,
17259
17259
  offset: keyNode.range[2],
@@ -17269,7 +17269,7 @@ var require_resolve_block_map = __commonJS({
17269
17269
  if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024)
17270
17270
  onError(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key");
17271
17271
  }
17272
- const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep2, null, valueProps, onError);
17272
+ const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep3, null, valueProps, onError);
17273
17273
  if (ctx.schema.compat)
17274
17274
  utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);
17275
17275
  offset = valueNode.range[2];
@@ -17360,7 +17360,7 @@ var require_resolve_end = __commonJS({
17360
17360
  let comment = "";
17361
17361
  if (end) {
17362
17362
  let hasSpace = false;
17363
- let sep2 = "";
17363
+ let sep3 = "";
17364
17364
  for (const token of end) {
17365
17365
  const { source, type } = token;
17366
17366
  switch (type) {
@@ -17374,13 +17374,13 @@ var require_resolve_end = __commonJS({
17374
17374
  if (!comment)
17375
17375
  comment = cb;
17376
17376
  else
17377
- comment += sep2 + cb;
17378
- sep2 = "";
17377
+ comment += sep3 + cb;
17378
+ sep3 = "";
17379
17379
  break;
17380
17380
  }
17381
17381
  case "newline":
17382
17382
  if (comment)
17383
- sep2 += source;
17383
+ sep3 += source;
17384
17384
  hasSpace = true;
17385
17385
  break;
17386
17386
  default:
@@ -17423,18 +17423,18 @@ var require_resolve_flow_collection = __commonJS({
17423
17423
  let offset = fc.offset + fc.start.source.length;
17424
17424
  for (let i = 0; i < fc.items.length; ++i) {
17425
17425
  const collItem = fc.items[i];
17426
- const { start, key, sep: sep2, value } = collItem;
17426
+ const { start, key, sep: sep3, value } = collItem;
17427
17427
  const props = resolveProps.resolveProps(start, {
17428
17428
  flow: fcName,
17429
17429
  indicator: "explicit-key-ind",
17430
- next: key ?? sep2?.[0],
17430
+ next: key ?? sep3?.[0],
17431
17431
  offset,
17432
17432
  onError,
17433
17433
  parentIndent: fc.indent,
17434
17434
  startOnNewline: false
17435
17435
  });
17436
17436
  if (!props.found) {
17437
- if (!props.anchor && !props.tag && !sep2 && !value) {
17437
+ if (!props.anchor && !props.tag && !sep3 && !value) {
17438
17438
  if (i === 0 && props.comma)
17439
17439
  onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
17440
17440
  else if (i < fc.items.length - 1)
@@ -17488,8 +17488,8 @@ var require_resolve_flow_collection = __commonJS({
17488
17488
  }
17489
17489
  }
17490
17490
  }
17491
- if (!isMap && !sep2 && !props.found) {
17492
- const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep2, null, props, onError);
17491
+ if (!isMap && !sep3 && !props.found) {
17492
+ const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep3, null, props, onError);
17493
17493
  coll.items.push(valueNode);
17494
17494
  offset = valueNode.range[2];
17495
17495
  if (isBlock(value))
@@ -17501,7 +17501,7 @@ var require_resolve_flow_collection = __commonJS({
17501
17501
  if (isBlock(key))
17502
17502
  onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
17503
17503
  ctx.atKey = false;
17504
- const valueProps = resolveProps.resolveProps(sep2 ?? [], {
17504
+ const valueProps = resolveProps.resolveProps(sep3 ?? [], {
17505
17505
  flow: fcName,
17506
17506
  indicator: "map-value-ind",
17507
17507
  next: value,
@@ -17512,8 +17512,8 @@ var require_resolve_flow_collection = __commonJS({
17512
17512
  });
17513
17513
  if (valueProps.found) {
17514
17514
  if (!isMap && !props.found && ctx.options.strict) {
17515
- if (sep2)
17516
- for (const st of sep2) {
17515
+ if (sep3)
17516
+ for (const st of sep3) {
17517
17517
  if (st === valueProps.found)
17518
17518
  break;
17519
17519
  if (st.type === "newline") {
@@ -17530,7 +17530,7 @@ var require_resolve_flow_collection = __commonJS({
17530
17530
  else
17531
17531
  onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
17532
17532
  }
17533
- const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep2, null, valueProps, onError) : null;
17533
+ const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep3, null, valueProps, onError) : null;
17534
17534
  if (valueNode) {
17535
17535
  if (isBlock(value))
17536
17536
  onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
@@ -17710,7 +17710,7 @@ var require_resolve_block_scalar = __commonJS({
17710
17710
  chompStart = i + 1;
17711
17711
  }
17712
17712
  let value = "";
17713
- let sep2 = "";
17713
+ let sep3 = "";
17714
17714
  let prevMoreIndented = false;
17715
17715
  for (let i = 0; i < contentStart; ++i)
17716
17716
  value += lines[i][0].slice(trimIndent) + "\n";
@@ -17727,24 +17727,24 @@ var require_resolve_block_scalar = __commonJS({
17727
17727
  indent = "";
17728
17728
  }
17729
17729
  if (type === Scalar.Scalar.BLOCK_LITERAL) {
17730
- value += sep2 + indent.slice(trimIndent) + content;
17731
- sep2 = "\n";
17730
+ value += sep3 + indent.slice(trimIndent) + content;
17731
+ sep3 = "\n";
17732
17732
  } else if (indent.length > trimIndent || content[0] === " ") {
17733
- if (sep2 === " ")
17734
- sep2 = "\n";
17735
- else if (!prevMoreIndented && sep2 === "\n")
17736
- sep2 = "\n\n";
17737
- value += sep2 + indent.slice(trimIndent) + content;
17738
- sep2 = "\n";
17733
+ if (sep3 === " ")
17734
+ sep3 = "\n";
17735
+ else if (!prevMoreIndented && sep3 === "\n")
17736
+ sep3 = "\n\n";
17737
+ value += sep3 + indent.slice(trimIndent) + content;
17738
+ sep3 = "\n";
17739
17739
  prevMoreIndented = true;
17740
17740
  } else if (content === "") {
17741
- if (sep2 === "\n")
17741
+ if (sep3 === "\n")
17742
17742
  value += "\n";
17743
17743
  else
17744
- sep2 = "\n";
17744
+ sep3 = "\n";
17745
17745
  } else {
17746
- value += sep2 + content;
17747
- sep2 = " ";
17746
+ value += sep3 + content;
17747
+ sep3 = " ";
17748
17748
  prevMoreIndented = false;
17749
17749
  }
17750
17750
  }
@@ -17926,25 +17926,25 @@ var require_resolve_flow_scalar = __commonJS({
17926
17926
  if (!match2)
17927
17927
  return source;
17928
17928
  let res = match2[1];
17929
- let sep2 = " ";
17929
+ let sep3 = " ";
17930
17930
  let pos = first.lastIndex;
17931
17931
  line.lastIndex = pos;
17932
17932
  while (match2 = line.exec(source)) {
17933
17933
  if (match2[1] === "") {
17934
- if (sep2 === "\n")
17935
- res += sep2;
17934
+ if (sep3 === "\n")
17935
+ res += sep3;
17936
17936
  else
17937
- sep2 = "\n";
17937
+ sep3 = "\n";
17938
17938
  } else {
17939
- res += sep2 + match2[1];
17940
- sep2 = " ";
17939
+ res += sep3 + match2[1];
17940
+ sep3 = " ";
17941
17941
  }
17942
17942
  pos = line.lastIndex;
17943
17943
  }
17944
17944
  const last = /[ \t]*(.*)/sy;
17945
17945
  last.lastIndex = pos;
17946
17946
  match2 = last.exec(source);
17947
- return res + sep2 + (match2?.[1] ?? "");
17947
+ return res + sep3 + (match2?.[1] ?? "");
17948
17948
  }
17949
17949
  function doubleQuotedValue(source, onError) {
17950
17950
  let res = "";
@@ -18754,14 +18754,14 @@ var require_cst_stringify = __commonJS({
18754
18754
  }
18755
18755
  }
18756
18756
  }
18757
- function stringifyItem({ start, key, sep: sep2, value }) {
18757
+ function stringifyItem({ start, key, sep: sep3, value }) {
18758
18758
  let res = "";
18759
18759
  for (const st of start)
18760
18760
  res += st.source;
18761
18761
  if (key)
18762
18762
  res += stringifyToken(key);
18763
- if (sep2)
18764
- for (const st of sep2)
18763
+ if (sep3)
18764
+ for (const st of sep3)
18765
18765
  res += st.source;
18766
18766
  if (value)
18767
18767
  res += stringifyToken(value);
@@ -19928,18 +19928,18 @@ var require_parser = __commonJS({
19928
19928
  if (this.type === "map-value-ind") {
19929
19929
  const prev = getPrevProps(this.peek(2));
19930
19930
  const start = getFirstKeyStartProps(prev);
19931
- let sep2;
19931
+ let sep3;
19932
19932
  if (scalar.end) {
19933
- sep2 = scalar.end;
19934
- sep2.push(this.sourceToken);
19933
+ sep3 = scalar.end;
19934
+ sep3.push(this.sourceToken);
19935
19935
  delete scalar.end;
19936
19936
  } else
19937
- sep2 = [this.sourceToken];
19937
+ sep3 = [this.sourceToken];
19938
19938
  const map = {
19939
19939
  type: "block-map",
19940
19940
  offset: scalar.offset,
19941
19941
  indent: scalar.indent,
19942
- items: [{ start, key: scalar, sep: sep2 }]
19942
+ items: [{ start, key: scalar, sep: sep3 }]
19943
19943
  };
19944
19944
  this.onKeyLine = true;
19945
19945
  this.stack[this.stack.length - 1] = map;
@@ -20092,15 +20092,15 @@ var require_parser = __commonJS({
20092
20092
  } else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
20093
20093
  const start2 = getFirstKeyStartProps(it.start);
20094
20094
  const key = it.key;
20095
- const sep2 = it.sep;
20096
- sep2.push(this.sourceToken);
20095
+ const sep3 = it.sep;
20096
+ sep3.push(this.sourceToken);
20097
20097
  delete it.key;
20098
20098
  delete it.sep;
20099
20099
  this.stack.push({
20100
20100
  type: "block-map",
20101
20101
  offset: this.offset,
20102
20102
  indent: this.indent,
20103
- items: [{ start: start2, key, sep: sep2 }]
20103
+ items: [{ start: start2, key, sep: sep3 }]
20104
20104
  });
20105
20105
  } else if (start.length > 0) {
20106
20106
  it.sep = it.sep.concat(start, this.sourceToken);
@@ -20294,13 +20294,13 @@ var require_parser = __commonJS({
20294
20294
  const prev = getPrevProps(parent);
20295
20295
  const start = getFirstKeyStartProps(prev);
20296
20296
  fixFlowSeqItems(fc);
20297
- const sep2 = fc.end.splice(1, fc.end.length);
20298
- sep2.push(this.sourceToken);
20297
+ const sep3 = fc.end.splice(1, fc.end.length);
20298
+ sep3.push(this.sourceToken);
20299
20299
  const map = {
20300
20300
  type: "block-map",
20301
20301
  offset: fc.offset,
20302
20302
  indent: fc.indent,
20303
- items: [{ start, key: fc, sep: sep2 }]
20303
+ items: [{ start, key: fc, sep: sep3 }]
20304
20304
  };
20305
20305
  this.onKeyLine = true;
20306
20306
  this.stack[this.stack.length - 1] = map;
@@ -23166,8 +23166,10 @@ function resolveFiles(files) {
23166
23166
  return filesArray.map((f) => path5.resolve(f));
23167
23167
  }
23168
23168
  var _globbySync;
23169
+ var _isIgnoredByIgnoreFilesSync;
23169
23170
  var _globbyReady = Promise.resolve().then(() => (init_globby(), globby_exports)).then((m) => {
23170
23171
  _globbySync = m.globbySync;
23172
+ _isIgnoredByIgnoreFilesSync = m.isIgnoredByIgnoreFilesSync;
23171
23173
  });
23172
23174
  async function initGlobby() {
23173
23175
  await _globbyReady;
@@ -23178,6 +23180,12 @@ function globby2(patterns, options) {
23178
23180
  }
23179
23181
  return _globbySync(patterns, options);
23180
23182
  }
23183
+ function isIgnoredByIgnoreFiles2(patterns, options) {
23184
+ if (!_isIgnoredByIgnoreFilesSync) {
23185
+ throw new Error("globby not initialized. Call initGlobby() before using glob functions.");
23186
+ }
23187
+ return _isIgnoredByIgnoreFilesSync(patterns, options);
23188
+ }
23181
23189
  function findFiles(paths, pattern = "**/*") {
23182
23190
  const results = [];
23183
23191
  const resolvedPaths = resolveFiles(paths);
@@ -23251,7 +23259,7 @@ var child = __toESM(require("child_process"));
23251
23259
  var path6 = __toESM(require("path"));
23252
23260
 
23253
23261
  // package.json
23254
- var version = "2.8.0-next.16";
23262
+ var version = "2.8.0-next.18";
23255
23263
 
23256
23264
  // src/util/logger.ts
23257
23265
  var levels = {
@@ -23902,11 +23910,11 @@ function generateIndex(rootDir, options) {
23902
23910
  ignore,
23903
23911
  cwd,
23904
23912
  onlyFiles: options.singleIndex,
23905
- markDirectories: true,
23906
- ignoreFiles: "**/" + options.ignoreFile
23913
+ markDirectories: true
23907
23914
  };
23908
23915
  LOGGER.debug("Search for children using the following glob options", globOptions);
23909
- const files = globby2(pattern, globOptions);
23916
+ const isIgnored = createIgnoreFilter(cwd, options.ignoreFile);
23917
+ const files = globby2(pattern, globOptions).filter((file) => !isIgnored(file));
23910
23918
  LOGGER.debug("All children considered in the input directory", files);
23911
23919
  const relativeRootDirectory = "";
23912
23920
  if (options.singleIndex) {
@@ -23921,6 +23929,20 @@ function generateIndex(rootDir, options) {
23921
23929
  }
23922
23930
  }
23923
23931
  }
23932
+ function createIgnoreFilter(rootDir, ignoreFileName) {
23933
+ const ignoreRoot = isGitRepository(rootDir) ? getGitRoot(rootDir) : rootDir;
23934
+ const isIgnored = isIgnoredByIgnoreFiles2("**/" + ignoreFileName, { cwd: ignoreRoot });
23935
+ return (file) => {
23936
+ let relative5 = path9.relative(ignoreRoot, path9.join(rootDir, file)).split(path9.sep).join("/");
23937
+ if (relative5 === "") {
23938
+ return false;
23939
+ }
23940
+ if (isDirectory2(file)) {
23941
+ relative5 += "/";
23942
+ }
23943
+ return isIgnored(relative5);
23944
+ };
23945
+ }
23924
23946
  function isDirectChild(parent, child2, childHasChildren) {
23925
23947
  return isChildFile(parent, child2) || isChildDirectory(parent, child2) && childHasChildren();
23926
23948
  }
@@ -24218,8 +24240,8 @@ function createTheiaCompatTable(rows) {
24218
24240
  const col2w = Math.max(col2Header.length, ...rows.map((r) => r.range.length));
24219
24241
  const cell = (text, w) => ` ${text.padEnd(w, " ")} `;
24220
24242
  const formatRow = (v, r) => `|${cell(v, col1w)}|${cell(r, col2w)}|`;
24221
- const sep2 = `|${"-".repeat(col1w + 2)}|${"-".repeat(col2w + 2)}|`;
24222
- const lines = [formatRow(col1Header, col2Header), sep2, ...rows.map((row) => formatRow(row.version, row.range))];
24243
+ const sep3 = `|${"-".repeat(col1w + 2)}|${"-".repeat(col2w + 2)}|`;
24244
+ const lines = [formatRow(col1Header, col2Header), sep3, ...rows.map((row) => formatRow(row.version, row.range))];
24223
24245
  return lines.join("\n");
24224
24246
  }
24225
24247
  async function setVersionJavaServer(options) {
@@ -25193,9 +25215,9 @@ function applyLinkOverrides(repoDir, links) {
25193
25215
  const source = fs13.existsSync(yamlPath) ? readFile(yamlPath) : "";
25194
25216
  const doc = source ? YAML.parseDocument(source) : new YAML.Document({});
25195
25217
  for (const [name, target] of Object.entries(links)) {
25196
- const relative4 = path18.relative(repoDir, target) || ".";
25197
- doc.setIn(["overrides", name], `link:${relative4}`);
25198
- LOGGER.debug(`Link ${name} -> link:${relative4}`);
25218
+ const relative5 = path18.relative(repoDir, target) || ".";
25219
+ doc.setIn(["overrides", name], `link:${relative5}`);
25220
+ LOGGER.debug(`Link ${name} -> link:${relative5}`);
25199
25221
  }
25200
25222
  writeFile(yamlPath, doc.toString({ indent: detectIndent(source) }));
25201
25223
  }