@synergenius/flow-weaver 0.21.2 → 0.21.4

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.
@@ -13,9 +13,9 @@ import { getErrorMessage } from '../../utils/error-utils.js';
13
13
  */
14
14
  export async function marketInitCommand(name, options = {}) {
15
15
  // Validate name
16
- if (!name.startsWith('flowweaver-pack-')) {
17
- const suggested = `flowweaver-pack-${name}`;
18
- logger.warn(`Name should follow "flowweaver-pack-*" convention, using "${suggested}"`);
16
+ if (!name.startsWith('flow-weaver-pack-')) {
17
+ const suggested = `flow-weaver-pack-${name}`;
18
+ logger.warn(`Name should follow "flow-weaver-pack-*" convention, using "${suggested}"`);
19
19
  name = suggested;
20
20
  }
21
21
  const targetDir = path.resolve(name);
@@ -48,7 +48,7 @@ export async function marketInitCommand(name, options = {}) {
48
48
  fs.mkdirSync(dir, { recursive: true });
49
49
  }
50
50
  // package.json
51
- const shortName = name.replace(/^flowweaver-pack-/, '');
51
+ const shortName = name.replace(/^flow-weaver-pack-/, '');
52
52
  const pkg = {
53
53
  name,
54
54
  version: '1.0.0',
@@ -389,7 +389,7 @@ function resolvePackageName(spec) {
389
389
  if (spec.endsWith('.tgz') || spec.endsWith('.tar.gz')) {
390
390
  // For local tarballs, try to extract the package name
391
391
  const base = path.basename(spec, spec.endsWith('.tar.gz') ? '.tar.gz' : '.tgz');
392
- // flowweaver-pack-test-1.0.0 → flowweaver-pack-test
392
+ // flow-weaver-pack-test-1.0.0 → flow-weaver-pack-test
393
393
  const match = base.match(/^(.+)-\d+\.\d+\.\d+/);
394
394
  return match ? match[1] : base;
395
395
  }
@@ -3127,13 +3127,39 @@ var init_unescape = __esm({
3127
3127
  });
3128
3128
 
3129
3129
  // node_modules/minimatch/dist/esm/ast.js
3130
- var types, isExtglobType, startNoTraversal, startNoDot, addPatternStart, justDots, reSpecials, regExpEscape, qmark, star, starNoEmpty, AST;
3130
+ var _a, types, isExtglobType, isExtglobAST, adoptionMap, adoptionWithSpaceMap, adoptionAnyMap, usurpMap, startNoTraversal, startNoDot, addPatternStart, justDots, reSpecials, regExpEscape, qmark, star, starNoEmpty, AST;
3131
3131
  var init_ast = __esm({
3132
3132
  "node_modules/minimatch/dist/esm/ast.js"() {
3133
3133
  init_brace_expressions();
3134
3134
  init_unescape();
3135
3135
  types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
3136
3136
  isExtglobType = (c) => types.has(c);
3137
+ isExtglobAST = (c) => isExtglobType(c.type);
3138
+ adoptionMap = /* @__PURE__ */ new Map([
3139
+ ["!", ["@"]],
3140
+ ["?", ["?", "@"]],
3141
+ ["@", ["@"]],
3142
+ ["*", ["*", "+", "?", "@"]],
3143
+ ["+", ["+", "@"]]
3144
+ ]);
3145
+ adoptionWithSpaceMap = /* @__PURE__ */ new Map([
3146
+ ["!", ["?"]],
3147
+ ["@", ["?"]],
3148
+ ["+", ["?", "*"]]
3149
+ ]);
3150
+ adoptionAnyMap = /* @__PURE__ */ new Map([
3151
+ ["!", ["?", "@"]],
3152
+ ["?", ["?", "@"]],
3153
+ ["@", ["?", "@"]],
3154
+ ["*", ["*", "+", "?", "@"]],
3155
+ ["+", ["+", "@", "?", "*"]]
3156
+ ]);
3157
+ usurpMap = /* @__PURE__ */ new Map([
3158
+ ["!", /* @__PURE__ */ new Map([["!", "@"]])],
3159
+ ["?", /* @__PURE__ */ new Map([["*", "*"], ["+", "*"]])],
3160
+ ["@", /* @__PURE__ */ new Map([["!", "!"], ["?", "?"], ["@", "@"], ["*", "*"], ["+", "+"]])],
3161
+ ["+", /* @__PURE__ */ new Map([["?", "*"], ["*", "*"]])]
3162
+ ]);
3137
3163
  startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
3138
3164
  startNoDot = "(?!\\.)";
3139
3165
  addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
@@ -3143,7 +3169,7 @@ var init_ast = __esm({
3143
3169
  qmark = "[^/]";
3144
3170
  star = qmark + "*?";
3145
3171
  starNoEmpty = qmark + "+?";
3146
- AST = class _AST {
3172
+ AST = class {
3147
3173
  type;
3148
3174
  #root;
3149
3175
  #hasMagic;
@@ -3223,7 +3249,7 @@ var init_ast = __esm({
3223
3249
  for (const p of parts) {
3224
3250
  if (p === "")
3225
3251
  continue;
3226
- if (typeof p !== "string" && !(p instanceof _AST && p.#parent === this)) {
3252
+ if (typeof p !== "string" && !(p instanceof _a && p.#parent === this)) {
3227
3253
  throw new Error("invalid part: " + p);
3228
3254
  }
3229
3255
  this.#parts.push(p);
@@ -3248,7 +3274,7 @@ var init_ast = __esm({
3248
3274
  const p = this.#parent;
3249
3275
  for (let i = 0; i < this.#parentIndex; i++) {
3250
3276
  const pp = p.#parts[i];
3251
- if (!(pp instanceof _AST && pp.type === "!")) {
3277
+ if (!(pp instanceof _a && pp.type === "!")) {
3252
3278
  return false;
3253
3279
  }
3254
3280
  }
@@ -3273,13 +3299,14 @@ var init_ast = __esm({
3273
3299
  this.push(part.clone(this));
3274
3300
  }
3275
3301
  clone(parent) {
3276
- const c = new _AST(this.type, parent);
3302
+ const c = new _a(this.type, parent);
3277
3303
  for (const p of this.#parts) {
3278
3304
  c.copyIn(p);
3279
3305
  }
3280
3306
  return c;
3281
3307
  }
3282
- static #parseAST(str2, ast, pos, opt) {
3308
+ static #parseAST(str2, ast, pos, opt, extDepth) {
3309
+ const maxDepth = opt.maxExtglobRecursion ?? 2;
3283
3310
  let escaping = false;
3284
3311
  let inBrace = false;
3285
3312
  let braceStart = -1;
@@ -3311,11 +3338,12 @@ var init_ast = __esm({
3311
3338
  acc2 += c;
3312
3339
  continue;
3313
3340
  }
3314
- if (!opt.noext && isExtglobType(c) && str2.charAt(i2) === "(") {
3341
+ const doRecurse = !opt.noext && isExtglobType(c) && str2.charAt(i2) === "(" && extDepth <= maxDepth;
3342
+ if (doRecurse) {
3315
3343
  ast.push(acc2);
3316
3344
  acc2 = "";
3317
- const ext2 = new _AST(c, ast);
3318
- i2 = _AST.#parseAST(str2, ext2, i2, opt);
3345
+ const ext2 = new _a(c, ast);
3346
+ i2 = _a.#parseAST(str2, ext2, i2, opt, extDepth + 1);
3319
3347
  ast.push(ext2);
3320
3348
  continue;
3321
3349
  }
@@ -3325,7 +3353,7 @@ var init_ast = __esm({
3325
3353
  return i2;
3326
3354
  }
3327
3355
  let i = pos + 1;
3328
- let part = new _AST(null, ast);
3356
+ let part = new _a(null, ast);
3329
3357
  const parts = [];
3330
3358
  let acc = "";
3331
3359
  while (i < str2.length) {
@@ -3352,19 +3380,22 @@ var init_ast = __esm({
3352
3380
  acc += c;
3353
3381
  continue;
3354
3382
  }
3355
- if (isExtglobType(c) && str2.charAt(i) === "(") {
3383
+ const doRecurse = isExtglobType(c) && str2.charAt(i) === "(" && /* c8 ignore start - the maxDepth is sufficient here */
3384
+ (extDepth <= maxDepth || ast && ast.#canAdoptType(c));
3385
+ if (doRecurse) {
3386
+ const depthAdd = ast && ast.#canAdoptType(c) ? 0 : 1;
3356
3387
  part.push(acc);
3357
3388
  acc = "";
3358
- const ext2 = new _AST(c, part);
3389
+ const ext2 = new _a(c, part);
3359
3390
  part.push(ext2);
3360
- i = _AST.#parseAST(str2, ext2, i, opt);
3391
+ i = _a.#parseAST(str2, ext2, i, opt, extDepth + depthAdd);
3361
3392
  continue;
3362
3393
  }
3363
3394
  if (c === "|") {
3364
3395
  part.push(acc);
3365
3396
  acc = "";
3366
3397
  parts.push(part);
3367
- part = new _AST(null, ast);
3398
+ part = new _a(null, ast);
3368
3399
  continue;
3369
3400
  }
3370
3401
  if (c === ")") {
@@ -3383,9 +3414,101 @@ var init_ast = __esm({
3383
3414
  ast.#parts = [str2.substring(pos - 1)];
3384
3415
  return i;
3385
3416
  }
3417
+ #canAdoptWithSpace(child) {
3418
+ return this.#canAdopt(child, adoptionWithSpaceMap);
3419
+ }
3420
+ #canAdopt(child, map3 = adoptionMap) {
3421
+ if (!child || typeof child !== "object" || child.type !== null || child.#parts.length !== 1 || this.type === null) {
3422
+ return false;
3423
+ }
3424
+ const gc = child.#parts[0];
3425
+ if (!gc || typeof gc !== "object" || gc.type === null) {
3426
+ return false;
3427
+ }
3428
+ return this.#canAdoptType(gc.type, map3);
3429
+ }
3430
+ #canAdoptType(c, map3 = adoptionAnyMap) {
3431
+ return !!map3.get(this.type)?.includes(c);
3432
+ }
3433
+ #adoptWithSpace(child, index) {
3434
+ const gc = child.#parts[0];
3435
+ const blank = new _a(null, gc, this.options);
3436
+ blank.#parts.push("");
3437
+ gc.push(blank);
3438
+ this.#adopt(child, index);
3439
+ }
3440
+ #adopt(child, index) {
3441
+ const gc = child.#parts[0];
3442
+ this.#parts.splice(index, 1, ...gc.#parts);
3443
+ for (const p of gc.#parts) {
3444
+ if (typeof p === "object")
3445
+ p.#parent = this;
3446
+ }
3447
+ this.#toString = void 0;
3448
+ }
3449
+ #canUsurpType(c) {
3450
+ const m = usurpMap.get(this.type);
3451
+ return !!m?.has(c);
3452
+ }
3453
+ #canUsurp(child) {
3454
+ if (!child || typeof child !== "object" || child.type !== null || child.#parts.length !== 1 || this.type === null || this.#parts.length !== 1) {
3455
+ return false;
3456
+ }
3457
+ const gc = child.#parts[0];
3458
+ if (!gc || typeof gc !== "object" || gc.type === null) {
3459
+ return false;
3460
+ }
3461
+ return this.#canUsurpType(gc.type);
3462
+ }
3463
+ #usurp(child) {
3464
+ const m = usurpMap.get(this.type);
3465
+ const gc = child.#parts[0];
3466
+ const nt = m?.get(gc.type);
3467
+ if (!nt)
3468
+ return false;
3469
+ this.#parts = gc.#parts;
3470
+ for (const p of this.#parts) {
3471
+ if (typeof p === "object")
3472
+ p.#parent = this;
3473
+ }
3474
+ this.type = nt;
3475
+ this.#toString = void 0;
3476
+ this.#emptyExt = false;
3477
+ }
3478
+ #flatten() {
3479
+ if (!isExtglobAST(this)) {
3480
+ for (const p of this.#parts) {
3481
+ if (typeof p === "object")
3482
+ p.#flatten();
3483
+ }
3484
+ } else {
3485
+ let iterations = 0;
3486
+ let done = false;
3487
+ do {
3488
+ done = true;
3489
+ for (let i = 0; i < this.#parts.length; i++) {
3490
+ const c = this.#parts[i];
3491
+ if (typeof c === "object") {
3492
+ c.#flatten();
3493
+ if (this.#canAdopt(c)) {
3494
+ done = false;
3495
+ this.#adopt(c, i);
3496
+ } else if (this.#canAdoptWithSpace(c)) {
3497
+ done = false;
3498
+ this.#adoptWithSpace(c, i);
3499
+ } else if (this.#canUsurp(c)) {
3500
+ done = false;
3501
+ this.#usurp(c);
3502
+ }
3503
+ }
3504
+ }
3505
+ } while (!done && ++iterations < 10);
3506
+ }
3507
+ this.#toString = void 0;
3508
+ }
3386
3509
  static fromGlob(pattern, options = {}) {
3387
- const ast = new _AST(null, void 0, options);
3388
- _AST.#parseAST(pattern, ast, 0, options);
3510
+ const ast = new _a(null, void 0, options);
3511
+ _a.#parseAST(pattern, ast, 0, options, 0);
3389
3512
  return ast;
3390
3513
  }
3391
3514
  // returns the regular expression if there's magic, or the unescaped
@@ -3479,12 +3602,14 @@ var init_ast = __esm({
3479
3602
  // or start or whatever) and prepend ^ or / at the Regexp construction.
3480
3603
  toRegExpSource(allowDot) {
3481
3604
  const dot = allowDot ?? !!this.#options.dot;
3482
- if (this.#root === this)
3605
+ if (this.#root === this) {
3606
+ this.#flatten();
3483
3607
  this.#fillNegs();
3484
- if (!this.type) {
3608
+ }
3609
+ if (!isExtglobAST(this)) {
3485
3610
  const noEmpty = this.isStart() && this.isEnd();
3486
3611
  const src = this.#parts.map((p) => {
3487
- const [re, _, hasMagic2, uflag] = typeof p === "string" ? _AST.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot);
3612
+ const [re, _, hasMagic2, uflag] = typeof p === "string" ? _a.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot);
3488
3613
  this.#hasMagic = this.#hasMagic || hasMagic2;
3489
3614
  this.#uflag = this.#uflag || uflag;
3490
3615
  return re;
@@ -3523,9 +3648,10 @@ var init_ast = __esm({
3523
3648
  let body = this.#partsToRegExp(dot);
3524
3649
  if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
3525
3650
  const s = this.toString();
3526
- this.#parts = [s];
3527
- this.type = null;
3528
- this.#hasMagic = void 0;
3651
+ const me = this;
3652
+ me.#parts = [s];
3653
+ me.type = null;
3654
+ me.#hasMagic = void 0;
3529
3655
  return [s, unescape2(this.toString()), false, false];
3530
3656
  }
3531
3657
  let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? "" : this.#partsToRegExp(true);
@@ -3566,11 +3692,13 @@ var init_ast = __esm({
3566
3692
  let escaping = false;
3567
3693
  let re = "";
3568
3694
  let uflag = false;
3695
+ let inStar = false;
3569
3696
  for (let i = 0; i < glob2.length; i++) {
3570
3697
  const c = glob2.charAt(i);
3571
3698
  if (escaping) {
3572
3699
  escaping = false;
3573
3700
  re += (reSpecials.has(c) ? "\\" : "") + c;
3701
+ inStar = false;
3574
3702
  continue;
3575
3703
  }
3576
3704
  if (c === "\\") {
@@ -3588,16 +3716,19 @@ var init_ast = __esm({
3588
3716
  uflag = uflag || needUflag;
3589
3717
  i += consumed - 1;
3590
3718
  hasMagic2 = hasMagic2 || magic;
3719
+ inStar = false;
3591
3720
  continue;
3592
3721
  }
3593
3722
  }
3594
3723
  if (c === "*") {
3595
- if (noEmpty && glob2 === "*")
3596
- re += starNoEmpty;
3597
- else
3598
- re += star;
3724
+ if (inStar)
3725
+ continue;
3726
+ inStar = true;
3727
+ re += noEmpty && /^[*]+$/.test(glob2) ? starNoEmpty : star;
3599
3728
  hasMagic2 = true;
3600
3729
  continue;
3730
+ } else {
3731
+ inStar = false;
3601
3732
  }
3602
3733
  if (c === "?") {
3603
3734
  re += qmark;
@@ -3609,6 +3740,7 @@ var init_ast = __esm({
3609
3740
  return [re, unescape2(glob2), !!hasMagic2, uflag];
3610
3741
  }
3611
3742
  };
3743
+ _a = AST;
3612
3744
  }
3613
3745
  });
3614
3746
 
@@ -3782,11 +3914,13 @@ var init_esm = __esm({
3782
3914
  isWindows;
3783
3915
  platform;
3784
3916
  windowsNoMagicRoot;
3917
+ maxGlobstarRecursion;
3785
3918
  regexp;
3786
3919
  constructor(pattern, options = {}) {
3787
3920
  assertValidPattern(pattern);
3788
3921
  options = options || {};
3789
3922
  this.options = options;
3923
+ this.maxGlobstarRecursion = options.maxGlobstarRecursion ?? 200;
3790
3924
  this.pattern = pattern;
3791
3925
  this.platform = options.platform || defaultPlatform;
3792
3926
  this.isWindows = this.platform === "win32";
@@ -4119,7 +4253,8 @@ var init_esm = __esm({
4119
4253
  // out of pattern, then that's fine, as long as all
4120
4254
  // the parts match.
4121
4255
  matchOne(file, pattern, partial2 = false) {
4122
- const options = this.options;
4256
+ let fileStartIndex = 0;
4257
+ let patternStartIndex = 0;
4123
4258
  if (this.isWindows) {
4124
4259
  const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
4125
4260
  const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
@@ -4128,14 +4263,14 @@ var init_esm = __esm({
4128
4263
  const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
4129
4264
  const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
4130
4265
  if (typeof fdi === "number" && typeof pdi === "number") {
4131
- const [fd, pd] = [file[fdi], pattern[pdi]];
4266
+ const [fd, pd] = [
4267
+ file[fdi],
4268
+ pattern[pdi]
4269
+ ];
4132
4270
  if (fd.toLowerCase() === pd.toLowerCase()) {
4133
4271
  pattern[pdi] = fd;
4134
- if (pdi > fdi) {
4135
- pattern = pattern.slice(pdi);
4136
- } else if (fdi > pdi) {
4137
- file = file.slice(fdi);
4138
- }
4272
+ patternStartIndex = pdi;
4273
+ fileStartIndex = fdi;
4139
4274
  }
4140
4275
  }
4141
4276
  }
@@ -4143,51 +4278,118 @@ var init_esm = __esm({
4143
4278
  if (optimizationLevel >= 2) {
4144
4279
  file = this.levelTwoFileOptimize(file);
4145
4280
  }
4146
- this.debug("matchOne", this, { file, pattern });
4147
- this.debug("matchOne", file.length, pattern.length);
4148
- for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
4149
- this.debug("matchOne loop");
4150
- var p = pattern[pi];
4151
- var f = file[fi];
4152
- this.debug(pattern, p, f);
4153
- if (p === false) {
4281
+ if (pattern.includes(GLOBSTAR)) {
4282
+ return this.#matchGlobstar(file, pattern, partial2, fileStartIndex, patternStartIndex);
4283
+ }
4284
+ return this.#matchOne(file, pattern, partial2, fileStartIndex, patternStartIndex);
4285
+ }
4286
+ #matchGlobstar(file, pattern, partial2, fileIndex, patternIndex) {
4287
+ const firstgs = pattern.indexOf(GLOBSTAR, patternIndex);
4288
+ const lastgs = pattern.lastIndexOf(GLOBSTAR);
4289
+ const [head2, body, tail] = partial2 ? [
4290
+ pattern.slice(patternIndex, firstgs),
4291
+ pattern.slice(firstgs + 1),
4292
+ []
4293
+ ] : [
4294
+ pattern.slice(patternIndex, firstgs),
4295
+ pattern.slice(firstgs + 1, lastgs),
4296
+ pattern.slice(lastgs + 1)
4297
+ ];
4298
+ if (head2.length) {
4299
+ const fileHead = file.slice(fileIndex, fileIndex + head2.length);
4300
+ if (!this.#matchOne(fileHead, head2, partial2, 0, 0))
4154
4301
  return false;
4155
- }
4156
- if (p === GLOBSTAR) {
4157
- this.debug("GLOBSTAR", [pattern, p, f]);
4158
- var fr = fi;
4159
- var pr = pi + 1;
4160
- if (pr === pl) {
4161
- this.debug("** at the end");
4162
- for (; fi < fl; fi++) {
4163
- if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".")
4164
- return false;
4165
- }
4166
- return true;
4302
+ fileIndex += head2.length;
4303
+ }
4304
+ let fileTailMatch = 0;
4305
+ if (tail.length) {
4306
+ if (tail.length + fileIndex > file.length)
4307
+ return false;
4308
+ let tailStart = file.length - tail.length;
4309
+ if (this.#matchOne(file, tail, partial2, tailStart, 0)) {
4310
+ fileTailMatch = tail.length;
4311
+ } else {
4312
+ if (file[file.length - 1] !== "" || fileIndex + tail.length === file.length) {
4313
+ return false;
4167
4314
  }
4168
- while (fr < fl) {
4169
- var swallowee = file[fr];
4170
- this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
4171
- if (this.matchOne(file.slice(fr), pattern.slice(pr), partial2)) {
4172
- this.debug("globstar found match!", fr, fl, swallowee);
4173
- return true;
4174
- } else {
4175
- if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
4176
- this.debug("dot detected!", file, fr, pattern, pr);
4177
- break;
4178
- }
4179
- this.debug("globstar swallow a segment, and continue");
4180
- fr++;
4181
- }
4315
+ tailStart--;
4316
+ if (!this.#matchOne(file, tail, partial2, tailStart, 0))
4317
+ return false;
4318
+ fileTailMatch = tail.length + 1;
4319
+ }
4320
+ }
4321
+ if (!body.length) {
4322
+ let sawSome = !!fileTailMatch;
4323
+ for (let i2 = fileIndex; i2 < file.length - fileTailMatch; i2++) {
4324
+ const f = String(file[i2]);
4325
+ sawSome = true;
4326
+ if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
4327
+ return false;
4182
4328
  }
4183
- if (partial2) {
4184
- this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
4185
- if (fr === fl) {
4186
- return true;
4187
- }
4329
+ }
4330
+ return partial2 || sawSome;
4331
+ }
4332
+ const bodySegments = [[[], 0]];
4333
+ let currentBody = bodySegments[0];
4334
+ let nonGsParts = 0;
4335
+ const nonGsPartsSums = [0];
4336
+ for (const b of body) {
4337
+ if (b === GLOBSTAR) {
4338
+ nonGsPartsSums.push(nonGsParts);
4339
+ currentBody = [[], 0];
4340
+ bodySegments.push(currentBody);
4341
+ } else {
4342
+ currentBody[0].push(b);
4343
+ nonGsParts++;
4344
+ }
4345
+ }
4346
+ let i = bodySegments.length - 1;
4347
+ const fileLength = file.length - fileTailMatch;
4348
+ for (const b of bodySegments) {
4349
+ b[1] = fileLength - (nonGsPartsSums[i--] + b[0].length);
4350
+ }
4351
+ return !!this.#matchGlobStarBodySections(file, bodySegments, fileIndex, 0, partial2, 0, !!fileTailMatch);
4352
+ }
4353
+ #matchGlobStarBodySections(file, bodySegments, fileIndex, bodyIndex, partial2, globStarDepth, sawTail) {
4354
+ const bs = bodySegments[bodyIndex];
4355
+ if (!bs) {
4356
+ for (let i = fileIndex; i < file.length; i++) {
4357
+ sawTail = true;
4358
+ const f = file[i];
4359
+ if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
4360
+ return false;
4188
4361
  }
4362
+ }
4363
+ return sawTail;
4364
+ }
4365
+ const [body, after] = bs;
4366
+ while (fileIndex <= after) {
4367
+ const m = this.#matchOne(file.slice(0, fileIndex + body.length), body, partial2, fileIndex, 0);
4368
+ if (m && globStarDepth < this.maxGlobstarRecursion) {
4369
+ const sub = this.#matchGlobStarBodySections(file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial2, globStarDepth + 1, sawTail);
4370
+ if (sub !== false)
4371
+ return sub;
4372
+ }
4373
+ const f = file[fileIndex];
4374
+ if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
4189
4375
  return false;
4190
4376
  }
4377
+ fileIndex++;
4378
+ }
4379
+ return partial2 || null;
4380
+ }
4381
+ #matchOne(file, pattern, partial2, fileIndex, patternIndex) {
4382
+ let fi;
4383
+ let pi;
4384
+ let pl;
4385
+ let fl;
4386
+ for (fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
4387
+ this.debug("matchOne loop");
4388
+ let p = pattern[pi];
4389
+ let f = file[fi];
4390
+ this.debug(pattern, p, f);
4391
+ if (p === false || p === GLOBSTAR)
4392
+ return false;
4191
4393
  let hit;
4192
4394
  if (typeof p === "string") {
4193
4395
  hit = f === p;
@@ -9469,7 +9671,7 @@ var VERSION;
9469
9671
  var init_generated_version = __esm({
9470
9672
  "src/generated-version.ts"() {
9471
9673
  "use strict";
9472
- VERSION = "0.21.2";
9674
+ VERSION = "0.21.4";
9473
9675
  }
9474
9676
  });
9475
9677
 
@@ -14901,7 +15103,7 @@ is not a problem with esbuild. You need to fix your environment instead.
14901
15103
  if (keepNames) flags.push(`--keep-names`);
14902
15104
  }
14903
15105
  function flagsForBuildOptions(callName, options, isTTY22, logLevelDefault, writeDefault) {
14904
- var _a2;
15106
+ var _a22;
14905
15107
  let flags = [];
14906
15108
  let entries = [];
14907
15109
  let keys2 = /* @__PURE__ */ Object.create(null);
@@ -14937,7 +15139,7 @@ is not a problem with esbuild. You need to fix your environment instead.
14937
15139
  let entryPoints = getFlag(options, keys2, "entryPoints", mustBeEntryPoints);
14938
15140
  let absWorkingDir = getFlag(options, keys2, "absWorkingDir", mustBeString);
14939
15141
  let stdin = getFlag(options, keys2, "stdin", mustBeObject);
14940
- let write = (_a2 = getFlag(options, keys2, "write", mustBeBoolean)) != null ? _a2 : writeDefault;
15142
+ let write = (_a22 = getFlag(options, keys2, "write", mustBeBoolean)) != null ? _a22 : writeDefault;
14941
15143
  let allowOverwrite = getFlag(options, keys2, "allowOverwrite", mustBeBoolean);
14942
15144
  let mangleCache = getFlag(options, keys2, "mangleCache", mustBeObject);
14943
15145
  keys2.plugins = true;
@@ -16313,8 +16515,8 @@ for your current platform.`);
16313
16515
  worker_threads = void 0;
16314
16516
  }
16315
16517
  }
16316
- var _a;
16317
- var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.27.3";
16518
+ var _a2;
16519
+ var isInternalWorkerThread = ((_a2 = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a2.esbuildVersion) === "0.27.3";
16318
16520
  var esbuildCommandAndArgs = () => {
16319
16521
  if ((!ESBUILD_BINARY_PATH || false) && (path210.basename(__filename) !== "main.js" || path210.basename(__dirname) !== "lib")) {
16320
16522
  throw new Error(
@@ -29198,8 +29400,8 @@ var init_llk_lookahead = __esm({
29198
29400
  init_lookahead();
29199
29401
  LLkLookaheadStrategy = class {
29200
29402
  constructor(options) {
29201
- var _a;
29202
- this.maxLookahead = (_a = options === null || options === void 0 ? void 0 : options.maxLookahead) !== null && _a !== void 0 ? _a : DEFAULT_PARSER_CONFIG.maxLookahead;
29403
+ var _a2;
29404
+ this.maxLookahead = (_a2 = options === null || options === void 0 ? void 0 : options.maxLookahead) !== null && _a2 !== void 0 ? _a2 : DEFAULT_PARSER_CONFIG.maxLookahead;
29203
29405
  }
29204
29406
  validate(options) {
29205
29407
  const leftRecursionErrors = this.validateNoLeftRecursion(options.rules);
@@ -31068,8 +31270,8 @@ var init_parser = __esm({
31068
31270
  });
31069
31271
  }
31070
31272
  this.TRACE_INIT("ComputeLookaheadFunctions", () => {
31071
- var _a, _b;
31072
- (_b = (_a = this.lookaheadStrategy).initialize) === null || _b === void 0 ? void 0 : _b.call(_a, {
31273
+ var _a2, _b;
31274
+ (_b = (_a2 = this.lookaheadStrategy).initialize) === null || _b === void 0 ? void 0 : _b.call(_a2, {
31073
31275
  rules: values_default(this.gastProductionsCache)
31074
31276
  });
31075
31277
  this.preComputeLookaheadFunctions(values_default(this.gastProductionsCache));
@@ -35114,8 +35316,8 @@ async function listInstalledPackages(projectDir) {
35114
35316
  const nodeModules = path5.join(projectDir, "node_modules");
35115
35317
  if (!fs5.existsSync(nodeModules)) return [];
35116
35318
  const patterns = [
35117
- path5.join(nodeModules, "flowweaver-pack-*", "flowweaver.manifest.json"),
35118
- path5.join(nodeModules, "@*", "flowweaver-pack-*", "flowweaver.manifest.json")
35319
+ path5.join(nodeModules, "flow-weaver-pack-*", "flowweaver.manifest.json"),
35320
+ path5.join(nodeModules, "@*", "flow-weaver-pack-*", "flowweaver.manifest.json")
35119
35321
  ];
35120
35322
  const results = [];
35121
35323
  for (const pattern of patterns) {
@@ -35222,7 +35424,7 @@ var init_registry = __esm({
35222
35424
  init_esm5();
35223
35425
  MARKETPLACE_KEYWORD = "flowweaver-marketplace-pack";
35224
35426
  NPM_SEARCH_URL = "https://registry.npmjs.org/-/v1/search";
35225
- PACK_NAME_RE = /^(@[^/]+\/)?(flowweaver|flow-weaver)-pack-.+$/;
35427
+ PACK_NAME_RE = /^(@[^/]+\/)?flow-weaver-pack-.+$/;
35226
35428
  }
35227
35429
  });
35228
35430
 
@@ -60984,12 +61186,12 @@ var require_code = __commonJS({
60984
61186
  return item === "" || item === '""';
60985
61187
  }
60986
61188
  get str() {
60987
- var _a;
60988
- return (_a = this._str) !== null && _a !== void 0 ? _a : this._str = this._items.reduce((s, c) => `${s}${c}`, "");
61189
+ var _a2;
61190
+ return (_a2 = this._str) !== null && _a2 !== void 0 ? _a2 : this._str = this._items.reduce((s, c) => `${s}${c}`, "");
60989
61191
  }
60990
61192
  get names() {
60991
- var _a;
60992
- return (_a = this._names) !== null && _a !== void 0 ? _a : this._names = this._items.reduce((names, c) => {
61193
+ var _a2;
61194
+ return (_a2 = this._names) !== null && _a2 !== void 0 ? _a2 : this._names = this._items.reduce((names, c) => {
60993
61195
  if (c instanceof Name)
60994
61196
  names[c.str] = (names[c.str] || 0) + 1;
60995
61197
  return names;
@@ -61135,8 +61337,8 @@ var require_scope = __commonJS({
61135
61337
  return `${prefix}${ng.index++}`;
61136
61338
  }
61137
61339
  _nameGroup(prefix) {
61138
- var _a, _b;
61139
- if (((_b = (_a = this._parent) === null || _a === void 0 ? void 0 : _a._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || this._prefixes && !this._prefixes.has(prefix)) {
61340
+ var _a2, _b;
61341
+ if (((_b = (_a2 = this._parent) === null || _a2 === void 0 ? void 0 : _a2._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || this._prefixes && !this._prefixes.has(prefix)) {
61140
61342
  throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`);
61141
61343
  }
61142
61344
  return this._names[prefix] = { prefix, index: 0 };
@@ -61169,12 +61371,12 @@ var require_scope = __commonJS({
61169
61371
  return new ValueScopeName(prefix, this._newName(prefix));
61170
61372
  }
61171
61373
  value(nameOrPrefix, value) {
61172
- var _a;
61374
+ var _a2;
61173
61375
  if (value.ref === void 0)
61174
61376
  throw new Error("CodeGen: ref must be passed in value");
61175
61377
  const name = this.toName(nameOrPrefix);
61176
61378
  const { prefix } = name;
61177
- const valueKey = (_a = value.key) !== null && _a !== void 0 ? _a : value.ref;
61379
+ const valueKey = (_a2 = value.key) !== null && _a2 !== void 0 ? _a2 : value.ref;
61178
61380
  let vs = this._values[prefix];
61179
61381
  if (vs) {
61180
61382
  const _name = vs.get(valueKey);
@@ -61492,8 +61694,8 @@ var require_codegen = __commonJS({
61492
61694
  return this;
61493
61695
  }
61494
61696
  optimizeNames(names, constants) {
61495
- var _a;
61496
- this.else = (_a = this.else) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants);
61697
+ var _a2;
61698
+ this.else = (_a2 = this.else) === null || _a2 === void 0 ? void 0 : _a2.optimizeNames(names, constants);
61497
61699
  if (!(super.optimizeNames(names, constants) || this.else))
61498
61700
  return;
61499
61701
  this.condition = optimizeExpr(this.condition, names, constants);
@@ -61597,16 +61799,16 @@ var require_codegen = __commonJS({
61597
61799
  return code;
61598
61800
  }
61599
61801
  optimizeNodes() {
61600
- var _a, _b;
61802
+ var _a2, _b;
61601
61803
  super.optimizeNodes();
61602
- (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNodes();
61804
+ (_a2 = this.catch) === null || _a2 === void 0 ? void 0 : _a2.optimizeNodes();
61603
61805
  (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNodes();
61604
61806
  return this;
61605
61807
  }
61606
61808
  optimizeNames(names, constants) {
61607
- var _a, _b;
61809
+ var _a2, _b;
61608
61810
  super.optimizeNames(names, constants);
61609
- (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants);
61811
+ (_a2 = this.catch) === null || _a2 === void 0 ? void 0 : _a2.optimizeNames(names, constants);
61610
61812
  (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names, constants);
61611
61813
  return this;
61612
61814
  }
@@ -62386,8 +62588,8 @@ var require_applicability = __commonJS({
62386
62588
  }
62387
62589
  exports2.shouldUseGroup = shouldUseGroup;
62388
62590
  function shouldUseRule(schema2, rule) {
62389
- var _a;
62390
- return schema2[rule.keyword] !== void 0 || ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema2[kwd] !== void 0));
62591
+ var _a2;
62592
+ return schema2[rule.keyword] !== void 0 || ((_a2 = rule.definition.implements) === null || _a2 === void 0 ? void 0 : _a2.some((kwd) => schema2[kwd] !== void 0));
62391
62593
  }
62392
62594
  exports2.shouldUseRule = shouldUseRule;
62393
62595
  }
@@ -62775,14 +62977,14 @@ var require_keyword = __commonJS({
62775
62977
  }
62776
62978
  exports2.macroKeywordCode = macroKeywordCode;
62777
62979
  function funcKeywordCode(cxt, def) {
62778
- var _a;
62980
+ var _a2;
62779
62981
  const { gen, keyword, schema: schema2, parentSchema, $data, it } = cxt;
62780
62982
  checkAsyncKeyword(it, def);
62781
62983
  const validate = !$data && def.compile ? def.compile.call(it.self, schema2, parentSchema, it) : def.validate;
62782
62984
  const validateRef = useKeyword(gen, keyword, validate);
62783
62985
  const valid = gen.let("valid");
62784
62986
  cxt.block$data(valid, validateKeyword);
62785
- cxt.ok((_a = def.valid) !== null && _a !== void 0 ? _a : valid);
62987
+ cxt.ok((_a2 = def.valid) !== null && _a2 !== void 0 ? _a2 : valid);
62786
62988
  function validateKeyword() {
62787
62989
  if (def.errors === false) {
62788
62990
  assignValid();
@@ -62813,8 +63015,8 @@ var require_keyword = __commonJS({
62813
63015
  gen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);
62814
63016
  }
62815
63017
  function reportErrs(errors2) {
62816
- var _a2;
62817
- gen.if((0, codegen_1.not)((_a2 = def.valid) !== null && _a2 !== void 0 ? _a2 : valid), errors2);
63018
+ var _a3;
63019
+ gen.if((0, codegen_1.not)((_a3 = def.valid) !== null && _a3 !== void 0 ? _a3 : valid), errors2);
62818
63020
  }
62819
63021
  }
62820
63022
  exports2.funcKeywordCode = funcKeywordCode;
@@ -63782,7 +63984,7 @@ var require_compile = __commonJS({
63782
63984
  var validate_1 = require_validate();
63783
63985
  var SchemaEnv = class {
63784
63986
  constructor(env) {
63785
- var _a;
63987
+ var _a2;
63786
63988
  this.refs = {};
63787
63989
  this.dynamicAnchors = {};
63788
63990
  let schema2;
@@ -63791,7 +63993,7 @@ var require_compile = __commonJS({
63791
63993
  this.schema = env.schema;
63792
63994
  this.schemaId = env.schemaId;
63793
63995
  this.root = env.root || this;
63794
- this.baseId = (_a = env.baseId) !== null && _a !== void 0 ? _a : (0, resolve_1.normalizeId)(schema2 === null || schema2 === void 0 ? void 0 : schema2[env.schemaId || "$id"]);
63996
+ this.baseId = (_a2 = env.baseId) !== null && _a2 !== void 0 ? _a2 : (0, resolve_1.normalizeId)(schema2 === null || schema2 === void 0 ? void 0 : schema2[env.schemaId || "$id"]);
63795
63997
  this.schemaPath = env.schemaPath;
63796
63998
  this.localRefs = env.localRefs;
63797
63999
  this.meta = env.meta;
@@ -63887,14 +64089,14 @@ var require_compile = __commonJS({
63887
64089
  }
63888
64090
  exports2.compileSchema = compileSchema;
63889
64091
  function resolveRef(root2, baseId, ref) {
63890
- var _a;
64092
+ var _a2;
63891
64093
  ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref);
63892
64094
  const schOrFunc = root2.refs[ref];
63893
64095
  if (schOrFunc)
63894
64096
  return schOrFunc;
63895
64097
  let _sch = resolve35.call(this, root2, ref);
63896
64098
  if (_sch === void 0) {
63897
- const schema2 = (_a = root2.localRefs) === null || _a === void 0 ? void 0 : _a[ref];
64099
+ const schema2 = (_a2 = root2.localRefs) === null || _a2 === void 0 ? void 0 : _a2[ref];
63898
64100
  const { schemaId } = this.opts;
63899
64101
  if (schema2)
63900
64102
  _sch = new SchemaEnv({ schema: schema2, schemaId, root: root2, baseId });
@@ -63963,8 +64165,8 @@ var require_compile = __commonJS({
63963
64165
  "definitions"
63964
64166
  ]);
63965
64167
  function getJsonPointer(parsedRef, { baseId, schema: schema2, root: root2 }) {
63966
- var _a;
63967
- if (((_a = parsedRef.fragment) === null || _a === void 0 ? void 0 : _a[0]) !== "/")
64168
+ var _a2;
64169
+ if (((_a2 = parsedRef.fragment) === null || _a2 === void 0 ? void 0 : _a2[0]) !== "/")
63968
64170
  return;
63969
64171
  for (const part of parsedRef.fragment.slice(1).split("/")) {
63970
64172
  if (typeof schema2 === "boolean")
@@ -64825,9 +65027,9 @@ var require_core = __commonJS({
64825
65027
  };
64826
65028
  var MAX_EXPRESSION = 200;
64827
65029
  function requiredOptions(o) {
64828
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
65030
+ var _a2, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
64829
65031
  const s = o.strict;
64830
- const _optz = (_a = o.code) === null || _a === void 0 ? void 0 : _a.optimize;
65032
+ const _optz = (_a2 = o.code) === null || _a2 === void 0 ? void 0 : _a2.optimize;
64831
65033
  const optimize = _optz === true || _optz === void 0 ? 1 : _optz || 0;
64832
65034
  const regExp = (_c = (_b = o.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp;
64833
65035
  const uriResolver = (_d = o.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default;
@@ -65301,7 +65503,7 @@ var require_core = __commonJS({
65301
65503
  }
65302
65504
  }
65303
65505
  function addRule(keyword, definition, dataType) {
65304
- var _a;
65506
+ var _a2;
65305
65507
  const post = definition === null || definition === void 0 ? void 0 : definition.post;
65306
65508
  if (dataType && post)
65307
65509
  throw new Error('keyword with "post" flag cannot have "type"');
@@ -65327,7 +65529,7 @@ var require_core = __commonJS({
65327
65529
  else
65328
65530
  ruleGroup.rules.push(rule);
65329
65531
  RULES.all[keyword] = rule;
65330
- (_a = definition.implements) === null || _a === void 0 ? void 0 : _a.forEach((kwd) => this.addKeyword(kwd));
65532
+ (_a2 = definition.implements) === null || _a2 === void 0 ? void 0 : _a2.forEach((kwd) => this.addKeyword(kwd));
65331
65533
  }
65332
65534
  function addBeforeRule(ruleGroup, rule, before) {
65333
65535
  const i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before);
@@ -65461,10 +65663,10 @@ var require_ref = __commonJS({
65461
65663
  gen.assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`);
65462
65664
  }
65463
65665
  function addEvaluatedFrom(source) {
65464
- var _a;
65666
+ var _a2;
65465
65667
  if (!it.opts.unevaluated)
65466
65668
  return;
65467
- const schEvaluated = (_a = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a === void 0 ? void 0 : _a.evaluated;
65669
+ const schEvaluated = (_a2 = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a2 === void 0 ? void 0 : _a2.evaluated;
65468
65670
  if (it.props !== true) {
65469
65671
  if (schEvaluated && !schEvaluated.dynamicProps) {
65470
65672
  if (schEvaluated.props !== void 0) {
@@ -67115,7 +67317,7 @@ var require_discriminator = __commonJS({
67115
67317
  return _valid;
67116
67318
  }
67117
67319
  function getMapping() {
67118
- var _a;
67320
+ var _a2;
67119
67321
  const oneOfMapping = {};
67120
67322
  const topRequired = hasRequired(parentSchema);
67121
67323
  let tagRequired = true;
@@ -67129,7 +67331,7 @@ var require_discriminator = __commonJS({
67129
67331
  if (sch === void 0)
67130
67332
  throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref);
67131
67333
  }
67132
- const propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName];
67334
+ const propSch = (_a2 = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a2 === void 0 ? void 0 : _a2[tagName];
67133
67335
  if (typeof propSch != "object") {
67134
67336
  throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`);
67135
67337
  }
@@ -67698,9 +67900,9 @@ var require_dist = __commonJS({
67698
67900
  return f;
67699
67901
  };
67700
67902
  function addFormats(ajv, list, fs47, exportName) {
67701
- var _a;
67903
+ var _a2;
67702
67904
  var _b;
67703
- (_a = (_b = ajv.opts.code).formats) !== null && _a !== void 0 ? _a : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
67905
+ (_a2 = (_b = ajv.opts.code).formats) !== null && _a2 !== void 0 ? _a2 : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
67704
67906
  for (const f of list)
67705
67907
  ajv.addFormat(f, fs47[f]);
67706
67908
  }
@@ -69904,7 +70106,7 @@ function checkPackEngineVersion2(pkg) {
69904
70106
  }
69905
70107
  function deriveNamespace(packageName) {
69906
70108
  const base = packageName.replace(/^@[^/]+\//, "");
69907
- return base.replace(/^flowweaver-pack-/, "");
70109
+ return base.replace(/^flow-weaver-pack-/, "");
69908
70110
  }
69909
70111
  async function registerPackCommands(program3) {
69910
70112
  const projectDir = process.cwd();
@@ -76497,12 +76699,12 @@ var NEVER2 = Object.freeze({
76497
76699
  // @__NO_SIDE_EFFECTS__
76498
76700
  function $constructor(name, initializer3, params) {
76499
76701
  function init(inst, def) {
76500
- var _a;
76702
+ var _a2;
76501
76703
  Object.defineProperty(inst, "_zod", {
76502
76704
  value: inst._zod ?? {},
76503
76705
  enumerable: false
76504
76706
  });
76505
- (_a = inst._zod).traits ?? (_a.traits = /* @__PURE__ */ new Set());
76707
+ (_a2 = inst._zod).traits ?? (_a2.traits = /* @__PURE__ */ new Set());
76506
76708
  inst._zod.traits.add(name);
76507
76709
  initializer3(inst, def);
76508
76710
  for (const k in _.prototype) {
@@ -76517,10 +76719,10 @@ function $constructor(name, initializer3, params) {
76517
76719
  }
76518
76720
  Object.defineProperty(Definition, "name", { value: name });
76519
76721
  function _(def) {
76520
- var _a;
76722
+ var _a2;
76521
76723
  const inst = params?.Parent ? new Definition() : this;
76522
76724
  init(inst, def);
76523
- (_a = inst._zod).deferred ?? (_a.deferred = []);
76725
+ (_a2 = inst._zod).deferred ?? (_a2.deferred = []);
76524
76726
  for (const fn of inst._zod.deferred) {
76525
76727
  fn();
76526
76728
  }
@@ -77010,8 +77212,8 @@ function aborted(x, startIndex = 0) {
77010
77212
  }
77011
77213
  function prefixIssues(path50, issues) {
77012
77214
  return issues.map((iss) => {
77013
- var _a;
77014
- (_a = iss).path ?? (_a.path = []);
77215
+ var _a2;
77216
+ (_a2 = iss).path ?? (_a2.path = []);
77015
77217
  iss.path.unshift(path50);
77016
77218
  return iss;
77017
77219
  });
@@ -77257,10 +77459,10 @@ var uppercase = /^[^a-z]*$/;
77257
77459
 
77258
77460
  // node_modules/zod/v4/core/checks.js
77259
77461
  var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
77260
- var _a;
77462
+ var _a2;
77261
77463
  inst._zod ?? (inst._zod = {});
77262
77464
  inst._zod.def = def;
77263
- (_a = inst._zod).onattach ?? (_a.onattach = []);
77465
+ (_a2 = inst._zod).onattach ?? (_a2.onattach = []);
77264
77466
  });
77265
77467
  var numericOriginMap = {
77266
77468
  number: "number",
@@ -77326,8 +77528,8 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
77326
77528
  var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
77327
77529
  $ZodCheck.init(inst, def);
77328
77530
  inst._zod.onattach.push((inst2) => {
77329
- var _a;
77330
- (_a = inst2._zod.bag).multipleOf ?? (_a.multipleOf = def.value);
77531
+ var _a2;
77532
+ (_a2 = inst2._zod.bag).multipleOf ?? (_a2.multipleOf = def.value);
77331
77533
  });
77332
77534
  inst._zod.check = (payload) => {
77333
77535
  if (typeof payload.value !== typeof def.value)
@@ -77420,9 +77622,9 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
77420
77622
  };
77421
77623
  });
77422
77624
  var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
77423
- var _a;
77625
+ var _a2;
77424
77626
  $ZodCheck.init(inst, def);
77425
- (_a = inst._zod.def).when ?? (_a.when = (payload) => {
77627
+ (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
77426
77628
  const val = payload.value;
77427
77629
  return !nullish(val) && val.length !== void 0;
77428
77630
  });
@@ -77449,9 +77651,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
77449
77651
  };
77450
77652
  });
77451
77653
  var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
77452
- var _a;
77654
+ var _a2;
77453
77655
  $ZodCheck.init(inst, def);
77454
- (_a = inst._zod.def).when ?? (_a.when = (payload) => {
77656
+ (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
77455
77657
  const val = payload.value;
77456
77658
  return !nullish(val) && val.length !== void 0;
77457
77659
  });
@@ -77478,9 +77680,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
77478
77680
  };
77479
77681
  });
77480
77682
  var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
77481
- var _a;
77683
+ var _a2;
77482
77684
  $ZodCheck.init(inst, def);
77483
- (_a = inst._zod.def).when ?? (_a.when = (payload) => {
77685
+ (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
77484
77686
  const val = payload.value;
77485
77687
  return !nullish(val) && val.length !== void 0;
77486
77688
  });
@@ -77509,7 +77711,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
77509
77711
  };
77510
77712
  });
77511
77713
  var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
77512
- var _a, _b;
77714
+ var _a2, _b;
77513
77715
  $ZodCheck.init(inst, def);
77514
77716
  inst._zod.onattach.push((inst2) => {
77515
77717
  const bag = inst2._zod.bag;
@@ -77520,7 +77722,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
77520
77722
  }
77521
77723
  });
77522
77724
  if (def.pattern)
77523
- (_a = inst._zod).check ?? (_a.check = (payload) => {
77725
+ (_a2 = inst._zod).check ?? (_a2.check = (payload) => {
77524
77726
  def.pattern.lastIndex = 0;
77525
77727
  if (def.pattern.test(payload.value))
77526
77728
  return;
@@ -77685,7 +77887,7 @@ var version = {
77685
77887
 
77686
77888
  // node_modules/zod/v4/core/schemas.js
77687
77889
  var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
77688
- var _a;
77890
+ var _a2;
77689
77891
  inst ?? (inst = {});
77690
77892
  inst._zod.def = def;
77691
77893
  inst._zod.bag = inst._zod.bag || {};
@@ -77700,7 +77902,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
77700
77902
  }
77701
77903
  }
77702
77904
  if (checks.length === 0) {
77703
- (_a = inst._zod).deferred ?? (_a.deferred = []);
77905
+ (_a2 = inst._zod).deferred ?? (_a2.deferred = []);
77704
77906
  inst._zod.deferred?.push(() => {
77705
77907
  inst._zod.run = inst._zod.parse;
77706
77908
  });
@@ -79539,7 +79741,7 @@ var JSONSchemaGenerator = class {
79539
79741
  this.seen = /* @__PURE__ */ new Map();
79540
79742
  }
79541
79743
  process(schema2, _params = { path: [], schemaPath: [] }) {
79542
- var _a;
79744
+ var _a2;
79543
79745
  const def = schema2._zod.def;
79544
79746
  const formatMap = {
79545
79747
  guid: "uuid",
@@ -80001,7 +80203,7 @@ var JSONSchemaGenerator = class {
80001
80203
  delete result.schema.default;
80002
80204
  }
80003
80205
  if (this.io === "input" && result.schema._prefault)
80004
- (_a = result.schema).default ?? (_a.default = result.schema._prefault);
80206
+ (_a2 = result.schema).default ?? (_a2.default = result.schema._prefault);
80005
80207
  delete result.schema._prefault;
80006
80208
  const _result = this.seen.get(schema2);
80007
80209
  return _result.schema;
@@ -87805,7 +88007,7 @@ function registerExportTools(mcp) {
87805
88007
  const available = registry2.getNames();
87806
88008
  return makeErrorResult(
87807
88009
  "INVALID_TARGET",
87808
- available.length === 0 ? `No export targets installed. Install a target pack (e.g. npm install flowweaver-pack-${args.target})` : `Unknown target: "${args.target}". Installed: ${available.join(", ")}`
88010
+ available.length === 0 ? `No export targets installed. Install a target pack (e.g. npm install flow-weaver-pack-${args.target})` : `Unknown target: "${args.target}". Installed: ${available.join(", ")}`
87809
88011
  );
87810
88012
  }
87811
88013
  let parseResult;
@@ -88140,7 +88342,7 @@ import * as path32 from "path";
88140
88342
  function issue2(code, severity, message) {
88141
88343
  return { code, severity, message };
88142
88344
  }
88143
- var PACK_NAME_RE2 = /^(@[^/]+\/)?(flowweaver|flow-weaver)-pack-.+$/;
88345
+ var PACK_NAME_RE2 = /^(@[^/]+\/)?flow-weaver-pack-.+$/;
88144
88346
  var MARKETPLACE_KEYWORD2 = "flowweaver-marketplace-pack";
88145
88347
  function validatePackageJson(pkg, directory) {
88146
88348
  const issues = [];
@@ -88342,7 +88544,7 @@ function registerMarketplaceTools(mcp) {
88342
88544
  "fw_market_install",
88343
88545
  "Install a Flow Weaver marketplace package via npm. After installation, the package's node types, workflows, and patterns become available for use.",
88344
88546
  {
88345
- package: external_exports.string().describe('Package name or specifier (e.g., "flowweaver-pack-openai" or "flowweaver-pack-openai@1.0.0")')
88547
+ package: external_exports.string().describe('Package name or specifier (e.g., "flow-weaver-pack-openai" or "flow-weaver-pack-openai@1.0.0")')
88346
88548
  },
88347
88549
  async (args) => {
88348
88550
  try {
@@ -91116,7 +91318,7 @@ async function exportWorkflow(options) {
91116
91318
  if (!target) {
91117
91319
  const available = registry2.getNames();
91118
91320
  throw new Error(
91119
- available.length === 0 ? `No export targets installed. Install a target pack (e.g. npm install flowweaver-pack-${options.target})` : `Unknown target "${options.target}". Installed: ${available.join(", ")}`
91321
+ available.length === 0 ? `No export targets installed. Install a target pack (e.g. npm install flow-weaver-pack-${options.target})` : `Unknown target "${options.target}". Installed: ${available.join(", ")}`
91120
91322
  );
91121
91323
  }
91122
91324
  const inputPath = path40.resolve(options.input);
@@ -92233,9 +92435,9 @@ import * as path48 from "path";
92233
92435
  import { execSync as execSync7 } from "child_process";
92234
92436
  init_error_utils();
92235
92437
  async function marketInitCommand(name, options = {}) {
92236
- if (!name.startsWith("flowweaver-pack-")) {
92237
- const suggested = `flowweaver-pack-${name}`;
92238
- logger.warn(`Name should follow "flowweaver-pack-*" convention, using "${suggested}"`);
92438
+ if (!name.startsWith("flow-weaver-pack-")) {
92439
+ const suggested = `flow-weaver-pack-${name}`;
92440
+ logger.warn(`Name should follow "flow-weaver-pack-*" convention, using "${suggested}"`);
92239
92441
  name = suggested;
92240
92442
  }
92241
92443
  const targetDir = path48.resolve(name);
@@ -92265,7 +92467,7 @@ async function marketInitCommand(name, options = {}) {
92265
92467
  for (const dir of dirs) {
92266
92468
  fs46.mkdirSync(dir, { recursive: true });
92267
92469
  }
92268
- const shortName = name.replace(/^flowweaver-pack-/, "");
92470
+ const shortName = name.replace(/^flow-weaver-pack-/, "");
92269
92471
  const pkg = {
92270
92472
  name,
92271
92473
  version: "1.0.0",
@@ -92634,7 +92836,7 @@ function displayInstalledPackage(pkg) {
92634
92836
  // src/cli/index.ts
92635
92837
  init_logger();
92636
92838
  init_error_utils();
92637
- var version2 = true ? "0.21.2" : "0.0.0-dev";
92839
+ var version2 = true ? "0.21.4" : "0.0.0-dev";
92638
92840
  var program2 = new Command();
92639
92841
  program2.name("flow-weaver").description("Flow Weaver Annotations - Compile and validate workflow files").option("-v, --version", "Output the current version").option("--no-color", "Disable colors").option("--color", "Force colors").on("option:version", () => {
92640
92842
  logger.banner(version2);
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Scans for packs with cliCommands in their manifest. For each pack,
5
5
  * registers a Commander subcommand group under the pack namespace
6
- * (e.g., @synergenius/flowweaver-pack-weaver -> "weaver").
6
+ * (e.g., @synergenius/flow-weaver-pack-weaver -> "weaver").
7
7
  *
8
8
  * Command handlers are lazy: the pack's cliEntrypoint is only imported
9
9
  * when the user actually invokes a pack command.
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Scans for packs with cliCommands in their manifest. For each pack,
5
5
  * registers a Commander subcommand group under the pack namespace
6
- * (e.g., @synergenius/flowweaver-pack-weaver -> "weaver").
6
+ * (e.g., @synergenius/flow-weaver-pack-weaver -> "weaver").
7
7
  *
8
8
  * Command handlers are lazy: the pack's cliEntrypoint is only imported
9
9
  * when the user actually invokes a pack command.
@@ -34,12 +34,12 @@ function checkPackEngineVersion(pkg) {
34
34
  }
35
35
  /**
36
36
  * Derive a short namespace from a pack's npm name.
37
- * @synergenius/flowweaver-pack-weaver -> weaver
38
- * flowweaver-pack-gitlab-ci -> gitlab-ci
37
+ * @synergenius/flow-weaver-pack-weaver -> weaver
38
+ * flow-weaver-pack-gitlab-ci -> gitlab-ci
39
39
  */
40
40
  function deriveNamespace(packageName) {
41
41
  const base = packageName.replace(/^@[^/]+\//, '');
42
- return base.replace(/^flowweaver-pack-/, '');
42
+ return base.replace(/^flow-weaver-pack-/, '');
43
43
  }
44
44
  export async function registerPackCommands(program) {
45
45
  const projectDir = process.cwd();
@@ -20,7 +20,7 @@ import { ExportTargetRegistry } from './targets/base.js';
20
20
  /**
21
21
  * Create an export target registry via marketplace discovery.
22
22
  *
23
- * Scans `node_modules/` for installed `flowweaver-pack-*` packages that
23
+ * Scans `node_modules/` for installed `flow-weaver-pack-*` packages that
24
24
  * declare `exportTargets` in their `flowweaver.manifest.json`.
25
25
  * Each target class is eagerly imported (to resolve the async import) but
26
26
  * lazily instantiated — the constructor only runs when `registry.get()` is called.
@@ -25,7 +25,7 @@ import { ExportTargetRegistry } from './targets/base.js';
25
25
  /**
26
26
  * Create an export target registry via marketplace discovery.
27
27
  *
28
- * Scans `node_modules/` for installed `flowweaver-pack-*` packages that
28
+ * Scans `node_modules/` for installed `flow-weaver-pack-*` packages that
29
29
  * declare `exportTargets` in their `flowweaver.manifest.json`.
30
30
  * Each target class is eagerly imported (to resolve the async import) but
31
31
  * lazily instantiated — the constructor only runs when `registry.get()` is called.
@@ -21,7 +21,7 @@ export async function exportWorkflow(options) {
21
21
  if (!target) {
22
22
  const available = registry.getNames();
23
23
  throw new Error(available.length === 0
24
- ? `No export targets installed. Install a target pack (e.g. npm install flowweaver-pack-${options.target})`
24
+ ? `No export targets installed. Install a target pack (e.g. npm install flow-weaver-pack-${options.target})`
25
25
  : `Unknown target "${options.target}". Installed: ${available.join(', ')}`);
26
26
  }
27
27
  const inputPath = path.resolve(options.input);
@@ -4,8 +4,8 @@
4
4
  * Previously loaded built-in CI/CD and Inngest extensions via side-effect
5
5
  * imports. Both have been extracted to marketplace packs:
6
6
  *
7
- * - CI/CD: @synergenius/flowweaver-pack-cicd
8
- * - Inngest: @synergenius/flowweaver-pack-inngest
7
+ * - CI/CD: @synergenius/flow-weaver-pack-cicd
8
+ * - Inngest: @synergenius/flow-weaver-pack-inngest
9
9
  *
10
10
  * Extensions are now discovered via marketplace pack discovery in the parser
11
11
  * (loadPackHandlers) or registered by packs during installation.
@@ -5,8 +5,8 @@
5
5
  * Previously loaded built-in CI/CD and Inngest extensions via side-effect
6
6
  * imports. Both have been extracted to marketplace packs:
7
7
  *
8
- * - CI/CD: @synergenius/flowweaver-pack-cicd
9
- * - Inngest: @synergenius/flowweaver-pack-inngest
8
+ * - CI/CD: @synergenius/flow-weaver-pack-cicd
9
+ * - Inngest: @synergenius/flow-weaver-pack-inngest
10
10
  *
11
11
  * Extensions are now discovered via marketplace pack discovery in the parser
12
12
  * (loadPackHandlers) or registered by packs during installation.
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.21.2";
1
+ export declare const VERSION = "0.21.4";
2
2
  //# sourceMappingURL=generated-version.d.ts.map
@@ -1,3 +1,3 @@
1
1
  // Auto-generated by scripts/generate-version.ts — do not edit manually
2
- export const VERSION = '0.21.2';
2
+ export const VERSION = '0.21.4';
3
3
  //# sourceMappingURL=generated-version.js.map
@@ -10,7 +10,7 @@ import * as path from 'path';
10
10
  import { glob } from 'glob';
11
11
  const MARKETPLACE_KEYWORD = 'flowweaver-marketplace-pack';
12
12
  const NPM_SEARCH_URL = 'https://registry.npmjs.org/-/v1/search';
13
- const PACK_NAME_RE = /^(@[^/]+\/)?(flowweaver|flow-weaver)-pack-.+$/;
13
+ const PACK_NAME_RE = /^(@[^/]+\/)?flow-weaver-pack-.+$/;
14
14
  /**
15
15
  * Search the npm registry for marketplace packages.
16
16
  */
@@ -49,10 +49,10 @@ export async function listInstalledPackages(projectDir) {
49
49
  const nodeModules = path.join(projectDir, 'node_modules');
50
50
  if (!fs.existsSync(nodeModules))
51
51
  return [];
52
- // Look for flowweaver-pack-* and @*/flowweaver-pack-* directories
52
+ // Look for flow-weaver-pack-* and @*/flow-weaver-pack-* directories
53
53
  const patterns = [
54
- path.join(nodeModules, 'flowweaver-pack-*', 'flowweaver.manifest.json'),
55
- path.join(nodeModules, '@*', 'flowweaver-pack-*', 'flowweaver.manifest.json'),
54
+ path.join(nodeModules, 'flow-weaver-pack-*', 'flowweaver.manifest.json'),
55
+ path.join(nodeModules, '@*', 'flow-weaver-pack-*', 'flowweaver.manifest.json'),
56
56
  ];
57
57
  const results = [];
58
58
  for (const pattern of patterns) {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Marketplace types for Flow Weaver package distribution.
3
3
  *
4
- * Packages follow the naming convention `flowweaver-pack-*` and use
4
+ * Packages follow the naming convention `flow-weaver-pack-*` and use
5
5
  * npm as the distribution backbone. The manifest is auto-generated
6
6
  * from source annotations via the parser.
7
7
  */
@@ -256,7 +256,7 @@ export type TManifestMcpTool = {
256
256
  description: string;
257
257
  };
258
258
  export type TMarketInitConfig = {
259
- /** Package name (e.g., flowweaver-pack-openai) */
259
+ /** Package name (e.g., flow-weaver-pack-openai) */
260
260
  name: string;
261
261
  /** Target directory */
262
262
  directory: string;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Marketplace types for Flow Weaver package distribution.
3
3
  *
4
- * Packages follow the naming convention `flowweaver-pack-*` and use
4
+ * Packages follow the naming convention `flow-weaver-pack-*` and use
5
5
  * npm as the distribution backbone. The manifest is auto-generated
6
6
  * from source annotations via the parser.
7
7
  */
@@ -9,12 +9,12 @@ import { parseWorkflow, validateWorkflow } from '../api/index.js';
9
9
  function issue(code, severity, message) {
10
10
  return { code, severity, message };
11
11
  }
12
- const PACK_NAME_RE = /^(@[^/]+\/)?(flowweaver|flow-weaver)-pack-.+$/;
12
+ const PACK_NAME_RE = /^(@[^/]+\/)?flow-weaver-pack-.+$/;
13
13
  const MARKETPLACE_KEYWORD = 'flowweaver-marketplace-pack';
14
14
  // ── Package-level rules ──────────────────────────────────────────────────────
15
15
  function validatePackageJson(pkg, directory) {
16
16
  const issues = [];
17
- // PKG-005: Name must match flowweaver-pack-* or @*/flowweaver-pack-*
17
+ // PKG-005: Name must match flow-weaver-pack-* or @*/flow-weaver-pack-*
18
18
  const name = pkg.name;
19
19
  if (!name || !PACK_NAME_RE.test(name)) {
20
20
  issues.push(issue('PKG-005', 'error', `Package name must match "flow-weaver-pack-*" or "@<scope>/flow-weaver-pack-*", got "${name ?? ''}"`));
@@ -60,7 +60,7 @@ export function registerExportTools(mcp) {
60
60
  if (!exportTarget) {
61
61
  const available = registry.getNames();
62
62
  return makeErrorResult('INVALID_TARGET', available.length === 0
63
- ? `No export targets installed. Install a target pack (e.g. npm install flowweaver-pack-${args.target})`
63
+ ? `No export targets installed. Install a target pack (e.g. npm install flow-weaver-pack-${args.target})`
64
64
  : `Unknown target: "${args.target}". Installed: ${available.join(', ')}`);
65
65
  }
66
66
  // 3. Parse the file to discover workflows and node types
@@ -47,7 +47,7 @@ export function registerMarketplaceTools(mcp) {
47
47
  });
48
48
  // ── fw_market_install ────────────────────────────────────────────────────
49
49
  mcp.tool('fw_market_install', 'Install a Flow Weaver marketplace package via npm. After installation, the package\'s node types, workflows, and patterns become available for use.', {
50
- package: z.string().describe('Package name or specifier (e.g., "flowweaver-pack-openai" or "flowweaver-pack-openai@1.0.0")'),
50
+ package: z.string().describe('Package name or specifier (e.g., "flow-weaver-pack-openai" or "flow-weaver-pack-openai@1.0.0")'),
51
51
  }, async (args) => {
52
52
  try {
53
53
  // Run npm install
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synergenius/flow-weaver",
3
- "version": "0.21.2",
3
+ "version": "0.21.4",
4
4
  "description": "Deterministic workflow compiler for AI agents. Compiles to standalone TypeScript, no runtime dependencies.",
5
5
  "private": false,
6
6
  "type": "module",