@secondlayer/cli 8.10.2 → 8.11.0

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
@@ -15713,8 +15713,8 @@ var require_fill_range = __commonJS((exports, module) => {
15713
15713
  return typeof value === "number" || typeof value === "string" && value !== "";
15714
15714
  };
15715
15715
  var isNumber = (num) => Number.isInteger(+num);
15716
- var zeros = (input5) => {
15717
- let value = `${input5}`;
15716
+ var zeros = (input4) => {
15717
+ let value = `${input4}`;
15718
15718
  let index = -1;
15719
15719
  if (value[0] === "-")
15720
15720
  value = value.slice(1);
@@ -15730,27 +15730,27 @@ var require_fill_range = __commonJS((exports, module) => {
15730
15730
  }
15731
15731
  return options2.stringify === true;
15732
15732
  };
15733
- var pad = (input5, maxLength, toNumber) => {
15733
+ var pad = (input4, maxLength, toNumber) => {
15734
15734
  if (maxLength > 0) {
15735
- let dash = input5[0] === "-" ? "-" : "";
15735
+ let dash = input4[0] === "-" ? "-" : "";
15736
15736
  if (dash)
15737
- input5 = input5.slice(1);
15738
- input5 = dash + input5.padStart(dash ? maxLength - 1 : maxLength, "0");
15737
+ input4 = input4.slice(1);
15738
+ input4 = dash + input4.padStart(dash ? maxLength - 1 : maxLength, "0");
15739
15739
  }
15740
15740
  if (toNumber === false) {
15741
- return String(input5);
15741
+ return String(input4);
15742
15742
  }
15743
- return input5;
15743
+ return input4;
15744
15744
  };
15745
- var toMaxLen = (input5, maxLength) => {
15746
- let negative = input5[0] === "-" ? "-" : "";
15745
+ var toMaxLen = (input4, maxLength) => {
15746
+ let negative = input4[0] === "-" ? "-" : "";
15747
15747
  if (negative) {
15748
- input5 = input5.slice(1);
15748
+ input4 = input4.slice(1);
15749
15749
  maxLength--;
15750
15750
  }
15751
- while (input5.length < maxLength)
15752
- input5 = "0" + input5;
15753
- return negative ? "-" + input5 : input5;
15751
+ while (input4.length < maxLength)
15752
+ input4 = "0" + input4;
15753
+ return negative ? "-" + input4 : input4;
15754
15754
  };
15755
15755
  var toSequence = (parts, options2, maxLen) => {
15756
15756
  parts.negatives.sort((a, b2) => a < b2 ? -1 : a > b2 ? 1 : 0);
@@ -16119,25 +16119,25 @@ var require_parse = __commonJS((exports, module) => {
16119
16119
  CHAR_NO_BREAK_SPACE,
16120
16120
  CHAR_ZERO_WIDTH_NOBREAK_SPACE
16121
16121
  } = require_constants();
16122
- var parse2 = (input5, options2 = {}) => {
16123
- if (typeof input5 !== "string") {
16122
+ var parse2 = (input4, options2 = {}) => {
16123
+ if (typeof input4 !== "string") {
16124
16124
  throw new TypeError("Expected a string");
16125
16125
  }
16126
16126
  const opts = options2 || {};
16127
16127
  const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
16128
- if (input5.length > max) {
16129
- throw new SyntaxError(`Input length (${input5.length}), exceeds max characters (${max})`);
16128
+ if (input4.length > max) {
16129
+ throw new SyntaxError(`Input length (${input4.length}), exceeds max characters (${max})`);
16130
16130
  }
16131
- const ast = { type: "root", input: input5, nodes: [] };
16131
+ const ast = { type: "root", input: input4, nodes: [] };
16132
16132
  const stack = [ast];
16133
16133
  let block = ast;
16134
16134
  let prev = ast;
16135
16135
  let brackets = 0;
16136
- const length = input5.length;
16136
+ const length = input4.length;
16137
16137
  let index = 0;
16138
16138
  let depth = 0;
16139
16139
  let value;
16140
- const advance = () => input5[index++];
16140
+ const advance = () => input4[index++];
16141
16141
  const push = (node) => {
16142
16142
  if (node.type === "text" && prev.type === "dot") {
16143
16143
  prev.type = "text";
@@ -16332,10 +16332,10 @@ var require_braces = __commonJS((exports, module) => {
16332
16332
  var compile = require_compile();
16333
16333
  var expand = require_expand();
16334
16334
  var parse2 = require_parse();
16335
- var braces = (input5, options2 = {}) => {
16335
+ var braces = (input4, options2 = {}) => {
16336
16336
  let output2 = [];
16337
- if (Array.isArray(input5)) {
16338
- for (const pattern of input5) {
16337
+ if (Array.isArray(input4)) {
16338
+ for (const pattern of input4) {
16339
16339
  const result = braces.create(pattern, options2);
16340
16340
  if (Array.isArray(result)) {
16341
16341
  output2.push(...result);
@@ -16344,31 +16344,31 @@ var require_braces = __commonJS((exports, module) => {
16344
16344
  }
16345
16345
  }
16346
16346
  } else {
16347
- output2 = [].concat(braces.create(input5, options2));
16347
+ output2 = [].concat(braces.create(input4, options2));
16348
16348
  }
16349
16349
  if (options2 && options2.expand === true && options2.nodupes === true) {
16350
16350
  output2 = [...new Set(output2)];
16351
16351
  }
16352
16352
  return output2;
16353
16353
  };
16354
- braces.parse = (input5, options2 = {}) => parse2(input5, options2);
16355
- braces.stringify = (input5, options2 = {}) => {
16356
- if (typeof input5 === "string") {
16357
- return stringify2(braces.parse(input5, options2), options2);
16354
+ braces.parse = (input4, options2 = {}) => parse2(input4, options2);
16355
+ braces.stringify = (input4, options2 = {}) => {
16356
+ if (typeof input4 === "string") {
16357
+ return stringify2(braces.parse(input4, options2), options2);
16358
16358
  }
16359
- return stringify2(input5, options2);
16359
+ return stringify2(input4, options2);
16360
16360
  };
16361
- braces.compile = (input5, options2 = {}) => {
16362
- if (typeof input5 === "string") {
16363
- input5 = braces.parse(input5, options2);
16361
+ braces.compile = (input4, options2 = {}) => {
16362
+ if (typeof input4 === "string") {
16363
+ input4 = braces.parse(input4, options2);
16364
16364
  }
16365
- return compile(input5, options2);
16365
+ return compile(input4, options2);
16366
16366
  };
16367
- braces.expand = (input5, options2 = {}) => {
16368
- if (typeof input5 === "string") {
16369
- input5 = braces.parse(input5, options2);
16367
+ braces.expand = (input4, options2 = {}) => {
16368
+ if (typeof input4 === "string") {
16369
+ input4 = braces.parse(input4, options2);
16370
16370
  }
16371
- let result = expand(input5, options2);
16371
+ let result = expand(input4, options2);
16372
16372
  if (options2.noempty === true) {
16373
16373
  result = result.filter(Boolean);
16374
16374
  }
@@ -16377,11 +16377,11 @@ var require_braces = __commonJS((exports, module) => {
16377
16377
  }
16378
16378
  return result;
16379
16379
  };
16380
- braces.create = (input5, options2 = {}) => {
16381
- if (input5 === "" || input5.length < 3) {
16382
- return [input5];
16380
+ braces.create = (input4, options2 = {}) => {
16381
+ if (input4 === "" || input4.length < 3) {
16382
+ return [input4];
16383
16383
  }
16384
- return options2.expand !== true ? braces.compile(input5, options2) : braces.expand(input5, options2);
16384
+ return options2.expand !== true ? braces.compile(input4, options2) : braces.expand(input4, options2);
16385
16385
  };
16386
16386
  module.exports = braces;
16387
16387
  });
@@ -16559,26 +16559,26 @@ var require_utils2 = __commonJS((exports) => {
16559
16559
  }
16560
16560
  return win32 === true || path3.sep === "\\";
16561
16561
  };
16562
- exports.escapeLast = (input5, char, lastIdx) => {
16563
- const idx = input5.lastIndexOf(char, lastIdx);
16562
+ exports.escapeLast = (input4, char, lastIdx) => {
16563
+ const idx = input4.lastIndexOf(char, lastIdx);
16564
16564
  if (idx === -1)
16565
- return input5;
16566
- if (input5[idx - 1] === "\\")
16567
- return exports.escapeLast(input5, char, idx - 1);
16568
- return `${input5.slice(0, idx)}\\${input5.slice(idx)}`;
16565
+ return input4;
16566
+ if (input4[idx - 1] === "\\")
16567
+ return exports.escapeLast(input4, char, idx - 1);
16568
+ return `${input4.slice(0, idx)}\\${input4.slice(idx)}`;
16569
16569
  };
16570
- exports.removePrefix = (input5, state = {}) => {
16571
- let output2 = input5;
16570
+ exports.removePrefix = (input4, state = {}) => {
16571
+ let output2 = input4;
16572
16572
  if (output2.startsWith("./")) {
16573
16573
  output2 = output2.slice(2);
16574
16574
  state.prefix = "./";
16575
16575
  }
16576
16576
  return output2;
16577
16577
  };
16578
- exports.wrapOutput = (input5, state = {}, options2 = {}) => {
16578
+ exports.wrapOutput = (input4, state = {}, options2 = {}) => {
16579
16579
  const prepend = options2.contains ? "" : "^";
16580
16580
  const append = options2.contains ? "" : "$";
16581
- let output2 = `${prepend}(?:${input5})${append}`;
16581
+ let output2 = `${prepend}(?:${input4})${append}`;
16582
16582
  if (state.negated === true) {
16583
16583
  output2 = `(?:^(?!${output2}).*$)`;
16584
16584
  }
@@ -16614,14 +16614,14 @@ var require_scan = __commonJS((exports, module) => {
16614
16614
  token.depth = token.isGlobstar ? Infinity : 1;
16615
16615
  }
16616
16616
  };
16617
- var scan = (input5, options2) => {
16617
+ var scan = (input4, options2) => {
16618
16618
  const opts = options2 || {};
16619
- const length = input5.length - 1;
16619
+ const length = input4.length - 1;
16620
16620
  const scanToEnd = opts.parts === true || opts.scanToEnd === true;
16621
16621
  const slashes = [];
16622
16622
  const tokens = [];
16623
16623
  const parts = [];
16624
- let str = input5;
16624
+ let str = input4;
16625
16625
  let index = -1;
16626
16626
  let start = 0;
16627
16627
  let lastIndex = 0;
@@ -16844,7 +16844,7 @@ var require_scan = __commonJS((exports, module) => {
16844
16844
  }
16845
16845
  const state = {
16846
16846
  prefix,
16847
- input: input5,
16847
+ input: input4,
16848
16848
  start,
16849
16849
  base,
16850
16850
  glob,
@@ -16868,7 +16868,7 @@ var require_scan = __commonJS((exports, module) => {
16868
16868
  for (let idx = 0;idx < slashes.length; idx++) {
16869
16869
  const n = prevIndex ? prevIndex + 1 : start;
16870
16870
  const i = slashes[idx];
16871
- const value = input5.slice(n, i);
16871
+ const value = input4.slice(n, i);
16872
16872
  if (opts.tokens) {
16873
16873
  if (idx === 0 && start !== 0) {
16874
16874
  tokens[idx].isPrefix = true;
@@ -16884,8 +16884,8 @@ var require_scan = __commonJS((exports, module) => {
16884
16884
  }
16885
16885
  prevIndex = i;
16886
16886
  }
16887
- if (prevIndex && prevIndex + 1 < input5.length) {
16888
- const value = input5.slice(prevIndex + 1);
16887
+ if (prevIndex && prevIndex + 1 < input4.length) {
16888
+ const value = input4.slice(prevIndex + 1);
16889
16889
  parts.push(value);
16890
16890
  if (opts.tokens) {
16891
16891
  tokens[tokens.length - 1].value = value;
@@ -16928,14 +16928,14 @@ var require_parse2 = __commonJS((exports, module) => {
16928
16928
  var syntaxError = (type, char) => {
16929
16929
  return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
16930
16930
  };
16931
- var parse2 = (input5, options2) => {
16932
- if (typeof input5 !== "string") {
16931
+ var parse2 = (input4, options2) => {
16932
+ if (typeof input4 !== "string") {
16933
16933
  throw new TypeError("Expected a string");
16934
16934
  }
16935
- input5 = REPLACEMENTS[input5] || input5;
16935
+ input4 = REPLACEMENTS[input4] || input4;
16936
16936
  const opts = { ...options2 };
16937
16937
  const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
16938
- let len = input5.length;
16938
+ let len = input4.length;
16939
16939
  if (len > max) {
16940
16940
  throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
16941
16941
  }
@@ -16972,7 +16972,7 @@ var require_parse2 = __commonJS((exports, module) => {
16972
16972
  opts.noextglob = opts.noext;
16973
16973
  }
16974
16974
  const state = {
16975
- input: input5,
16975
+ input: input4,
16976
16976
  index: -1,
16977
16977
  start: 0,
16978
16978
  dot: opts.dot === true,
@@ -16988,17 +16988,17 @@ var require_parse2 = __commonJS((exports, module) => {
16988
16988
  globstar: false,
16989
16989
  tokens
16990
16990
  };
16991
- input5 = utils.removePrefix(input5, state);
16992
- len = input5.length;
16991
+ input4 = utils.removePrefix(input4, state);
16992
+ len = input4.length;
16993
16993
  const extglobs = [];
16994
16994
  const braces = [];
16995
16995
  const stack = [];
16996
16996
  let prev = bos;
16997
16997
  let value;
16998
16998
  const eos = () => state.index === len - 1;
16999
- const peek = state.peek = (n = 1) => input5[state.index + n];
17000
- const advance = state.advance = () => input5[++state.index] || "";
17001
- const remaining = () => input5.slice(state.index + 1);
16999
+ const peek = state.peek = (n = 1) => input4[state.index + n];
17000
+ const advance = state.advance = () => input4[++state.index] || "";
17001
+ const remaining = () => input4.slice(state.index + 1);
17002
17002
  const consume = (value2 = "", num = 0) => {
17003
17003
  state.consumed += value2;
17004
17004
  state.index += num;
@@ -17088,9 +17088,9 @@ var require_parse2 = __commonJS((exports, module) => {
17088
17088
  push({ type: "paren", extglob: true, value, output: output2 });
17089
17089
  decrement("parens");
17090
17090
  };
17091
- if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input5)) {
17091
+ if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input4)) {
17092
17092
  let backslashes = false;
17093
- let output2 = input5.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
17093
+ let output2 = input4.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
17094
17094
  if (first === "\\") {
17095
17095
  backslashes = true;
17096
17096
  return m;
@@ -17124,8 +17124,8 @@ var require_parse2 = __commonJS((exports, module) => {
17124
17124
  });
17125
17125
  }
17126
17126
  }
17127
- if (output2 === input5 && opts.contains === true) {
17128
- state.output = input5;
17127
+ if (output2 === input4 && opts.contains === true) {
17128
+ state.output = input4;
17129
17129
  return state;
17130
17130
  }
17131
17131
  state.output = utils.wrapOutput(output2, state, options2);
@@ -17484,7 +17484,7 @@ var require_parse2 = __commonJS((exports, module) => {
17484
17484
  continue;
17485
17485
  }
17486
17486
  while (rest.slice(0, 3) === "/**") {
17487
- const after = input5[state.index + 4];
17487
+ const after = input4[state.index + 4];
17488
17488
  if (after && after !== "/") {
17489
17489
  break;
17490
17490
  }
@@ -17607,14 +17607,14 @@ var require_parse2 = __commonJS((exports, module) => {
17607
17607
  }
17608
17608
  return state;
17609
17609
  };
17610
- parse2.fastpaths = (input5, options2) => {
17610
+ parse2.fastpaths = (input4, options2) => {
17611
17611
  const opts = { ...options2 };
17612
17612
  const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
17613
- const len = input5.length;
17613
+ const len = input4.length;
17614
17614
  if (len > max) {
17615
17615
  throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
17616
17616
  }
17617
- input5 = REPLACEMENTS[input5] || input5;
17617
+ input4 = REPLACEMENTS[input4] || input4;
17618
17618
  const win32 = utils.isWindows(options2);
17619
17619
  const {
17620
17620
  DOT_LITERAL,
@@ -17669,7 +17669,7 @@ var require_parse2 = __commonJS((exports, module) => {
17669
17669
  }
17670
17670
  }
17671
17671
  };
17672
- const output2 = utils.removePrefix(input5, state);
17672
+ const output2 = utils.removePrefix(input4, state);
17673
17673
  let source = create2(output2);
17674
17674
  if (source && opts.strictSlashes !== true) {
17675
17675
  source += `${SLASH_LITERAL}?`;
@@ -17689,7 +17689,7 @@ var require_picomatch = __commonJS((exports, module) => {
17689
17689
  var isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
17690
17690
  var picomatch = (glob, options2, returnState = false) => {
17691
17691
  if (Array.isArray(glob)) {
17692
- const fns = glob.map((input5) => picomatch(input5, options2, returnState));
17692
+ const fns = glob.map((input4) => picomatch(input4, options2, returnState));
17693
17693
  const arrayMatcher = (str) => {
17694
17694
  for (const isMatch of fns) {
17695
17695
  const state2 = isMatch(str);
@@ -17714,9 +17714,9 @@ var require_picomatch = __commonJS((exports, module) => {
17714
17714
  const ignoreOpts = { ...options2, ignore: null, onMatch: null, onResult: null };
17715
17715
  isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
17716
17716
  }
17717
- const matcher = (input5, returnObject = false) => {
17718
- const { isMatch, match, output: output2 } = picomatch.test(input5, regex, options2, { glob, posix });
17719
- const result = { glob, state, regex, posix, input: input5, output: output2, match, isMatch };
17717
+ const matcher = (input4, returnObject = false) => {
17718
+ const { isMatch, match, output: output2 } = picomatch.test(input4, regex, options2, { glob, posix });
17719
+ const result = { glob, state, regex, posix, input: input4, output: output2, match, isMatch };
17720
17720
  if (typeof opts.onResult === "function") {
17721
17721
  opts.onResult(result);
17722
17722
  }
@@ -17724,7 +17724,7 @@ var require_picomatch = __commonJS((exports, module) => {
17724
17724
  result.isMatch = false;
17725
17725
  return returnObject ? result : false;
17726
17726
  }
17727
- if (isIgnored(input5)) {
17727
+ if (isIgnored(input4)) {
17728
17728
  if (typeof opts.onIgnore === "function") {
17729
17729
  opts.onIgnore(result);
17730
17730
  }
@@ -17741,33 +17741,33 @@ var require_picomatch = __commonJS((exports, module) => {
17741
17741
  }
17742
17742
  return matcher;
17743
17743
  };
17744
- picomatch.test = (input5, regex, options2, { glob, posix } = {}) => {
17745
- if (typeof input5 !== "string") {
17744
+ picomatch.test = (input4, regex, options2, { glob, posix } = {}) => {
17745
+ if (typeof input4 !== "string") {
17746
17746
  throw new TypeError("Expected input to be a string");
17747
17747
  }
17748
- if (input5 === "") {
17748
+ if (input4 === "") {
17749
17749
  return { isMatch: false, output: "" };
17750
17750
  }
17751
17751
  const opts = options2 || {};
17752
17752
  const format = opts.format || (posix ? utils.toPosixSlashes : null);
17753
- let match = input5 === glob;
17754
- let output2 = match && format ? format(input5) : input5;
17753
+ let match = input4 === glob;
17754
+ let output2 = match && format ? format(input4) : input4;
17755
17755
  if (match === false) {
17756
- output2 = format ? format(input5) : input5;
17756
+ output2 = format ? format(input4) : input4;
17757
17757
  match = output2 === glob;
17758
17758
  }
17759
17759
  if (match === false || opts.capture === true) {
17760
17760
  if (opts.matchBase === true || opts.basename === true) {
17761
- match = picomatch.matchBase(input5, regex, options2, posix);
17761
+ match = picomatch.matchBase(input4, regex, options2, posix);
17762
17762
  } else {
17763
17763
  match = regex.exec(output2);
17764
17764
  }
17765
17765
  }
17766
17766
  return { isMatch: Boolean(match), match, output: output2 };
17767
17767
  };
17768
- picomatch.matchBase = (input5, glob, options2, posix = utils.isWindows(options2)) => {
17768
+ picomatch.matchBase = (input4, glob, options2, posix = utils.isWindows(options2)) => {
17769
17769
  const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options2);
17770
- return regex.test(path3.basename(input5));
17770
+ return regex.test(path3.basename(input4));
17771
17771
  };
17772
17772
  picomatch.isMatch = (str, patterns, options2) => picomatch(patterns, options2)(str);
17773
17773
  picomatch.parse = (pattern, options2) => {
@@ -17775,7 +17775,7 @@ var require_picomatch = __commonJS((exports, module) => {
17775
17775
  return pattern.map((p) => picomatch.parse(p, options2));
17776
17776
  return parse2(pattern, { ...options2, fastpaths: false });
17777
17777
  };
17778
- picomatch.scan = (input5, options2) => scan(input5, options2);
17778
+ picomatch.scan = (input4, options2) => scan(input4, options2);
17779
17779
  picomatch.compileRe = (state, options2, returnOutput = false, returnState = false) => {
17780
17780
  if (returnOutput === true) {
17781
17781
  return state.output;
@@ -17793,16 +17793,16 @@ var require_picomatch = __commonJS((exports, module) => {
17793
17793
  }
17794
17794
  return regex;
17795
17795
  };
17796
- picomatch.makeRe = (input5, options2 = {}, returnOutput = false, returnState = false) => {
17797
- if (!input5 || typeof input5 !== "string") {
17796
+ picomatch.makeRe = (input4, options2 = {}, returnOutput = false, returnState = false) => {
17797
+ if (!input4 || typeof input4 !== "string") {
17798
17798
  throw new TypeError("Expected a non-empty string");
17799
17799
  }
17800
17800
  let parsed = { negated: false, fastpaths: true };
17801
- if (options2.fastpaths !== false && (input5[0] === "." || input5[0] === "*")) {
17802
- parsed.output = parse2.fastpaths(input5, options2);
17801
+ if (options2.fastpaths !== false && (input4[0] === "." || input4[0] === "*")) {
17802
+ parsed.output = parse2.fastpaths(input4, options2);
17803
17803
  }
17804
17804
  if (!parsed.output) {
17805
- parsed = parse2(input5, options2);
17805
+ parsed = parse2(input4, options2);
17806
17806
  }
17807
17807
  return picomatch.compileRe(parsed, options2, returnOutput, returnState);
17808
17808
  };
@@ -17948,10 +17948,10 @@ var require_micromatch = __commonJS((exports, module) => {
17948
17948
  }
17949
17949
  return [].concat(patterns).every((p) => picomatch(p, options2)(str));
17950
17950
  };
17951
- micromatch.capture = (glob, input5, options2) => {
17951
+ micromatch.capture = (glob, input4, options2) => {
17952
17952
  let posix = utils.isWindows(options2);
17953
17953
  let regex = picomatch.makeRe(String(glob), { ...options2, capture: true });
17954
- let match = regex.exec(posix ? utils.toPosixSlashes(input5) : input5);
17954
+ let match = regex.exec(posix ? utils.toPosixSlashes(input4) : input4);
17955
17955
  if (match) {
17956
17956
  return match.slice(1).map((v) => v === undefined ? "" : v);
17957
17957
  }
@@ -18286,12 +18286,12 @@ var require_stream = __commonJS((exports) => {
18286
18286
  var require_string = __commonJS((exports) => {
18287
18287
  Object.defineProperty(exports, "__esModule", { value: true });
18288
18288
  exports.isEmpty = exports.isString = undefined;
18289
- function isString(input5) {
18290
- return typeof input5 === "string";
18289
+ function isString(input4) {
18290
+ return typeof input4 === "string";
18291
18291
  }
18292
18292
  exports.isString = isString;
18293
- function isEmpty(input5) {
18294
- return input5 === "";
18293
+ function isEmpty(input4) {
18294
+ return input4 === "";
18295
18295
  }
18296
18296
  exports.isEmpty = isEmpty;
18297
18297
  });
@@ -18321,8 +18321,8 @@ var require_tasks = __commonJS((exports) => {
18321
18321
  Object.defineProperty(exports, "__esModule", { value: true });
18322
18322
  exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = undefined;
18323
18323
  var utils = require_utils3();
18324
- function generate(input5, settings) {
18325
- const patterns = processPatterns(input5, settings);
18324
+ function generate(input4, settings) {
18325
+ const patterns = processPatterns(input4, settings);
18326
18326
  const ignore = processPatterns(settings.ignore, settings);
18327
18327
  const positivePatterns = getPositivePatterns(patterns);
18328
18328
  const negativePatterns = getNegativePatternsAsPositive(patterns, ignore);
@@ -18333,8 +18333,8 @@ var require_tasks = __commonJS((exports) => {
18333
18333
  return staticTasks.concat(dynamicTasks);
18334
18334
  }
18335
18335
  exports.generate = generate;
18336
- function processPatterns(input5, settings) {
18337
- let patterns = input5;
18336
+ function processPatterns(input4, settings) {
18337
+ let patterns = input4;
18338
18338
  if (settings.braceExpansion) {
18339
18339
  patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns);
18340
18340
  }
@@ -20290,8 +20290,8 @@ var require_out4 = __commonJS((exports, module) => {
20290
20290
  const provider = new _Provider(settings);
20291
20291
  return tasks.map(provider.read, provider);
20292
20292
  }
20293
- function assertPatternsInput(input5) {
20294
- const source = [].concat(input5);
20293
+ function assertPatternsInput(input4) {
20294
+ const source = [].concat(input4);
20295
20295
  const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item));
20296
20296
  if (!isValidSource) {
20297
20297
  throw new TypeError("Patterns must be a string (non empty) or an array of strings");
@@ -21853,10 +21853,10 @@ function requireStyle() {
21853
21853
  const c2 = requireKleur();
21854
21854
  const figures = requireFigures();
21855
21855
  const styles3 = Object.freeze({
21856
- password: { scale: 1, render: (input5) => "*".repeat(input5.length) },
21857
- emoji: { scale: 2, render: (input5) => "\uD83D\uDE03".repeat(input5.length) },
21858
- invisible: { scale: 0, render: (input5) => "" },
21859
- default: { scale: 1, render: (input5) => `${input5}` }
21856
+ password: { scale: 1, render: (input4) => "*".repeat(input4.length) },
21857
+ emoji: { scale: 2, render: (input4) => "\uD83D\uDE03".repeat(input4.length) },
21858
+ invisible: { scale: 0, render: (input4) => "" },
21859
+ default: { scale: 1, render: (input4) => `${input4}` }
21860
21860
  });
21861
21861
  const render = (type) => styles3[type] || styles3.default;
21862
21862
  const symbols = Object.freeze({
@@ -23864,7 +23864,7 @@ function requirePrompts$1() {
23864
23864
  onSubmit: toSelected
23865
23865
  });
23866
23866
  };
23867
- const byTitle = (input5, choices) => Promise.resolve(choices.filter((item) => item.title.slice(0, input5.length).toLowerCase() === input5.toLowerCase()));
23867
+ const byTitle = (input4, choices) => Promise.resolve(choices.filter((item) => item.title.slice(0, input4.length).toLowerCase() === input4.toLowerCase()));
23868
23868
  $.autocomplete = (args) => {
23869
23869
  args.suggest = args.suggest || byTitle;
23870
23870
  args.choices = [].concat(args.choices || []);
@@ -25153,12 +25153,12 @@ var init_figures = __esm(() => {
25153
25153
  import tty2 from "node:tty";
25154
25154
  var hasColors, format = (open, close) => {
25155
25155
  if (!hasColors) {
25156
- return (input5) => input5;
25156
+ return (input4) => input4;
25157
25157
  }
25158
25158
  const openCode = `\x1B[${open}m`;
25159
25159
  const closeCode = `\x1B[${close}m`;
25160
- return (input5) => {
25161
- const string = input5 + "";
25160
+ return (input4) => {
25161
+ const string = input4 + "";
25162
25162
  let index = string.indexOf(closeCode);
25163
25163
  if (index === -1) {
25164
25164
  return openCode + string + closeCode;
@@ -27267,16 +27267,16 @@ var init_options2 = __esm(() => {
27267
27267
  var concatenateShell = (file, commandArguments, options3) => options3.shell && commandArguments.length > 0 ? [[file, ...commandArguments].join(" "), [], options3] : [file, commandArguments, options3];
27268
27268
 
27269
27269
  // ../../node_modules/strip-final-newline/index.js
27270
- function stripFinalNewline(input5) {
27271
- if (typeof input5 === "string") {
27272
- return stripFinalNewlineString(input5);
27270
+ function stripFinalNewline(input4) {
27271
+ if (typeof input4 === "string") {
27272
+ return stripFinalNewlineString(input4);
27273
27273
  }
27274
- if (!(ArrayBuffer.isView(input5) && input5.BYTES_PER_ELEMENT === 1)) {
27274
+ if (!(ArrayBuffer.isView(input4) && input4.BYTES_PER_ELEMENT === 1)) {
27275
27275
  throw new Error("Input must be a string or a Uint8Array");
27276
27276
  }
27277
- return stripFinalNewlineBinary(input5);
27277
+ return stripFinalNewlineBinary(input4);
27278
27278
  }
27279
- var stripFinalNewlineString = (input5) => input5.at(-1) === LF ? input5.slice(0, input5.at(-2) === CR ? -2 : -1) : input5, stripFinalNewlineBinary = (input5) => input5.at(-1) === LF_BINARY ? input5.subarray(0, input5.at(-2) === CR_BINARY ? -2 : -1) : input5, LF = `
27279
+ var stripFinalNewlineString = (input4) => input4.at(-1) === LF ? input4.slice(0, input4.at(-2) === CR ? -2 : -1) : input4, stripFinalNewlineBinary = (input4) => input4.at(-1) === LF_BINARY ? input4.subarray(0, input4.at(-2) === CR_BINARY ? -2 : -1) : input4, LF = `
27280
27280
  `, LF_BINARY, CR = "\r", CR_BINARY;
27281
27281
  var init_strip_final_newline = __esm(() => {
27282
27282
  LF_BINARY = LF.codePointAt(0);
@@ -28315,21 +28315,21 @@ var init_native = __esm(() => {
28315
28315
  });
28316
28316
 
28317
28317
  // ../../node_modules/execa/lib/stdio/input-option.js
28318
- var handleInputOptions = ({ input: input5, inputFile }, fdNumber) => fdNumber === 0 ? [
28319
- ...handleInputOption(input5),
28318
+ var handleInputOptions = ({ input: input4, inputFile }, fdNumber) => fdNumber === 0 ? [
28319
+ ...handleInputOption(input4),
28320
28320
  ...handleInputFileOption(inputFile)
28321
- ] : [], handleInputOption = (input5) => input5 === undefined ? [] : [{
28322
- type: getInputType(input5),
28323
- value: input5,
28321
+ ] : [], handleInputOption = (input4) => input4 === undefined ? [] : [{
28322
+ type: getInputType(input4),
28323
+ value: input4,
28324
28324
  optionName: "input"
28325
- }], getInputType = (input5) => {
28326
- if (isReadableStream(input5, { checkOpen: false })) {
28325
+ }], getInputType = (input4) => {
28326
+ if (isReadableStream(input4, { checkOpen: false })) {
28327
28327
  return "nodeStream";
28328
28328
  }
28329
- if (typeof input5 === "string") {
28329
+ if (typeof input4 === "string") {
28330
28330
  return "string";
28331
28331
  }
28332
- if (isUint8Array(input5)) {
28332
+ if (isUint8Array(input4)) {
28333
28333
  return "uint8Array";
28334
28334
  }
28335
28335
  throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.");
@@ -31445,7 +31445,7 @@ var init_command2 = __esm(() => {
31445
31445
  var setScriptSync = (boundExeca, createNested, boundOptions) => {
31446
31446
  boundExeca.sync = createNested(mapScriptSync, boundOptions);
31447
31447
  boundExeca.s = boundExeca.sync;
31448
- }, mapScriptAsync = ({ options: options3 }) => getScriptOptions(options3), mapScriptSync = ({ options: options3 }) => ({ ...getScriptOptions(options3), isSync: true }), getScriptOptions = (options3) => ({ options: { ...getScriptStdinOption(options3), ...options3 } }), getScriptStdinOption = ({ input: input5, inputFile, stdio }) => input5 === undefined && inputFile === undefined && stdio === undefined ? { stdin: "inherit" } : {}, deepScriptOptions;
31448
+ }, mapScriptAsync = ({ options: options3 }) => getScriptOptions(options3), mapScriptSync = ({ options: options3 }) => ({ ...getScriptOptions(options3), isSync: true }), getScriptOptions = (options3) => ({ options: { ...getScriptStdinOption(options3), ...options3 } }), getScriptStdinOption = ({ input: input4, inputFile, stdio }) => input4 === undefined && inputFile === undefined && stdio === undefined ? { stdin: "inherit" } : {}, deepScriptOptions;
31449
31449
  var init_script = __esm(() => {
31450
31450
  deepScriptOptions = { preferLocal: true };
31451
31451
  });
@@ -31556,20 +31556,20 @@ __export(exports_generate, {
31556
31556
  import path11 from "node:path";
31557
31557
  import { getErrorMessage as getErrorMessage2 } from "@secondlayer/shared";
31558
31558
  import { toCamelCase as toCamelCase4 } from "@secondlayer/stacks/clarity";
31559
- function isContractAddress(input5) {
31559
+ function isContractAddress(input4) {
31560
31560
  const contractIdPattern = /^(SP|ST|SM|SN)[A-Z0-9]{38,}\.[a-zA-Z][a-zA-Z0-9-]*$/;
31561
- return contractIdPattern.test(input5);
31561
+ return contractIdPattern.test(input4);
31562
31562
  }
31563
31563
  async function parseInputs(inputs) {
31564
31564
  const files = [];
31565
31565
  const contractIds = [];
31566
- for (const input5 of inputs) {
31567
- if (isContractAddress(input5)) {
31568
- contractIds.push(input5);
31566
+ for (const input4 of inputs) {
31567
+ if (isContractAddress(input4)) {
31568
+ contractIds.push(input4);
31569
31569
  continue;
31570
31570
  }
31571
- if (input5.includes("*") || input5.includes("?")) {
31572
- const matches = await import_fast_glob.default(input5, { cwd: process.cwd(), absolute: true });
31571
+ if (input4.includes("*") || input4.includes("?")) {
31572
+ const matches = await import_fast_glob.default(input4, { cwd: process.cwd(), absolute: true });
31573
31573
  for (const file of matches) {
31574
31574
  if (file.endsWith(".clar")) {
31575
31575
  files.push(file);
@@ -31577,8 +31577,8 @@ async function parseInputs(inputs) {
31577
31577
  }
31578
31578
  continue;
31579
31579
  }
31580
- if (input5.endsWith(".clar")) {
31581
- const absolutePath = path11.resolve(process.cwd(), input5);
31580
+ if (input4.endsWith(".clar")) {
31581
+ const absolutePath = path11.resolve(process.cwd(), input4);
31582
31582
  files.push(absolutePath);
31583
31583
  }
31584
31584
  }
@@ -31811,7 +31811,7 @@ var {
31811
31811
  // package.json
31812
31812
  var package_default = {
31813
31813
  name: "@secondlayer/cli",
31814
- version: "8.10.2",
31814
+ version: "8.11.0",
31815
31815
  repository: {
31816
31816
  type: "git",
31817
31817
  url: "git+https://github.com/ryanwaits/secondlayer.git",
@@ -34215,7 +34215,7 @@ function tokenScaffold(name, source) {
34215
34215
  recipient: { type: 'principal' },
34216
34216
  token_id: { type: 'text' },
34217
34217
  asset_identifier: { type: 'principal', indexed: true }`;
34218
- const insert = isFt ? `{ sender: event.sender, recipient: event.recipient, amount: event.amount, asset_identifier: event.assetIdentifier }` : `{ sender: event.sender, recipient: event.recipient, token_id: String(event.tokenId), asset_identifier: event.assetIdentifier }`;
34218
+ const insert = isFt ? "{ sender: event.sender, recipient: event.recipient, amount: event.amount, asset_identifier: event.assetIdentifier }" : "{ sender: event.sender, recipient: event.recipient, token_id: String(event.tokenId), asset_identifier: event.assetIdentifier }";
34219
34219
  return wrap(name, ` transfers: { type: '${source.type}', ${scope} }`, ` transfers: {
34220
34220
  columns: {
34221
34221
  ${cols}
@@ -36340,8 +36340,8 @@ Examples:
36340
36340
  });
36341
36341
  }
36342
36342
  // src/commands/index-api.ts
36343
- init_output();
36344
36343
  init_fs();
36344
+ init_output();
36345
36345
  init_resolve_auth();
36346
36346
  import { resolve as resolve3 } from "node:path";
36347
36347
  import { Index } from "@secondlayer/sdk";
@@ -37857,10 +37857,7 @@ function registerWhoamiCommand(program2) {
37857
37857
  rows.push(["Project", active.slug]);
37858
37858
  rows.push(["Project source", dim(active.resolvedFrom)]);
37859
37859
  } else {
37860
- rows.push([
37861
- "Project",
37862
- dim("(none — run `sl project create <name>`)")
37863
- ]);
37860
+ rows.push(["Project", dim("(none — run `sl project use <slug>`)")]);
37864
37861
  }
37865
37862
  console.log(formatKeyValue(rows));
37866
37863
  }
@@ -37890,39 +37887,9 @@ function registerLogoutCommand(program2) {
37890
37887
  }
37891
37888
  // src/commands/project.ts
37892
37889
  init_config();
37893
- import { input as input4 } from "@inquirer/prompts";
37894
37890
  init_output();
37895
37891
  function registerProjectCommand(program2) {
37896
- const project = program2.command("projects").alias("project").description("Manage Secondlayer projects");
37897
- project.command("create [name]").description("Create a new project").option("--slug <slug>", "Project URL identifier").action(async (nameArg, options2 = {}) => {
37898
- const name = nameArg ?? await input4({
37899
- message: "Project name",
37900
- validate: (v) => v.length >= 2 ? true : "Name must be at least 2 characters"
37901
- });
37902
- const slug = options2.slug ?? slugifyProjectName(name);
37903
- const validation = validateProjectSlug(slug);
37904
- if (validation !== true) {
37905
- error(`${validation}. Pass --slug <slug> to choose one explicitly.`);
37906
- process.exit(1);
37907
- }
37908
- try {
37909
- const res = await httpPlatform("/api/projects", {
37910
- method: "POST",
37911
- body: { name, slug }
37912
- });
37913
- success(`Created project ${res.name} (${res.slug})`);
37914
- const config = await loadConfig();
37915
- if (!config.defaultProject) {
37916
- await saveConfig({ ...config, defaultProject: res.slug });
37917
- info(dim("Set as your default project."));
37918
- } else {
37919
- info(dim(`To use this project, run: sl project use ${res.slug}`));
37920
- }
37921
- info(dim("Next: sl subgraphs deploy <file.ts>"));
37922
- } catch (err) {
37923
- handleProjectError(err);
37924
- }
37925
- });
37892
+ const project = program2.command("projects").alias("project").description("Manage your Secondlayer project");
37926
37893
  project.command("list").alias("ls").description("List projects in your account").option("--json", "Output as JSON").action(async (options2) => {
37927
37894
  try {
37928
37895
  const res = await httpPlatform("/api/projects");
@@ -37932,7 +37899,7 @@ function registerProjectCommand(program2) {
37932
37899
  data: { projects: res.projects, active: active?.slug ?? null },
37933
37900
  human: () => {
37934
37901
  if (res.projects.length === 0) {
37935
- info("No projects yet — run `sl project create <name>` to start.");
37902
+ info("No project found.");
37936
37903
  return;
37937
37904
  }
37938
37905
  const rows = res.projects.map((p) => [
@@ -37975,7 +37942,7 @@ function registerProjectCommand(program2) {
37975
37942
  human: () => {
37976
37943
  if (!active) {
37977
37944
  info("No active project.");
37978
- info(dim("Run 'sl project create <name>' or 'sl project use <slug>'."));
37945
+ info(dim("Run 'sl project use <slug>' to bind this directory."));
37979
37946
  return;
37980
37947
  }
37981
37948
  console.log(active.slug);
@@ -37983,40 +37950,6 @@ function registerProjectCommand(program2) {
37983
37950
  }
37984
37951
  });
37985
37952
  });
37986
- project.command("delete <slug>").alias("rm").description("Delete a project").option("-y, --yes", "Skip confirmation").action(async (slug, options2 = {}) => {
37987
- if (!options2.yes) {
37988
- if (!process.stdin.isTTY) {
37989
- error("Interactive prompt unavailable (stdin is not a TTY). Re-run with -y to skip confirmation.");
37990
- process.exit(1);
37991
- }
37992
- const { confirm: confirm6 } = await import("@inquirer/prompts");
37993
- let ok = false;
37994
- try {
37995
- ok = await confirm6({
37996
- message: `Delete project "${slug}"? This cannot be undone.`
37997
- });
37998
- } catch {
37999
- error("Interactive prompt unavailable. Re-run with -y to skip confirmation.");
38000
- process.exit(1);
38001
- }
38002
- if (!ok) {
38003
- info("Cancelled");
38004
- return;
38005
- }
38006
- }
38007
- try {
38008
- await httpPlatform(`/api/projects/${encodeURIComponent(slug)}`, {
38009
- method: "DELETE"
38010
- });
38011
- success(`Deleted project "${slug}"`);
38012
- } catch (err) {
38013
- if (err instanceof CliHttpError && err.status === 404) {
38014
- info(`Project "${slug}" not found (already deleted?)`);
38015
- return;
38016
- }
38017
- handleProjectError(err);
38018
- }
38019
- });
38020
37953
  }
38021
37954
  function handleProjectError(err) {
38022
37955
  if (err instanceof CliHttpError) {
@@ -38030,18 +37963,6 @@ function handleProjectError(err) {
38030
37963
  error(err instanceof Error ? err.message : String(err));
38031
37964
  process.exit(1);
38032
37965
  }
38033
- function slugifyProjectName(name) {
38034
- return name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 63).replace(/-+$/g, "");
38035
- }
38036
- function validateProjectSlug(slug) {
38037
- if (slug.length < 2 || slug.length > 63) {
38038
- return "Project slug must be 2-63 characters";
38039
- }
38040
- if (!/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/.test(slug)) {
38041
- return "Project slug must use lowercase letters, numbers, and hyphens, and start/end with a letter or number";
38042
- }
38043
- return true;
38044
- }
38045
37966
  // src/cli.ts
38046
37967
  var { version } = package_default;
38047
37968
  program.name("secondlayer").alias("sl").description("SecondLayer CLI — dedicated Stacks indexing + real-time subgraphs").version(version).option("--network <network>", "Override network (local, testnet, mainnet)").option("--api-key <key>", "API credential (overrides SL_API_KEY)").option("--api-url <url>", "API endpoint (overrides SL_API_URL)").showSuggestionAfterError(true).showHelpAfterError("(run `sl --help` to see available commands)");
@@ -38100,5 +38021,5 @@ registerAccountCommand(program);
38100
38021
  registerKeysCommand(program);
38101
38022
  program.parse();
38102
38023
 
38103
- //# debugId=7E2863B5D8958DF264756E2164756E21
38024
+ //# debugId=E1FF8A35D79C188764756E2164756E21
38104
38025
  //# sourceMappingURL=cli.js.map