@elizaos/config 1.7.1-alpha.1 → 1.7.1-alpha.2

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 (2) hide show
  1. package/dist/index.js +32 -9
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -185598,10 +185598,15 @@ var require_lib4 = __commonJS((exports) => {
185598
185598
  }
185599
185599
  var ts9__default = /* @__PURE__ */ _interopDefault(ts9);
185600
185600
  function forEachToken(node, callback, sourceFile = node.getSourceFile()) {
185601
+ for (const token of iterateTokens(node, sourceFile)) {
185602
+ callback(token);
185603
+ }
185604
+ }
185605
+ function* iterateTokens(node, sourceFile = node.getSourceFile()) {
185601
185606
  const queue = [];
185602
185607
  while (true) {
185603
185608
  if (ts9__default.default.isTokenKind(node.kind)) {
185604
- callback(node);
185609
+ yield node;
185605
185610
  } else {
185606
185611
  const children = node.getChildren(sourceFile);
185607
185612
  if (children.length === 1) {
@@ -185619,21 +185624,28 @@ var require_lib4 = __commonJS((exports) => {
185619
185624
  }
185620
185625
  }
185621
185626
  function forEachComment(node, callback, sourceFile = node.getSourceFile()) {
185627
+ const fullText = sourceFile.text;
185628
+ for (const { end, kind, pos } of iterateComments(node, sourceFile)) {
185629
+ callback(fullText, { end, kind, pos });
185630
+ }
185631
+ }
185632
+ function* iterateComments(node, sourceFile = node.getSourceFile()) {
185622
185633
  const fullText = sourceFile.text;
185623
185634
  const notJsx = sourceFile.languageVariant !== ts9__default.default.LanguageVariant.JSX;
185624
- return forEachToken(node, (token) => {
185635
+ for (const token of iterateTokens(node, sourceFile)) {
185625
185636
  if (token.pos === token.end) {
185626
- return;
185637
+ continue;
185627
185638
  }
185628
185639
  if (token.kind !== ts9__default.default.SyntaxKind.JsxText) {
185629
- ts9__default.default.forEachLeadingCommentRange(fullText, token.pos === 0 ? (ts9__default.default.getShebang(fullText) ?? "").length : token.pos, commentCallback);
185640
+ yield* collectComments((callback) => {
185641
+ ts9__default.default.forEachLeadingCommentRange(fullText, token.pos === 0 ? (ts9__default.default.getShebang(fullText) ?? "").length : token.pos, callback);
185642
+ }, fullText);
185630
185643
  }
185631
185644
  if (notJsx || canHaveTrailingTrivia(token)) {
185632
- return ts9__default.default.forEachTrailingCommentRange(fullText, token.end, commentCallback);
185645
+ yield* collectComments((callback) => {
185646
+ ts9__default.default.forEachTrailingCommentRange(fullText, token.end, callback);
185647
+ }, fullText);
185633
185648
  }
185634
- }, sourceFile);
185635
- function commentCallback(pos, end, kind) {
185636
- callback(fullText, { end, kind, pos });
185637
185649
  }
185638
185650
  }
185639
185651
  function canHaveTrailingTrivia(token) {
@@ -185655,6 +185667,15 @@ var require_lib4 = __commonJS((exports) => {
185655
185667
  }
185656
185668
  return true;
185657
185669
  }
185670
+ function collectComments(execute, fullText) {
185671
+ const comments = [];
185672
+ execute((pos, end, kind) => {
185673
+ const text = fullText.slice(pos, end);
185674
+ const value = text.slice(2, kind === ts9__default.default.SyntaxKind.SingleLineCommentTrivia ? undefined : -2);
185675
+ comments.push({ end, kind, pos, text, value });
185676
+ });
185677
+ return comments;
185678
+ }
185658
185679
  function isJsxElementOrFragment(node) {
185659
185680
  return node.kind === ts9__default.default.SyntaxKind.JsxElement || node.kind === ts9__default.default.SyntaxKind.JsxFragment;
185660
185681
  }
@@ -186514,7 +186535,7 @@ var require_lib4 = __commonJS((exports) => {
186514
186535
  if (propertySymbol === undefined || !("links" in propertySymbol)) {
186515
186536
  return false;
186516
186537
  }
186517
- return isTransientSymbolLinksFlagSet(propertySymbol.links, ts9__default.default.CheckFlags.Readonly);
186538
+ return !!propertySymbol.links && isTransientSymbolLinksFlagSet(propertySymbol.links, ts9__default.default.CheckFlags.Readonly);
186518
186539
  }
186519
186540
  case ts9__default.default.SyntaxKind.PrefixUnaryExpression:
186520
186541
  if (current.kind !== ts9__default.default.SyntaxKind.NumericLiteral) {
@@ -187599,6 +187620,8 @@ var require_lib4 = __commonJS((exports) => {
187599
187620
  exports.isValidPropertyAccess = isValidPropertyAccess;
187600
187621
  exports.isVariableLikeDeclaration = isVariableLikeDeclaration;
187601
187622
  exports.isVoidKeyword = isVoidKeyword;
187623
+ exports.iterateComments = iterateComments;
187624
+ exports.iterateTokens = iterateTokens;
187602
187625
  exports.symbolHasReadonlyDeclaration = symbolHasReadonlyDeclaration;
187603
187626
  exports.typeConstituents = typeConstituents;
187604
187627
  exports.typeIsLiteral = typeIsLiteral;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elizaos/config",
3
3
  "description": "Shared configuration for ElizaOS projects and plugins",
4
- "version": "1.7.1-alpha.1",
4
+ "version": "1.7.1-alpha.2",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -51,5 +51,5 @@
51
51
  "publishConfig": {
52
52
  "access": "public"
53
53
  },
54
- "gitHead": "75764f7091a90a2dcc6e9a05ccdddc1f36c0b1ce"
54
+ "gitHead": "2135956b37ae30854dda97cf86dfe4d0f1494cc2"
55
55
  }