@base44-preview/cli 0.0.25-pr.104.2d197bb → 0.0.25-pr.104.e8c6c8b

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/index.js CHANGED
@@ -10892,11 +10892,11 @@ var require_fill_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10892
10892
  negatives: [],
10893
10893
  positives: []
10894
10894
  };
10895
- let push$1 = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num));
10895
+ let push$2 = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num));
10896
10896
  let range = [];
10897
10897
  let index = 0;
10898
10898
  while (descending ? a$1 >= b$2 : a$1 <= b$2) {
10899
- if (options.toRegex === true && step > 1) push$1(a$1);
10899
+ if (options.toRegex === true && step > 1) push$2(a$1);
10900
10900
  else range.push(pad(format$1(a$1, index), maxLen, toNumber));
10901
10901
  a$1 = descending ? a$1 - step : a$1 + step;
10902
10902
  index++;
@@ -11148,7 +11148,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11148
11148
  * Helpers
11149
11149
  */
11150
11150
  const advance = () => input[index++];
11151
- const push$1 = (node) => {
11151
+ const push$2 = (node) => {
11152
11152
  if (node.type === "text" && prev.type === "dot") prev.type = "text";
11153
11153
  if (prev && prev.type === "text" && node.type === "text") {
11154
11154
  prev.value += node.value;
@@ -11160,7 +11160,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11160
11160
  prev = node;
11161
11161
  return node;
11162
11162
  };
11163
- push$1({ type: "bos" });
11163
+ push$2({ type: "bos" });
11164
11164
  while (index < length) {
11165
11165
  block = stack[stack.length - 1];
11166
11166
  value = advance();
@@ -11172,7 +11172,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11172
11172
  * Escaped chars
11173
11173
  */
11174
11174
  if (value === CHAR_BACKSLASH) {
11175
- push$1({
11175
+ push$2({
11176
11176
  type: "text",
11177
11177
  value: (options.keepEscaping ? value : "") + advance()
11178
11178
  });
@@ -11182,7 +11182,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11182
11182
  * Right square bracket (literal): ']'
11183
11183
  */
11184
11184
  if (value === CHAR_RIGHT_SQUARE_BRACKET) {
11185
- push$1({
11185
+ push$2({
11186
11186
  type: "text",
11187
11187
  value: "\\" + value
11188
11188
  });
@@ -11209,7 +11209,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11209
11209
  if (brackets === 0) break;
11210
11210
  }
11211
11211
  }
11212
- push$1({
11212
+ push$2({
11213
11213
  type: "text",
11214
11214
  value
11215
11215
  });
@@ -11219,12 +11219,12 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11219
11219
  * Parentheses
11220
11220
  */
11221
11221
  if (value === CHAR_LEFT_PARENTHESES) {
11222
- block = push$1({
11222
+ block = push$2({
11223
11223
  type: "paren",
11224
11224
  nodes: []
11225
11225
  });
11226
11226
  stack.push(block);
11227
- push$1({
11227
+ push$2({
11228
11228
  type: "text",
11229
11229
  value
11230
11230
  });
@@ -11232,14 +11232,14 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11232
11232
  }
11233
11233
  if (value === CHAR_RIGHT_PARENTHESES) {
11234
11234
  if (block.type !== "paren") {
11235
- push$1({
11235
+ push$2({
11236
11236
  type: "text",
11237
11237
  value
11238
11238
  });
11239
11239
  continue;
11240
11240
  }
11241
11241
  block = stack.pop();
11242
- push$1({
11242
+ push$2({
11243
11243
  type: "text",
11244
11244
  value
11245
11245
  });
@@ -11264,7 +11264,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11264
11264
  }
11265
11265
  value += next;
11266
11266
  }
11267
- push$1({
11267
+ push$2({
11268
11268
  type: "text",
11269
11269
  value
11270
11270
  });
@@ -11275,7 +11275,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11275
11275
  */
11276
11276
  if (value === CHAR_LEFT_CURLY_BRACE) {
11277
11277
  depth++;
11278
- block = push$1({
11278
+ block = push$2({
11279
11279
  type: "brace",
11280
11280
  open: true,
11281
11281
  close: false,
@@ -11286,7 +11286,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11286
11286
  nodes: []
11287
11287
  });
11288
11288
  stack.push(block);
11289
- push$1({
11289
+ push$2({
11290
11290
  type: "open",
11291
11291
  value
11292
11292
  });
@@ -11297,7 +11297,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11297
11297
  */
11298
11298
  if (value === CHAR_RIGHT_CURLY_BRACE) {
11299
11299
  if (block.type !== "brace") {
11300
- push$1({
11300
+ push$2({
11301
11301
  type: "text",
11302
11302
  value
11303
11303
  });
@@ -11306,7 +11306,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11306
11306
  const type = "close";
11307
11307
  block = stack.pop();
11308
11308
  block.close = true;
11309
- push$1({
11309
+ push$2({
11310
11310
  type,
11311
11311
  value
11312
11312
  });
@@ -11326,7 +11326,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11326
11326
  value: stringify(block)
11327
11327
  }];
11328
11328
  }
11329
- push$1({
11329
+ push$2({
11330
11330
  type: "comma",
11331
11331
  value
11332
11332
  });
@@ -11339,7 +11339,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11339
11339
  if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
11340
11340
  const siblings = block.nodes;
11341
11341
  if (depth === 0 || siblings.length === 0) {
11342
- push$1({
11342
+ push$2({
11343
11343
  type: "text",
11344
11344
  value
11345
11345
  });
@@ -11367,7 +11367,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11367
11367
  block.ranges--;
11368
11368
  continue;
11369
11369
  }
11370
- push$1({
11370
+ push$2({
11371
11371
  type: "dot",
11372
11372
  value
11373
11373
  });
@@ -11376,7 +11376,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11376
11376
  /**
11377
11377
  * Text
11378
11378
  */
11379
- push$1({
11379
+ push$2({
11380
11380
  type: "text",
11381
11381
  value
11382
11382
  });
@@ -11397,7 +11397,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11397
11397
  parent.nodes.splice(index$1, 1, ...block.nodes);
11398
11398
  }
11399
11399
  } while (stack.length > 0);
11400
- push$1({ type: "eos" });
11400
+ push$2({ type: "eos" });
11401
11401
  return ast;
11402
11402
  };
11403
11403
  module.exports = parse;
@@ -12156,7 +12156,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12156
12156
  * characters are plain text. This improves performance and simplifies
12157
12157
  * lookbehinds.
12158
12158
  */
12159
- const push$1 = (tok) => {
12159
+ const push$2 = (tok) => {
12160
12160
  if (prev.type === "globstar") {
12161
12161
  const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace");
12162
12162
  const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren");
@@ -12190,12 +12190,12 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12190
12190
  token.output = state.output;
12191
12191
  const output = (opts.capture ? "(" : "") + token.open;
12192
12192
  increment$1("parens");
12193
- push$1({
12193
+ push$2({
12194
12194
  type,
12195
12195
  value: value$1,
12196
12196
  output: state.output ? "" : ONE_CHAR
12197
12197
  });
12198
- push$1({
12198
+ push$2({
12199
12199
  type: "paren",
12200
12200
  extglob: true,
12201
12201
  value: advance(),
@@ -12216,7 +12216,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12216
12216
  }).output})${extglobStar})`;
12217
12217
  if (token.prev.type === "bos") state.negatedExtglob = true;
12218
12218
  }
12219
- push$1({
12219
+ push$2({
12220
12220
  type: "paren",
12221
12221
  extglob: true,
12222
12222
  value,
@@ -12272,7 +12272,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12272
12272
  if (next === "." || next === ";") continue;
12273
12273
  if (!next) {
12274
12274
  value += "\\";
12275
- push$1({
12275
+ push$2({
12276
12276
  type: "text",
12277
12277
  value
12278
12278
  });
@@ -12288,7 +12288,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12288
12288
  if (opts.unescape === true) value = advance();
12289
12289
  else value += advance();
12290
12290
  if (state.brackets === 0) {
12291
- push$1({
12291
+ push$2({
12292
12292
  type: "text",
12293
12293
  value
12294
12294
  });
@@ -12340,7 +12340,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12340
12340
  */
12341
12341
  if (value === "\"") {
12342
12342
  state.quotes = state.quotes === 1 ? 0 : 1;
12343
- if (opts.keepQuotes === true) push$1({
12343
+ if (opts.keepQuotes === true) push$2({
12344
12344
  type: "text",
12345
12345
  value
12346
12346
  });
@@ -12351,7 +12351,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12351
12351
  */
12352
12352
  if (value === "(") {
12353
12353
  increment$1("parens");
12354
- push$1({
12354
+ push$2({
12355
12355
  type: "paren",
12356
12356
  value
12357
12357
  });
@@ -12364,7 +12364,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12364
12364
  extglobClose(extglobs.pop());
12365
12365
  continue;
12366
12366
  }
12367
- push$1({
12367
+ push$2({
12368
12368
  type: "paren",
12369
12369
  value,
12370
12370
  output: state.parens ? ")" : "\\)"
@@ -12380,7 +12380,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12380
12380
  if (opts.nobracket !== true && opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]"));
12381
12381
  value = `\\${value}`;
12382
12382
  } else increment$1("brackets");
12383
- push$1({
12383
+ push$2({
12384
12384
  type: "bracket",
12385
12385
  value
12386
12386
  });
@@ -12388,7 +12388,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12388
12388
  }
12389
12389
  if (value === "]") {
12390
12390
  if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) {
12391
- push$1({
12391
+ push$2({
12392
12392
  type: "text",
12393
12393
  value,
12394
12394
  output: `\\${value}`
@@ -12397,7 +12397,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12397
12397
  }
12398
12398
  if (state.brackets === 0) {
12399
12399
  if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("opening", "["));
12400
- push$1({
12400
+ push$2({
12401
12401
  type: "text",
12402
12402
  value,
12403
12403
  output: `\\${value}`
@@ -12434,13 +12434,13 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12434
12434
  tokensIndex: state.tokens.length
12435
12435
  };
12436
12436
  braces.push(open$1);
12437
- push$1(open$1);
12437
+ push$2(open$1);
12438
12438
  continue;
12439
12439
  }
12440
12440
  if (value === "}") {
12441
12441
  const brace = braces[braces.length - 1];
12442
12442
  if (opts.nobrace === true || !brace) {
12443
- push$1({
12443
+ push$2({
12444
12444
  type: "text",
12445
12445
  value,
12446
12446
  output: value
@@ -12467,7 +12467,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12467
12467
  state.output = out;
12468
12468
  for (const t of toks) state.output += t.output || t.value;
12469
12469
  }
12470
- push$1({
12470
+ push$2({
12471
12471
  type: "brace",
12472
12472
  value,
12473
12473
  output
@@ -12481,7 +12481,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12481
12481
  */
12482
12482
  if (value === "|") {
12483
12483
  if (extglobs.length > 0) extglobs[extglobs.length - 1].conditions++;
12484
- push$1({
12484
+ push$2({
12485
12485
  type: "text",
12486
12486
  value
12487
12487
  });
@@ -12497,7 +12497,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12497
12497
  brace.comma = true;
12498
12498
  output = "|";
12499
12499
  }
12500
- push$1({
12500
+ push$2({
12501
12501
  type: "comma",
12502
12502
  value,
12503
12503
  output
@@ -12516,7 +12516,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12516
12516
  prev = bos;
12517
12517
  continue;
12518
12518
  }
12519
- push$1({
12519
+ push$2({
12520
12520
  type: "slash",
12521
12521
  value,
12522
12522
  output: SLASH_LITERAL
@@ -12537,14 +12537,14 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12537
12537
  continue;
12538
12538
  }
12539
12539
  if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") {
12540
- push$1({
12540
+ push$2({
12541
12541
  type: "text",
12542
12542
  value,
12543
12543
  output: DOT_LITERAL
12544
12544
  });
12545
12545
  continue;
12546
12546
  }
12547
- push$1({
12547
+ push$2({
12548
12548
  type: "dot",
12549
12549
  value,
12550
12550
  output: DOT_LITERAL
@@ -12564,7 +12564,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12564
12564
  let output = value;
12565
12565
  if (next === "<" && !utils.supportsLookbehinds()) throw new Error("Node.js v10 or higher is required for regex lookbehinds");
12566
12566
  if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) output = `\\${value}`;
12567
- push$1({
12567
+ push$2({
12568
12568
  type: "text",
12569
12569
  value,
12570
12570
  output
@@ -12572,14 +12572,14 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12572
12572
  continue;
12573
12573
  }
12574
12574
  if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) {
12575
- push$1({
12575
+ push$2({
12576
12576
  type: "qmark",
12577
12577
  value,
12578
12578
  output: QMARK_NO_DOT
12579
12579
  });
12580
12580
  continue;
12581
12581
  }
12582
- push$1({
12582
+ push$2({
12583
12583
  type: "qmark",
12584
12584
  value,
12585
12585
  output: QMARK
@@ -12610,7 +12610,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12610
12610
  continue;
12611
12611
  }
12612
12612
  if (prev && prev.value === "(" || opts.regex === false) {
12613
- push$1({
12613
+ push$2({
12614
12614
  type: "plus",
12615
12615
  value,
12616
12616
  output: PLUS_LITERAL
@@ -12618,13 +12618,13 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12618
12618
  continue;
12619
12619
  }
12620
12620
  if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) {
12621
- push$1({
12621
+ push$2({
12622
12622
  type: "plus",
12623
12623
  value
12624
12624
  });
12625
12625
  continue;
12626
12626
  }
12627
- push$1({
12627
+ push$2({
12628
12628
  type: "plus",
12629
12629
  value: PLUS_LITERAL
12630
12630
  });
@@ -12635,7 +12635,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12635
12635
  */
12636
12636
  if (value === "@") {
12637
12637
  if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
12638
- push$1({
12638
+ push$2({
12639
12639
  type: "at",
12640
12640
  extglob: true,
12641
12641
  value,
@@ -12643,7 +12643,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12643
12643
  });
12644
12644
  continue;
12645
12645
  }
12646
- push$1({
12646
+ push$2({
12647
12647
  type: "text",
12648
12648
  value
12649
12649
  });
@@ -12659,7 +12659,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12659
12659
  value += match[0];
12660
12660
  state.index += match[0].length;
12661
12661
  }
12662
- push$1({
12662
+ push$2({
12663
12663
  type: "text",
12664
12664
  value
12665
12665
  });
@@ -12693,7 +12693,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12693
12693
  const isStart = prior.type === "slash" || prior.type === "bos";
12694
12694
  const afterStar = before && (before.type === "star" || before.type === "globstar");
12695
12695
  if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) {
12696
- push$1({
12696
+ push$2({
12697
12697
  type: "star",
12698
12698
  value,
12699
12699
  output: ""
@@ -12703,7 +12703,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12703
12703
  const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace");
12704
12704
  const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren");
12705
12705
  if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) {
12706
- push$1({
12706
+ push$2({
12707
12707
  type: "star",
12708
12708
  value,
12709
12709
  output: ""
@@ -12746,7 +12746,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12746
12746
  state.output += prior.output + prev.output;
12747
12747
  state.globstar = true;
12748
12748
  consume(value + advance());
12749
- push$1({
12749
+ push$2({
12750
12750
  type: "slash",
12751
12751
  value: "/",
12752
12752
  output: ""
@@ -12760,7 +12760,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12760
12760
  state.output = prev.output;
12761
12761
  state.globstar = true;
12762
12762
  consume(value + advance());
12763
- push$1({
12763
+ push$2({
12764
12764
  type: "slash",
12765
12765
  value: "/",
12766
12766
  output: ""
@@ -12784,12 +12784,12 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12784
12784
  if (opts.bash === true) {
12785
12785
  token.output = ".*?";
12786
12786
  if (prev.type === "bos" || prev.type === "slash") token.output = nodot + token.output;
12787
- push$1(token);
12787
+ push$2(token);
12788
12788
  continue;
12789
12789
  }
12790
12790
  if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) {
12791
12791
  token.output = value;
12792
- push$1(token);
12792
+ push$2(token);
12793
12793
  continue;
12794
12794
  }
12795
12795
  if (state.index === state.start || prev.type === "slash" || prev.type === "dot") {
@@ -12808,7 +12808,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12808
12808
  prev.output += ONE_CHAR;
12809
12809
  }
12810
12810
  }
12811
- push$1(token);
12811
+ push$2(token);
12812
12812
  }
12813
12813
  while (state.brackets > 0) {
12814
12814
  if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]"));
@@ -12825,7 +12825,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12825
12825
  state.output = utils.escapeLast(state.output, "{");
12826
12826
  decrement("braces");
12827
12827
  }
12828
- if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) push$1({
12828
+ if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) push$2({
12829
12829
  type: "maybe_slash",
12830
12830
  value: "",
12831
12831
  output: `${SLASH_LITERAL}?`
@@ -14529,7 +14529,7 @@ var require_queue = /* @__PURE__ */ __commonJSMin(((exports, module) => {
14529
14529
  var _running = 0;
14530
14530
  var errorHandler = null;
14531
14531
  var self$1 = {
14532
- push: push$1,
14532
+ push: push$2,
14533
14533
  drain: noop,
14534
14534
  saturated: noop,
14535
14535
  pause,
@@ -14599,7 +14599,7 @@ var require_queue = /* @__PURE__ */ __commonJSMin(((exports, module) => {
14599
14599
  function idle() {
14600
14600
  return _running === 0 && self$1.length() === 0;
14601
14601
  }
14602
- function push$1(value, done) {
14602
+ function push$2(value, done) {
14603
14603
  var current = cache$2.get();
14604
14604
  current.context = context;
14605
14605
  current.release = release;
@@ -14720,11 +14720,11 @@ var require_queue = /* @__PURE__ */ __commonJSMin(((exports, module) => {
14720
14720
  var queue = fastqueue(context, asyncWrapper, _concurrency);
14721
14721
  var pushCb = queue.push;
14722
14722
  var unshiftCb = queue.unshift;
14723
- queue.push = push$1;
14723
+ queue.push = push$2;
14724
14724
  queue.unshift = unshift$1;
14725
14725
  queue.drained = drained;
14726
14726
  return queue;
14727
- function push$1(value) {
14727
+ function push$2(value) {
14728
14728
  var p$1 = new Promise(function(resolve$1, reject) {
14729
14729
  pushCb(value, function(err, result) {
14730
14730
  if (err) {
@@ -16941,7 +16941,8 @@ const ProjectConfigSchema = object({
16941
16941
  site: SiteConfigSchema.optional(),
16942
16942
  entitiesDir: string().optional().default("entities"),
16943
16943
  functionsDir: string().optional().default("functions"),
16944
- agentsDir: string().optional().default("agents")
16944
+ agentsDir: string().optional().default("agents"),
16945
+ connectors: array(string()).optional()
16945
16946
  });
16946
16947
  const AppConfigSchema = object({ id: string().min(1, "id cannot be empty") });
16947
16948
  const CreateProjectResponseSchema = looseObject({ id: string() });
@@ -28851,7 +28852,7 @@ var Yallist = class Yallist {
28851
28852
  this.length++;
28852
28853
  }
28853
28854
  push(...args) {
28854
- for (let i$1 = 0, l$1 = args.length; i$1 < l$1; i$1++) push(this, args[i$1]);
28855
+ for (let i$1 = 0, l$1 = args.length; i$1 < l$1; i$1++) push$1(this, args[i$1]);
28855
28856
  return this.length;
28856
28857
  }
28857
28858
  unshift(...args) {
@@ -29029,7 +29030,7 @@ function insertAfter(self$1, node, value) {
29029
29030
  self$1.length++;
29030
29031
  return inserted;
29031
29032
  }
29032
- function push(self$1, item) {
29033
+ function push$1(self$1, item) {
29033
29034
  self$1.tail = new Node(item, self$1.tail, void 0, self$1);
29034
29035
  if (!self$1.head) self$1.head = self$1.tail;
29035
29036
  self$1.length++;
@@ -39354,17 +39355,11 @@ async function listConnectors() {
39354
39355
  return ListResponseSchema.parse(json).integrations;
39355
39356
  }
39356
39357
  /**
39357
- * Disconnects (soft delete) a connector integration.
39358
- */
39359
- async function disconnectConnector(integrationType) {
39360
- await getAppClient().delete(`external-auth/integrations/${integrationType}`);
39361
- }
39362
- /**
39363
39358
  * Removes (hard delete) a connector integration.
39364
39359
  * This permanently removes the connector and cannot be undone.
39365
39360
  */
39366
39361
  async function removeConnector(integrationType) {
39367
- await getAppClient().delete(`external-auth/integrations/${integrationType}/remove`);
39362
+ await getAppClient().delete(`external-auth/integrations/${integrationType}`);
39368
39363
  }
39369
39364
 
39370
39365
  //#endregion
@@ -39454,130 +39449,129 @@ async function waitForOAuthCompletion(integrationType, connectionId, options) {
39454
39449
  };
39455
39450
  }
39456
39451
  }
39457
- /**
39458
- * Asserts that a string is a valid integration type, throwing if not.
39459
- */
39460
- function assertValidIntegrationType(type, supportedIntegrations) {
39461
- if (!supportedIntegrations.includes(type)) {
39462
- const supportedList = supportedIntegrations.join(", ");
39463
- throw new Error(`Unsupported connector: ${type}\nSupported connectors: ${supportedList}`);
39464
- }
39465
- }
39466
39452
 
39467
39453
  //#endregion
39468
- //#region src/cli/commands/connectors/add.ts
39469
- async function promptForIntegrationType() {
39470
- const selected = await ve({
39471
- message: "Select an integration to connect:",
39472
- options: Object.entries(INTEGRATION_DISPLAY_NAMES).map(([type, displayName]) => ({
39473
- value: type,
39474
- label: displayName
39475
- }))
39476
- });
39477
- if (pD(selected)) {
39478
- xe("Operation cancelled.");
39479
- process.exit(0);
39480
- }
39481
- return selected;
39454
+ //#region src/cli/commands/connectors/push.ts
39455
+ /**
39456
+ * Get connectors defined in the local config.jsonc
39457
+ */
39458
+ async function getLocalConnectors() {
39459
+ const connectors = (await runTask("Reading project config...", async () => readProjectConfig(), {
39460
+ successMessage: "Project config loaded",
39461
+ errorMessage: "Failed to read project config"
39462
+ })).project.connectors || [];
39463
+ const validConnectors = [];
39464
+ const invalidConnectors = [];
39465
+ for (const connector of connectors) if (isValidIntegration(connector)) validConnectors.push(connector);
39466
+ else invalidConnectors.push(connector);
39467
+ if (invalidConnectors.length > 0) throw new Error(`Invalid connectors found in config.jsonc: ${invalidConnectors.join(", ")}`);
39468
+ return validConnectors;
39482
39469
  }
39483
- async function pollForOAuthCompletion(integrationType, connectionId) {
39484
- return await runTask("Waiting for authorization...", async () => {
39485
- return await waitForOAuthCompletion(integrationType, connectionId);
39486
- }, {
39487
- successMessage: "Authorization completed!",
39488
- errorMessage: "Authorization failed"
39470
+ /**
39471
+ * Get active connectors from the backend
39472
+ */
39473
+ async function getBackendConnectors() {
39474
+ const connectors = await runTask("Fetching active connectors...", async () => listConnectors(), {
39475
+ successMessage: "Active connectors loaded",
39476
+ errorMessage: "Failed to fetch connectors"
39489
39477
  });
39478
+ const activeConnectors = /* @__PURE__ */ new Set();
39479
+ for (const connector of connectors) if (isValidIntegration(connector.integrationType)) activeConnectors.add(connector.integrationType);
39480
+ return activeConnectors;
39490
39481
  }
39491
- async function addConnector(integrationType) {
39492
- let selectedType;
39493
- if (integrationType) {
39494
- assertValidIntegrationType(integrationType, SUPPORTED_INTEGRATIONS);
39495
- selectedType = integrationType;
39496
- } else selectedType = await promptForIntegrationType();
39497
- const displayName = getIntegrationDisplayName(selectedType);
39482
+ /**
39483
+ * Activate a connector by initiating OAuth and polling for completion
39484
+ */
39485
+ async function activateConnector(integrationType) {
39486
+ const displayName = getIntegrationDisplayName(integrationType);
39498
39487
  const initiateResponse = await runTask(`Initiating ${displayName} connection...`, async () => {
39499
- return await initiateOAuth(selectedType);
39488
+ return await initiateOAuth(integrationType);
39500
39489
  }, {
39501
39490
  successMessage: `${displayName} OAuth initiated`,
39502
39491
  errorMessage: `Failed to initiate ${displayName} connection`
39503
39492
  });
39504
- if (initiateResponse.alreadyAuthorized) return { outroMessage: `Already connected to ${theme.styles.bold(displayName)}` };
39505
- if (initiateResponse.error === "different_user" && initiateResponse.otherUserEmail) throw new Error(`This app is already connected to ${displayName} by ${initiateResponse.otherUserEmail}`);
39506
- if (!initiateResponse.redirectUrl || !initiateResponse.connectionId) throw new Error("Invalid response from server: missing redirect URL or connection ID");
39493
+ if (initiateResponse.alreadyAuthorized) return { success: true };
39494
+ if (initiateResponse.error === "different_user" && initiateResponse.otherUserEmail) return {
39495
+ success: false,
39496
+ error: `Already connected by ${initiateResponse.otherUserEmail}`
39497
+ };
39498
+ if (!initiateResponse.redirectUrl || !initiateResponse.connectionId) return {
39499
+ success: false,
39500
+ error: "Invalid response from server: missing redirect URL or connection ID"
39501
+ };
39507
39502
  M.info(`Please authorize ${displayName} at:\n${theme.colors.links(initiateResponse.redirectUrl)}`);
39508
- const result = await pollForOAuthCompletion(selectedType, initiateResponse.connectionId);
39509
- if (!result.success) throw new Error(result.error || "Authorization failed");
39510
- const accountInfo = result.accountEmail ? ` as ${theme.styles.bold(result.accountEmail)}` : "";
39511
- return { outroMessage: `Successfully connected to ${theme.styles.bold(displayName)}${accountInfo}` };
39512
- }
39513
- const connectorsAddCommand = new Command("add").argument("[type]", "Integration type (e.g., slack, notion, googlecalendar)").description("Connect an OAuth integration").action(async (type) => {
39514
- await runCommand(() => addConnector(type), {
39515
- requireAuth: true,
39516
- requireAppConfig: true
39503
+ return await runTask("Waiting for authorization...", async () => {
39504
+ return await waitForOAuthCompletion(integrationType, initiateResponse.connectionId);
39505
+ }, {
39506
+ successMessage: "Authorization completed!",
39507
+ errorMessage: "Authorization failed"
39517
39508
  });
39518
- });
39519
-
39520
- //#endregion
39521
- //#region src/cli/commands/connectors/remove.ts
39522
- function mapBackendConnectors(connectors) {
39523
- return connectors.filter((c$1) => isValidIntegration(c$1.integrationType)).map((c$1) => ({
39524
- type: c$1.integrationType,
39525
- displayName: getIntegrationDisplayName(c$1.integrationType),
39526
- accountEmail: (c$1.accountInfo?.email || c$1.accountInfo?.name) ?? void 0
39527
- }));
39528
39509
  }
39529
- function validateConnectorType(type, connectors) {
39530
- if (!isValidIntegration(type)) throw new Error(`Invalid connector type: ${type}`);
39531
- const connector = connectors.find((c$1) => c$1.type === type);
39532
- if (!connector) throw new Error(`No ${getIntegrationDisplayName(type)} connector found`);
39533
- return connector;
39534
- }
39535
- async function promptForConnectorToRemove(connectors) {
39536
- const selected = await ve({
39537
- message: "Select a connector to remove:",
39538
- options: connectors.map((c$1) => {
39539
- let label = c$1.displayName;
39540
- if (c$1.accountEmail) label += ` (${c$1.accountEmail})`;
39541
- return {
39542
- value: c$1.type,
39543
- label
39544
- };
39545
- })
39510
+ /**
39511
+ * Delete a connector from the backend (hard delete)
39512
+ */
39513
+ async function deleteConnector(integrationType) {
39514
+ const displayName = getIntegrationDisplayName(integrationType);
39515
+ await runTask(`Removing ${displayName}...`, async () => {
39516
+ await removeConnector(integrationType);
39517
+ }, {
39518
+ successMessage: `${displayName} removed`,
39519
+ errorMessage: `Failed to remove ${displayName}`
39546
39520
  });
39547
- if (pD(selected)) {
39548
- xe("Operation cancelled.");
39549
- process.exit(0);
39550
- }
39551
- return connectors.find((c$1) => c$1.type === selected);
39552
39521
  }
39553
- async function removeConnectorCommand(integrationType, options = {}) {
39554
- const isHardDelete = options.hard === true;
39555
- const connectors = mapBackendConnectors(await runTask("Fetching connectors...", async () => listConnectors(), {
39556
- successMessage: "Connectors loaded",
39557
- errorMessage: "Failed to fetch connectors"
39558
- }));
39559
- if (connectors.length === 0) return { outroMessage: "No connectors to remove" };
39560
- const selectedConnector = integrationType ? validateConnectorType(integrationType, connectors) : await promptForConnectorToRemove(connectors);
39561
- const displayName = selectedConnector.displayName;
39562
- const accountInfo = selectedConnector.accountEmail ? ` (${selectedConnector.accountEmail})` : "";
39563
- if (!options.yes) {
39564
- const shouldRemove = await ye({ message: `${isHardDelete ? "Permanently remove" : "Remove"} ${displayName}${accountInfo}?` });
39565
- if (pD(shouldRemove) || !shouldRemove) {
39522
+ async function push(options = {}) {
39523
+ const localConnectors = await getLocalConnectors();
39524
+ const backendConnectors = await getBackendConnectors();
39525
+ const toDelete = [];
39526
+ const toActivate = [];
39527
+ const alreadyActive = [];
39528
+ for (const connector of backendConnectors) if (!localConnectors.includes(connector)) toDelete.push(connector);
39529
+ for (const connector of localConnectors) if (backendConnectors.has(connector)) alreadyActive.push(connector);
39530
+ else toActivate.push(connector);
39531
+ if (toDelete.length === 0 && toActivate.length === 0) return { outroMessage: "All connectors are in sync. Nothing to do." };
39532
+ M.info("\nConnector sync summary:");
39533
+ if (toDelete.length > 0) M.warn(` ${theme.colors.error("Delete from backend:")} ${toDelete.map(getIntegrationDisplayName).join(", ")}`);
39534
+ if (toActivate.length > 0) M.info(` ${theme.colors.success("Activate:")} ${toActivate.map(getIntegrationDisplayName).join(", ")}`);
39535
+ if (alreadyActive.length > 0) M.info(` ${theme.colors.dim("Already active:")} ${alreadyActive.map(getIntegrationDisplayName).join(", ")}`);
39536
+ if (!options.yes && toDelete.length > 0) {
39537
+ const shouldContinue = await ye({ message: `Delete ${toDelete.length} connector(s) from backend?` });
39538
+ if (pD(shouldContinue) || !shouldContinue) {
39566
39539
  xe("Operation cancelled.");
39567
39540
  process.exit(0);
39568
39541
  }
39569
39542
  }
39570
- await runTask(`Removing ${displayName}...`, async () => {
39571
- if (isHardDelete) await removeConnector(selectedConnector.type);
39572
- else await disconnectConnector(selectedConnector.type);
39573
- }, {
39574
- successMessage: `${displayName} removed`,
39575
- errorMessage: `Failed to remove ${displayName}`
39576
- });
39577
- return { outroMessage: `Successfully removed ${theme.styles.bold(displayName)}` };
39543
+ const deleteResults = [];
39544
+ for (const connector of toDelete) try {
39545
+ await deleteConnector(connector);
39546
+ deleteResults.push(`${theme.colors.success("✓")} Deleted ${getIntegrationDisplayName(connector)}`);
39547
+ } catch (error) {
39548
+ const errorMsg = error instanceof Error ? error.message : "Unknown error";
39549
+ deleteResults.push(`${theme.colors.error("✗")} Failed to delete ${getIntegrationDisplayName(connector)}: ${errorMsg}`);
39550
+ }
39551
+ const activationResults = [];
39552
+ for (const connector of toActivate) try {
39553
+ const result = await activateConnector(connector);
39554
+ if (result.success) {
39555
+ const accountInfo = result.accountEmail ? ` as ${theme.styles.bold(result.accountEmail)}` : "";
39556
+ activationResults.push(`${theme.colors.success("✓")} Activated ${getIntegrationDisplayName(connector)}${accountInfo}`);
39557
+ } else activationResults.push(`${theme.colors.error("✗")} Failed to activate ${getIntegrationDisplayName(connector)}: ${result.error}`);
39558
+ } catch (error) {
39559
+ const errorMsg = error instanceof Error ? error.message : "Unknown error";
39560
+ activationResults.push(`${theme.colors.error("✗")} Failed to activate ${getIntegrationDisplayName(connector)}: ${errorMsg}`);
39561
+ }
39562
+ const summaryLines = [];
39563
+ if (deleteResults.length > 0) {
39564
+ summaryLines.push("\nDeleted connectors:");
39565
+ summaryLines.push(...deleteResults.map((r$1) => ` ${r$1}`));
39566
+ }
39567
+ if (activationResults.length > 0) {
39568
+ summaryLines.push("\nActivated connectors:");
39569
+ summaryLines.push(...activationResults.map((r$1) => ` ${r$1}`));
39570
+ }
39571
+ return { outroMessage: summaryLines.join("\n") || "Connector sync completed" };
39578
39572
  }
39579
- const connectorsRemoveCommand = new Command("remove").argument("[type]", "Integration type to remove (e.g., slack, notion)").option("--hard", "Permanently remove the connector (cannot be undone)").option("-y, --yes", "Skip confirmation prompt").description("Remove an OAuth integration").action(async (type, options) => {
39580
- await runCommand(() => removeConnectorCommand(type, options), {
39573
+ const connectorsPushCommand = new Command("push").description("Sync connectors defined in config.jsonc with backend").option("-y, --yes", "Skip confirmation prompts").action(async (options) => {
39574
+ await runCommand(() => push(options), {
39581
39575
  requireAuth: true,
39582
39576
  requireAppConfig: true
39583
39577
  });
@@ -39585,7 +39579,7 @@ const connectorsRemoveCommand = new Command("remove").argument("[type]", "Integr
39585
39579
 
39586
39580
  //#endregion
39587
39581
  //#region src/cli/commands/connectors/index.ts
39588
- const connectorsCommand = new Command("connectors").description("Manage OAuth connectors").addCommand(connectorsAddCommand).addCommand(connectorsRemoveCommand);
39582
+ const connectorsCommand = new Command("connectors").description("Manage OAuth connectors").addCommand(connectorsPushCommand);
39589
39583
 
39590
39584
  //#endregion
39591
39585
  //#region package.json
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "task_manager",
3
+ "description": "An AI agent that helps you manage and change your tasks",
4
+ "instructions": "You are a helpful task management assistant. You can help users create, update, mark as completed, and delete tasks using the entity tool. When a user asks to change a task, help them modify it by updating the appropriate fields. Always be conversational and helpful.",
5
+ "tool_configs": [
6
+ {
7
+ "entity_name": "Task",
8
+ "allowed_operations": ["read", "create", "update", "delete"]
9
+ }
10
+ ]
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base44-preview/cli",
3
- "version": "0.0.25-pr.104.2d197bb",
3
+ "version": "0.0.25-pr.104.e8c6c8b",
4
4
  "description": "Base44 CLI - Unified interface for managing Base44 applications",
5
5
  "type": "module",
6
6
  "bin": {