@settlemint/sdk-cli 2.2.3-pr342c24ef → 2.2.3-pr3af5b36a

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
@@ -238324,8 +238324,7 @@ var require_anchors = __commonJS((exports) => {
238324
238324
  return {
238325
238325
  onAnchor: (source) => {
238326
238326
  aliasObjects.push(source);
238327
- if (!prevAnchors)
238328
- prevAnchors = anchorNames(doc);
238327
+ prevAnchors ?? (prevAnchors = anchorNames(doc));
238329
238328
  const anchor = findNewAnchor(prefix, prevAnchors);
238330
238329
  prevAnchors.add(anchor);
238331
238330
  return anchor;
@@ -238480,23 +238479,35 @@ var require_Alias = __commonJS((exports) => {
238480
238479
  }
238481
238480
  });
238482
238481
  }
238483
- resolve(doc) {
238482
+ resolve(doc, ctx) {
238483
+ let nodes;
238484
+ if (ctx?.aliasResolveCache) {
238485
+ nodes = ctx.aliasResolveCache;
238486
+ } else {
238487
+ nodes = [];
238488
+ visit2.visit(doc, {
238489
+ Node: (_key, node) => {
238490
+ if (identity2.isAlias(node) || identity2.hasAnchor(node))
238491
+ nodes.push(node);
238492
+ }
238493
+ });
238494
+ if (ctx)
238495
+ ctx.aliasResolveCache = nodes;
238496
+ }
238484
238497
  let found = undefined;
238485
- visit2.visit(doc, {
238486
- Node: (_key, node) => {
238487
- if (node === this)
238488
- return visit2.visit.BREAK;
238489
- if (node.anchor === this.source)
238490
- found = node;
238491
- }
238492
- });
238498
+ for (const node of nodes) {
238499
+ if (node === this)
238500
+ break;
238501
+ if (node.anchor === this.source)
238502
+ found = node;
238503
+ }
238493
238504
  return found;
238494
238505
  }
238495
238506
  toJSON(_arg, ctx) {
238496
238507
  if (!ctx)
238497
238508
  return { source: this.source };
238498
238509
  const { anchors: anchors2, doc, maxAliasCount } = ctx;
238499
- const source = this.resolve(doc);
238510
+ const source = this.resolve(doc, ctx);
238500
238511
  if (!source) {
238501
238512
  const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
238502
238513
  throw new ReferenceError(msg);
@@ -238620,8 +238631,7 @@ var require_createNode = __commonJS((exports) => {
238620
238631
  if (aliasDuplicateObjects && value4 && typeof value4 === "object") {
238621
238632
  ref = sourceObjects.get(value4);
238622
238633
  if (ref) {
238623
- if (!ref.anchor)
238624
- ref.anchor = onAnchor(value4);
238634
+ ref.anchor ?? (ref.anchor = onAnchor(value4));
238625
238635
  return new Alias.Alias(ref.anchor);
238626
238636
  } else {
238627
238637
  ref = { anchor: null, node: null };
@@ -239164,7 +239174,7 @@ ${indent2}${start3}${value4}${end}`;
239164
239174
  `) || inFlow && /[[\]{},]/.test(value4)) {
239165
239175
  return quotedString(value4, ctx);
239166
239176
  }
239167
- if (!value4 || /^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value4)) {
239177
+ if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value4)) {
239168
239178
  return implicitKey || inFlow || !value4.includes(`
239169
239179
  `) ? quotedString(value4, ctx) : blockString4(item, ctx, onComment, onChompKeep);
239170
239180
  }
@@ -239295,7 +239305,7 @@ var require_stringify = __commonJS((exports) => {
239295
239305
  tagObj = tags.find((t9) => t9.nodeClass && obj instanceof t9.nodeClass);
239296
239306
  }
239297
239307
  if (!tagObj) {
239298
- const name3 = obj?.constructor?.name ?? typeof obj;
239308
+ const name3 = obj?.constructor?.name ?? (obj === null ? "null" : typeof obj);
239299
239309
  throw new Error(`Tag not resolved for ${name3} value`);
239300
239310
  }
239301
239311
  return tagObj;
@@ -239309,7 +239319,7 @@ var require_stringify = __commonJS((exports) => {
239309
239319
  anchors$1.add(anchor);
239310
239320
  props.push(`&${anchor}`);
239311
239321
  }
239312
- const tag = node.tag ? node.tag : tagObj.default ? null : tagObj.tag;
239322
+ const tag = node.tag ?? (tagObj.default ? null : tagObj.tag);
239313
239323
  if (tag)
239314
239324
  props.push(doc.directives.tagString(tag));
239315
239325
  return props.join(" ");
@@ -239332,8 +239342,7 @@ var require_stringify = __commonJS((exports) => {
239332
239342
  }
239333
239343
  let tagObj = undefined;
239334
239344
  const node = identity2.isNode(item) ? item : ctx.doc.createNode(item, { onTagObj: (o9) => tagObj = o9 });
239335
- if (!tagObj)
239336
- tagObj = getTagObject(ctx.doc.schema.tags, node);
239345
+ tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node));
239337
239346
  const props = stringifyProps(node, tagObj, ctx);
239338
239347
  if (props.length > 0)
239339
239348
  ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;
@@ -239485,7 +239494,7 @@ ${ctx.indent}`;
239485
239494
 
239486
239495
  // ../../node_modules/yaml/dist/log.js
239487
239496
  var require_log = __commonJS((exports) => {
239488
- var node_process = __require("node:process");
239497
+ var node_process = __require("process");
239489
239498
  function debug3(logLevel, ...messages) {
239490
239499
  if (logLevel === "debug")
239491
239500
  console.log(...messages);
@@ -240310,7 +240319,7 @@ var require_schema3 = __commonJS((exports) => {
240310
240319
 
240311
240320
  // ../../node_modules/yaml/dist/schema/yaml-1.1/binary.js
240312
240321
  var require_binary = __commonJS((exports) => {
240313
- var node_buffer = __require("node:buffer");
240322
+ var node_buffer = __require("buffer");
240314
240323
  var Scalar = require_Scalar();
240315
240324
  var stringifyString = require_stringifyString();
240316
240325
  var binary = {
@@ -240346,8 +240355,7 @@ var require_binary = __commonJS((exports) => {
240346
240355
  } else {
240347
240356
  throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");
240348
240357
  }
240349
- if (!type4)
240350
- type4 = Scalar.Scalar.BLOCK_LITERAL;
240358
+ type4 ?? (type4 = Scalar.Scalar.BLOCK_LITERAL);
240351
240359
  if (type4 !== Scalar.Scalar.QUOTE_DOUBLE) {
240352
240360
  const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);
240353
240361
  const n7 = Math.ceil(str.length / lineWidth);
@@ -241437,8 +241445,7 @@ var require_resolve_props = __commonJS((exports) => {
241437
241445
  if (token.source.endsWith(":"))
241438
241446
  onError(token.offset + token.source.length - 1, "BAD_ALIAS", "Anchor ending in : is ambiguous", true);
241439
241447
  anchor = token;
241440
- if (start3 === null)
241441
- start3 = token.offset;
241448
+ start3 ?? (start3 = token.offset);
241442
241449
  atNewline = false;
241443
241450
  hasSpace = false;
241444
241451
  reqSpace = true;
@@ -241447,8 +241454,7 @@ var require_resolve_props = __commonJS((exports) => {
241447
241454
  if (tag)
241448
241455
  onError(token, "MULTIPLE_TAGS", "A node can have at most one tag");
241449
241456
  tag = token;
241450
- if (start3 === null)
241451
- start3 = token.offset;
241457
+ start3 ?? (start3 = token.offset);
241452
241458
  atNewline = false;
241453
241459
  hasSpace = false;
241454
241460
  reqSpace = true;
@@ -242508,8 +242514,7 @@ var require_compose_scalar = __commonJS((exports) => {
242508
242514
  var require_util_empty_scalar_position = __commonJS((exports) => {
242509
242515
  function emptyScalarPosition(offset, before, pos) {
242510
242516
  if (before) {
242511
- if (pos === null)
242512
- pos = before.length;
242517
+ pos ?? (pos = before.length);
242513
242518
  for (let i7 = pos - 1;i7 >= 0; --i7) {
242514
242519
  let st2 = before[i7];
242515
242520
  switch (st2.type) {
@@ -242672,7 +242677,7 @@ var require_compose_doc = __commonJS((exports) => {
242672
242677
 
242673
242678
  // ../../node_modules/yaml/dist/compose/composer.js
242674
242679
  var require_composer = __commonJS((exports) => {
242675
- var node_process = __require("node:process");
242680
+ var node_process = __require("process");
242676
242681
  var directives4 = require_directives2();
242677
242682
  var Document = require_Document();
242678
242683
  var errors2 = require_errors3();
@@ -243883,7 +243888,7 @@ var require_line_counter = __commonJS((exports) => {
243883
243888
 
243884
243889
  // ../../node_modules/yaml/dist/parse/parser.js
243885
243890
  var require_parser2 = __commonJS((exports) => {
243886
- var node_process = __require("node:process");
243891
+ var node_process = __require("process");
243887
243892
  var cst = require_cst();
243888
243893
  var lexer = require_lexer2();
243889
243894
  function includesToken(list3, type4) {
@@ -255163,7 +255168,7 @@ function pruneCurrentEnv(currentEnv, env2) {
255163
255168
  var package_default = {
255164
255169
  name: "@settlemint/sdk-cli",
255165
255170
  description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
255166
- version: "2.2.3-pr342c24ef",
255171
+ version: "2.2.3-pr3af5b36a",
255167
255172
  type: "module",
255168
255173
  private: false,
255169
255174
  license: "FSL-1.1-MIT",
@@ -255212,8 +255217,8 @@ var package_default = {
255212
255217
  "@inquirer/input": "4.1.10",
255213
255218
  "@inquirer/password": "4.0.13",
255214
255219
  "@inquirer/select": "4.2.1",
255215
- "@settlemint/sdk-js": "2.2.3-pr342c24ef",
255216
- "@settlemint/sdk-utils": "2.2.3-pr342c24ef",
255220
+ "@settlemint/sdk-js": "2.2.3-pr3af5b36a",
255221
+ "@settlemint/sdk-utils": "2.2.3-pr3af5b36a",
255217
255222
  "@types/node": "22.15.18",
255218
255223
  "@types/semver": "7.7.0",
255219
255224
  "@types/which": "3.0.4",
@@ -255223,7 +255228,7 @@ var package_default = {
255223
255228
  semver: "7.7.2",
255224
255229
  slugify: "1.6.6",
255225
255230
  which: "5.0.0",
255226
- yaml: "2.7.1",
255231
+ yaml: "2.8.0",
255227
255232
  yoctocolors: "2.1.1"
255228
255233
  },
255229
255234
  peerDependencies: {
@@ -270604,4 +270609,4 @@ async function sdkCliCommand(argv = process.argv) {
270604
270609
  // src/cli.ts
270605
270610
  sdkCliCommand();
270606
270611
 
270607
- //# debugId=2ACE5B714C30F8B064756E2164756E21
270612
+ //# debugId=6BF71E07BE95729A64756E2164756E21