@synergenius/flow-weaver 0.21.4 → 0.21.5

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.
@@ -3127,39 +3127,13 @@ var init_unescape = __esm({
3127
3127
  });
3128
3128
 
3129
3129
  // node_modules/minimatch/dist/esm/ast.js
3130
- var _a, types, isExtglobType, isExtglobAST, adoptionMap, adoptionWithSpaceMap, adoptionAnyMap, usurpMap, startNoTraversal, startNoDot, addPatternStart, justDots, reSpecials, regExpEscape, qmark, star, starNoEmpty, AST;
3130
+ var types, isExtglobType, 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
- ]);
3163
3137
  startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
3164
3138
  startNoDot = "(?!\\.)";
3165
3139
  addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
@@ -3169,7 +3143,7 @@ var init_ast = __esm({
3169
3143
  qmark = "[^/]";
3170
3144
  star = qmark + "*?";
3171
3145
  starNoEmpty = qmark + "+?";
3172
- AST = class {
3146
+ AST = class _AST {
3173
3147
  type;
3174
3148
  #root;
3175
3149
  #hasMagic;
@@ -3249,7 +3223,7 @@ var init_ast = __esm({
3249
3223
  for (const p of parts) {
3250
3224
  if (p === "")
3251
3225
  continue;
3252
- if (typeof p !== "string" && !(p instanceof _a && p.#parent === this)) {
3226
+ if (typeof p !== "string" && !(p instanceof _AST && p.#parent === this)) {
3253
3227
  throw new Error("invalid part: " + p);
3254
3228
  }
3255
3229
  this.#parts.push(p);
@@ -3274,7 +3248,7 @@ var init_ast = __esm({
3274
3248
  const p = this.#parent;
3275
3249
  for (let i = 0; i < this.#parentIndex; i++) {
3276
3250
  const pp = p.#parts[i];
3277
- if (!(pp instanceof _a && pp.type === "!")) {
3251
+ if (!(pp instanceof _AST && pp.type === "!")) {
3278
3252
  return false;
3279
3253
  }
3280
3254
  }
@@ -3299,14 +3273,13 @@ var init_ast = __esm({
3299
3273
  this.push(part.clone(this));
3300
3274
  }
3301
3275
  clone(parent) {
3302
- const c = new _a(this.type, parent);
3276
+ const c = new _AST(this.type, parent);
3303
3277
  for (const p of this.#parts) {
3304
3278
  c.copyIn(p);
3305
3279
  }
3306
3280
  return c;
3307
3281
  }
3308
- static #parseAST(str2, ast, pos, opt, extDepth) {
3309
- const maxDepth = opt.maxExtglobRecursion ?? 2;
3282
+ static #parseAST(str2, ast, pos, opt) {
3310
3283
  let escaping = false;
3311
3284
  let inBrace = false;
3312
3285
  let braceStart = -1;
@@ -3338,12 +3311,11 @@ var init_ast = __esm({
3338
3311
  acc2 += c;
3339
3312
  continue;
3340
3313
  }
3341
- const doRecurse = !opt.noext && isExtglobType(c) && str2.charAt(i2) === "(" && extDepth <= maxDepth;
3342
- if (doRecurse) {
3314
+ if (!opt.noext && isExtglobType(c) && str2.charAt(i2) === "(") {
3343
3315
  ast.push(acc2);
3344
3316
  acc2 = "";
3345
- const ext2 = new _a(c, ast);
3346
- i2 = _a.#parseAST(str2, ext2, i2, opt, extDepth + 1);
3317
+ const ext2 = new _AST(c, ast);
3318
+ i2 = _AST.#parseAST(str2, ext2, i2, opt);
3347
3319
  ast.push(ext2);
3348
3320
  continue;
3349
3321
  }
@@ -3353,7 +3325,7 @@ var init_ast = __esm({
3353
3325
  return i2;
3354
3326
  }
3355
3327
  let i = pos + 1;
3356
- let part = new _a(null, ast);
3328
+ let part = new _AST(null, ast);
3357
3329
  const parts = [];
3358
3330
  let acc = "";
3359
3331
  while (i < str2.length) {
@@ -3380,22 +3352,19 @@ var init_ast = __esm({
3380
3352
  acc += c;
3381
3353
  continue;
3382
3354
  }
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;
3355
+ if (isExtglobType(c) && str2.charAt(i) === "(") {
3387
3356
  part.push(acc);
3388
3357
  acc = "";
3389
- const ext2 = new _a(c, part);
3358
+ const ext2 = new _AST(c, part);
3390
3359
  part.push(ext2);
3391
- i = _a.#parseAST(str2, ext2, i, opt, extDepth + depthAdd);
3360
+ i = _AST.#parseAST(str2, ext2, i, opt);
3392
3361
  continue;
3393
3362
  }
3394
3363
  if (c === "|") {
3395
3364
  part.push(acc);
3396
3365
  acc = "";
3397
3366
  parts.push(part);
3398
- part = new _a(null, ast);
3367
+ part = new _AST(null, ast);
3399
3368
  continue;
3400
3369
  }
3401
3370
  if (c === ")") {
@@ -3414,101 +3383,9 @@ var init_ast = __esm({
3414
3383
  ast.#parts = [str2.substring(pos - 1)];
3415
3384
  return i;
3416
3385
  }
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
- }
3509
3386
  static fromGlob(pattern, options = {}) {
3510
- const ast = new _a(null, void 0, options);
3511
- _a.#parseAST(pattern, ast, 0, options, 0);
3387
+ const ast = new _AST(null, void 0, options);
3388
+ _AST.#parseAST(pattern, ast, 0, options);
3512
3389
  return ast;
3513
3390
  }
3514
3391
  // returns the regular expression if there's magic, or the unescaped
@@ -3602,14 +3479,12 @@ var init_ast = __esm({
3602
3479
  // or start or whatever) and prepend ^ or / at the Regexp construction.
3603
3480
  toRegExpSource(allowDot) {
3604
3481
  const dot = allowDot ?? !!this.#options.dot;
3605
- if (this.#root === this) {
3606
- this.#flatten();
3482
+ if (this.#root === this)
3607
3483
  this.#fillNegs();
3608
- }
3609
- if (!isExtglobAST(this)) {
3484
+ if (!this.type) {
3610
3485
  const noEmpty = this.isStart() && this.isEnd();
3611
3486
  const src = this.#parts.map((p) => {
3612
- const [re, _, hasMagic2, uflag] = typeof p === "string" ? _a.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot);
3487
+ const [re, _, hasMagic2, uflag] = typeof p === "string" ? _AST.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot);
3613
3488
  this.#hasMagic = this.#hasMagic || hasMagic2;
3614
3489
  this.#uflag = this.#uflag || uflag;
3615
3490
  return re;
@@ -3648,10 +3523,9 @@ var init_ast = __esm({
3648
3523
  let body = this.#partsToRegExp(dot);
3649
3524
  if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
3650
3525
  const s = this.toString();
3651
- const me = this;
3652
- me.#parts = [s];
3653
- me.type = null;
3654
- me.#hasMagic = void 0;
3526
+ this.#parts = [s];
3527
+ this.type = null;
3528
+ this.#hasMagic = void 0;
3655
3529
  return [s, unescape2(this.toString()), false, false];
3656
3530
  }
3657
3531
  let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? "" : this.#partsToRegExp(true);
@@ -3692,13 +3566,11 @@ var init_ast = __esm({
3692
3566
  let escaping = false;
3693
3567
  let re = "";
3694
3568
  let uflag = false;
3695
- let inStar = false;
3696
3569
  for (let i = 0; i < glob2.length; i++) {
3697
3570
  const c = glob2.charAt(i);
3698
3571
  if (escaping) {
3699
3572
  escaping = false;
3700
3573
  re += (reSpecials.has(c) ? "\\" : "") + c;
3701
- inStar = false;
3702
3574
  continue;
3703
3575
  }
3704
3576
  if (c === "\\") {
@@ -3716,19 +3588,16 @@ var init_ast = __esm({
3716
3588
  uflag = uflag || needUflag;
3717
3589
  i += consumed - 1;
3718
3590
  hasMagic2 = hasMagic2 || magic;
3719
- inStar = false;
3720
3591
  continue;
3721
3592
  }
3722
3593
  }
3723
3594
  if (c === "*") {
3724
- if (inStar)
3725
- continue;
3726
- inStar = true;
3727
- re += noEmpty && /^[*]+$/.test(glob2) ? starNoEmpty : star;
3595
+ if (noEmpty && glob2 === "*")
3596
+ re += starNoEmpty;
3597
+ else
3598
+ re += star;
3728
3599
  hasMagic2 = true;
3729
3600
  continue;
3730
- } else {
3731
- inStar = false;
3732
3601
  }
3733
3602
  if (c === "?") {
3734
3603
  re += qmark;
@@ -3740,7 +3609,6 @@ var init_ast = __esm({
3740
3609
  return [re, unescape2(glob2), !!hasMagic2, uflag];
3741
3610
  }
3742
3611
  };
3743
- _a = AST;
3744
3612
  }
3745
3613
  });
3746
3614
 
@@ -3914,13 +3782,11 @@ var init_esm = __esm({
3914
3782
  isWindows;
3915
3783
  platform;
3916
3784
  windowsNoMagicRoot;
3917
- maxGlobstarRecursion;
3918
3785
  regexp;
3919
3786
  constructor(pattern, options = {}) {
3920
3787
  assertValidPattern(pattern);
3921
3788
  options = options || {};
3922
3789
  this.options = options;
3923
- this.maxGlobstarRecursion = options.maxGlobstarRecursion ?? 200;
3924
3790
  this.pattern = pattern;
3925
3791
  this.platform = options.platform || defaultPlatform;
3926
3792
  this.isWindows = this.platform === "win32";
@@ -4253,8 +4119,7 @@ var init_esm = __esm({
4253
4119
  // out of pattern, then that's fine, as long as all
4254
4120
  // the parts match.
4255
4121
  matchOne(file, pattern, partial2 = false) {
4256
- let fileStartIndex = 0;
4257
- let patternStartIndex = 0;
4122
+ const options = this.options;
4258
4123
  if (this.isWindows) {
4259
4124
  const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
4260
4125
  const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
@@ -4263,14 +4128,14 @@ var init_esm = __esm({
4263
4128
  const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
4264
4129
  const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
4265
4130
  if (typeof fdi === "number" && typeof pdi === "number") {
4266
- const [fd, pd] = [
4267
- file[fdi],
4268
- pattern[pdi]
4269
- ];
4131
+ const [fd, pd] = [file[fdi], pattern[pdi]];
4270
4132
  if (fd.toLowerCase() === pd.toLowerCase()) {
4271
4133
  pattern[pdi] = fd;
4272
- patternStartIndex = pdi;
4273
- fileStartIndex = fdi;
4134
+ if (pdi > fdi) {
4135
+ pattern = pattern.slice(pdi);
4136
+ } else if (fdi > pdi) {
4137
+ file = file.slice(fdi);
4138
+ }
4274
4139
  }
4275
4140
  }
4276
4141
  }
@@ -4278,118 +4143,51 @@ var init_esm = __esm({
4278
4143
  if (optimizationLevel >= 2) {
4279
4144
  file = this.levelTwoFileOptimize(file);
4280
4145
  }
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))
4301
- return false;
4302
- fileIndex += head2.length;
4303
- }
4304
- let fileTailMatch = 0;
4305
- if (tail.length) {
4306
- if (tail.length + fileIndex > file.length)
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) {
4307
4154
  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;
4314
- }
4315
- tailStart--;
4316
- if (!this.#matchOne(file, tail, partial2, tailStart, 0))
4317
- return false;
4318
- fileTailMatch = tail.length + 1;
4319
4155
  }
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;
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;
4328
4167
  }
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;
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
+ }
4182
+ }
4183
+ if (partial2) {
4184
+ this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
4185
+ if (fr === fl) {
4186
+ return true;
4187
+ }
4361
4188
  }
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(".")) {
4375
4189
  return false;
4376
4190
  }
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;
4393
4191
  let hit;
4394
4192
  if (typeof p === "string") {
4395
4193
  hit = f === p;
@@ -9671,7 +9469,7 @@ var VERSION;
9671
9469
  var init_generated_version = __esm({
9672
9470
  "src/generated-version.ts"() {
9673
9471
  "use strict";
9674
- VERSION = "0.21.4";
9472
+ VERSION = "0.21.5";
9675
9473
  }
9676
9474
  });
9677
9475
 
@@ -15103,7 +14901,7 @@ is not a problem with esbuild. You need to fix your environment instead.
15103
14901
  if (keepNames) flags.push(`--keep-names`);
15104
14902
  }
15105
14903
  function flagsForBuildOptions(callName, options, isTTY22, logLevelDefault, writeDefault) {
15106
- var _a22;
14904
+ var _a2;
15107
14905
  let flags = [];
15108
14906
  let entries = [];
15109
14907
  let keys2 = /* @__PURE__ */ Object.create(null);
@@ -15139,7 +14937,7 @@ is not a problem with esbuild. You need to fix your environment instead.
15139
14937
  let entryPoints = getFlag(options, keys2, "entryPoints", mustBeEntryPoints);
15140
14938
  let absWorkingDir = getFlag(options, keys2, "absWorkingDir", mustBeString);
15141
14939
  let stdin = getFlag(options, keys2, "stdin", mustBeObject);
15142
- let write = (_a22 = getFlag(options, keys2, "write", mustBeBoolean)) != null ? _a22 : writeDefault;
14940
+ let write = (_a2 = getFlag(options, keys2, "write", mustBeBoolean)) != null ? _a2 : writeDefault;
15143
14941
  let allowOverwrite = getFlag(options, keys2, "allowOverwrite", mustBeBoolean);
15144
14942
  let mangleCache = getFlag(options, keys2, "mangleCache", mustBeObject);
15145
14943
  keys2.plugins = true;
@@ -16515,8 +16313,8 @@ for your current platform.`);
16515
16313
  worker_threads = void 0;
16516
16314
  }
16517
16315
  }
16518
- var _a2;
16519
- var isInternalWorkerThread = ((_a2 = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a2.esbuildVersion) === "0.27.3";
16316
+ var _a;
16317
+ var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.27.3";
16520
16318
  var esbuildCommandAndArgs = () => {
16521
16319
  if ((!ESBUILD_BINARY_PATH || false) && (path210.basename(__filename) !== "main.js" || path210.basename(__dirname) !== "lib")) {
16522
16320
  throw new Error(
@@ -29400,8 +29198,8 @@ var init_llk_lookahead = __esm({
29400
29198
  init_lookahead();
29401
29199
  LLkLookaheadStrategy = class {
29402
29200
  constructor(options) {
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;
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;
29405
29203
  }
29406
29204
  validate(options) {
29407
29205
  const leftRecursionErrors = this.validateNoLeftRecursion(options.rules);
@@ -31270,8 +31068,8 @@ var init_parser = __esm({
31270
31068
  });
31271
31069
  }
31272
31070
  this.TRACE_INIT("ComputeLookaheadFunctions", () => {
31273
- var _a2, _b;
31274
- (_b = (_a2 = this.lookaheadStrategy).initialize) === null || _b === void 0 ? void 0 : _b.call(_a2, {
31071
+ var _a, _b;
31072
+ (_b = (_a = this.lookaheadStrategy).initialize) === null || _b === void 0 ? void 0 : _b.call(_a, {
31275
31073
  rules: values_default(this.gastProductionsCache)
31276
31074
  });
31277
31075
  this.preComputeLookaheadFunctions(values_default(this.gastProductionsCache));
@@ -35316,6 +35114,8 @@ async function listInstalledPackages(projectDir) {
35316
35114
  const nodeModules = path5.join(projectDir, "node_modules");
35317
35115
  if (!fs5.existsSync(nodeModules)) return [];
35318
35116
  const patterns = [
35117
+ path5.join(nodeModules, "flowweaver-pack-*", "flowweaver.manifest.json"),
35118
+ path5.join(nodeModules, "@*", "flowweaver-pack-*", "flowweaver.manifest.json"),
35319
35119
  path5.join(nodeModules, "flow-weaver-pack-*", "flowweaver.manifest.json"),
35320
35120
  path5.join(nodeModules, "@*", "flow-weaver-pack-*", "flowweaver.manifest.json")
35321
35121
  ];
@@ -35424,7 +35224,7 @@ var init_registry = __esm({
35424
35224
  init_esm5();
35425
35225
  MARKETPLACE_KEYWORD = "flowweaver-marketplace-pack";
35426
35226
  NPM_SEARCH_URL = "https://registry.npmjs.org/-/v1/search";
35427
- PACK_NAME_RE = /^(@[^/]+\/)?flow-weaver-pack-.+$/;
35227
+ PACK_NAME_RE = /^(@[^/]+\/)?(flowweaver|flow-weaver)-pack-.+$/;
35428
35228
  }
35429
35229
  });
35430
35230
 
@@ -61186,12 +60986,12 @@ var require_code = __commonJS({
61186
60986
  return item === "" || item === '""';
61187
60987
  }
61188
60988
  get str() {
61189
- var _a2;
61190
- return (_a2 = this._str) !== null && _a2 !== void 0 ? _a2 : this._str = this._items.reduce((s, c) => `${s}${c}`, "");
60989
+ var _a;
60990
+ return (_a = this._str) !== null && _a !== void 0 ? _a : this._str = this._items.reduce((s, c) => `${s}${c}`, "");
61191
60991
  }
61192
60992
  get names() {
61193
- var _a2;
61194
- return (_a2 = this._names) !== null && _a2 !== void 0 ? _a2 : this._names = this._items.reduce((names, c) => {
60993
+ var _a;
60994
+ return (_a = this._names) !== null && _a !== void 0 ? _a : this._names = this._items.reduce((names, c) => {
61195
60995
  if (c instanceof Name)
61196
60996
  names[c.str] = (names[c.str] || 0) + 1;
61197
60997
  return names;
@@ -61337,8 +61137,8 @@ var require_scope = __commonJS({
61337
61137
  return `${prefix}${ng.index++}`;
61338
61138
  }
61339
61139
  _nameGroup(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
+ var _a, _b;
61141
+ 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)) {
61342
61142
  throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`);
61343
61143
  }
61344
61144
  return this._names[prefix] = { prefix, index: 0 };
@@ -61371,12 +61171,12 @@ var require_scope = __commonJS({
61371
61171
  return new ValueScopeName(prefix, this._newName(prefix));
61372
61172
  }
61373
61173
  value(nameOrPrefix, value) {
61374
- var _a2;
61174
+ var _a;
61375
61175
  if (value.ref === void 0)
61376
61176
  throw new Error("CodeGen: ref must be passed in value");
61377
61177
  const name = this.toName(nameOrPrefix);
61378
61178
  const { prefix } = name;
61379
- const valueKey = (_a2 = value.key) !== null && _a2 !== void 0 ? _a2 : value.ref;
61179
+ const valueKey = (_a = value.key) !== null && _a !== void 0 ? _a : value.ref;
61380
61180
  let vs = this._values[prefix];
61381
61181
  if (vs) {
61382
61182
  const _name = vs.get(valueKey);
@@ -61694,8 +61494,8 @@ var require_codegen = __commonJS({
61694
61494
  return this;
61695
61495
  }
61696
61496
  optimizeNames(names, constants) {
61697
- var _a2;
61698
- this.else = (_a2 = this.else) === null || _a2 === void 0 ? void 0 : _a2.optimizeNames(names, constants);
61497
+ var _a;
61498
+ this.else = (_a = this.else) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants);
61699
61499
  if (!(super.optimizeNames(names, constants) || this.else))
61700
61500
  return;
61701
61501
  this.condition = optimizeExpr(this.condition, names, constants);
@@ -61799,16 +61599,16 @@ var require_codegen = __commonJS({
61799
61599
  return code;
61800
61600
  }
61801
61601
  optimizeNodes() {
61802
- var _a2, _b;
61602
+ var _a, _b;
61803
61603
  super.optimizeNodes();
61804
- (_a2 = this.catch) === null || _a2 === void 0 ? void 0 : _a2.optimizeNodes();
61604
+ (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNodes();
61805
61605
  (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNodes();
61806
61606
  return this;
61807
61607
  }
61808
61608
  optimizeNames(names, constants) {
61809
- var _a2, _b;
61609
+ var _a, _b;
61810
61610
  super.optimizeNames(names, constants);
61811
- (_a2 = this.catch) === null || _a2 === void 0 ? void 0 : _a2.optimizeNames(names, constants);
61611
+ (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants);
61812
61612
  (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names, constants);
61813
61613
  return this;
61814
61614
  }
@@ -62588,8 +62388,8 @@ var require_applicability = __commonJS({
62588
62388
  }
62589
62389
  exports2.shouldUseGroup = shouldUseGroup;
62590
62390
  function shouldUseRule(schema2, rule) {
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
+ var _a;
62392
+ return schema2[rule.keyword] !== void 0 || ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema2[kwd] !== void 0));
62593
62393
  }
62594
62394
  exports2.shouldUseRule = shouldUseRule;
62595
62395
  }
@@ -62977,14 +62777,14 @@ var require_keyword = __commonJS({
62977
62777
  }
62978
62778
  exports2.macroKeywordCode = macroKeywordCode;
62979
62779
  function funcKeywordCode(cxt, def) {
62980
- var _a2;
62780
+ var _a;
62981
62781
  const { gen, keyword, schema: schema2, parentSchema, $data, it } = cxt;
62982
62782
  checkAsyncKeyword(it, def);
62983
62783
  const validate = !$data && def.compile ? def.compile.call(it.self, schema2, parentSchema, it) : def.validate;
62984
62784
  const validateRef = useKeyword(gen, keyword, validate);
62985
62785
  const valid = gen.let("valid");
62986
62786
  cxt.block$data(valid, validateKeyword);
62987
- cxt.ok((_a2 = def.valid) !== null && _a2 !== void 0 ? _a2 : valid);
62787
+ cxt.ok((_a = def.valid) !== null && _a !== void 0 ? _a : valid);
62988
62788
  function validateKeyword() {
62989
62789
  if (def.errors === false) {
62990
62790
  assignValid();
@@ -63015,8 +62815,8 @@ var require_keyword = __commonJS({
63015
62815
  gen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);
63016
62816
  }
63017
62817
  function reportErrs(errors2) {
63018
- var _a3;
63019
- gen.if((0, codegen_1.not)((_a3 = def.valid) !== null && _a3 !== void 0 ? _a3 : valid), errors2);
62818
+ var _a2;
62819
+ gen.if((0, codegen_1.not)((_a2 = def.valid) !== null && _a2 !== void 0 ? _a2 : valid), errors2);
63020
62820
  }
63021
62821
  }
63022
62822
  exports2.funcKeywordCode = funcKeywordCode;
@@ -63984,7 +63784,7 @@ var require_compile = __commonJS({
63984
63784
  var validate_1 = require_validate();
63985
63785
  var SchemaEnv = class {
63986
63786
  constructor(env) {
63987
- var _a2;
63787
+ var _a;
63988
63788
  this.refs = {};
63989
63789
  this.dynamicAnchors = {};
63990
63790
  let schema2;
@@ -63993,7 +63793,7 @@ var require_compile = __commonJS({
63993
63793
  this.schema = env.schema;
63994
63794
  this.schemaId = env.schemaId;
63995
63795
  this.root = env.root || this;
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"]);
63796
+ 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"]);
63997
63797
  this.schemaPath = env.schemaPath;
63998
63798
  this.localRefs = env.localRefs;
63999
63799
  this.meta = env.meta;
@@ -64089,14 +63889,14 @@ var require_compile = __commonJS({
64089
63889
  }
64090
63890
  exports2.compileSchema = compileSchema;
64091
63891
  function resolveRef(root2, baseId, ref) {
64092
- var _a2;
63892
+ var _a;
64093
63893
  ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref);
64094
63894
  const schOrFunc = root2.refs[ref];
64095
63895
  if (schOrFunc)
64096
63896
  return schOrFunc;
64097
63897
  let _sch = resolve35.call(this, root2, ref);
64098
63898
  if (_sch === void 0) {
64099
- const schema2 = (_a2 = root2.localRefs) === null || _a2 === void 0 ? void 0 : _a2[ref];
63899
+ const schema2 = (_a = root2.localRefs) === null || _a === void 0 ? void 0 : _a[ref];
64100
63900
  const { schemaId } = this.opts;
64101
63901
  if (schema2)
64102
63902
  _sch = new SchemaEnv({ schema: schema2, schemaId, root: root2, baseId });
@@ -64165,8 +63965,8 @@ var require_compile = __commonJS({
64165
63965
  "definitions"
64166
63966
  ]);
64167
63967
  function getJsonPointer(parsedRef, { baseId, schema: schema2, root: root2 }) {
64168
- var _a2;
64169
- if (((_a2 = parsedRef.fragment) === null || _a2 === void 0 ? void 0 : _a2[0]) !== "/")
63968
+ var _a;
63969
+ if (((_a = parsedRef.fragment) === null || _a === void 0 ? void 0 : _a[0]) !== "/")
64170
63970
  return;
64171
63971
  for (const part of parsedRef.fragment.slice(1).split("/")) {
64172
63972
  if (typeof schema2 === "boolean")
@@ -65027,9 +64827,9 @@ var require_core = __commonJS({
65027
64827
  };
65028
64828
  var MAX_EXPRESSION = 200;
65029
64829
  function requiredOptions(o) {
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;
64830
+ 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;
65031
64831
  const s = o.strict;
65032
- const _optz = (_a2 = o.code) === null || _a2 === void 0 ? void 0 : _a2.optimize;
64832
+ const _optz = (_a = o.code) === null || _a === void 0 ? void 0 : _a.optimize;
65033
64833
  const optimize = _optz === true || _optz === void 0 ? 1 : _optz || 0;
65034
64834
  const regExp = (_c = (_b = o.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp;
65035
64835
  const uriResolver = (_d = o.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default;
@@ -65503,7 +65303,7 @@ var require_core = __commonJS({
65503
65303
  }
65504
65304
  }
65505
65305
  function addRule(keyword, definition, dataType) {
65506
- var _a2;
65306
+ var _a;
65507
65307
  const post = definition === null || definition === void 0 ? void 0 : definition.post;
65508
65308
  if (dataType && post)
65509
65309
  throw new Error('keyword with "post" flag cannot have "type"');
@@ -65529,7 +65329,7 @@ var require_core = __commonJS({
65529
65329
  else
65530
65330
  ruleGroup.rules.push(rule);
65531
65331
  RULES.all[keyword] = rule;
65532
- (_a2 = definition.implements) === null || _a2 === void 0 ? void 0 : _a2.forEach((kwd) => this.addKeyword(kwd));
65332
+ (_a = definition.implements) === null || _a === void 0 ? void 0 : _a.forEach((kwd) => this.addKeyword(kwd));
65533
65333
  }
65534
65334
  function addBeforeRule(ruleGroup, rule, before) {
65535
65335
  const i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before);
@@ -65663,10 +65463,10 @@ var require_ref = __commonJS({
65663
65463
  gen.assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`);
65664
65464
  }
65665
65465
  function addEvaluatedFrom(source) {
65666
- var _a2;
65466
+ var _a;
65667
65467
  if (!it.opts.unevaluated)
65668
65468
  return;
65669
- const schEvaluated = (_a2 = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a2 === void 0 ? void 0 : _a2.evaluated;
65469
+ const schEvaluated = (_a = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a === void 0 ? void 0 : _a.evaluated;
65670
65470
  if (it.props !== true) {
65671
65471
  if (schEvaluated && !schEvaluated.dynamicProps) {
65672
65472
  if (schEvaluated.props !== void 0) {
@@ -67317,7 +67117,7 @@ var require_discriminator = __commonJS({
67317
67117
  return _valid;
67318
67118
  }
67319
67119
  function getMapping() {
67320
- var _a2;
67120
+ var _a;
67321
67121
  const oneOfMapping = {};
67322
67122
  const topRequired = hasRequired(parentSchema);
67323
67123
  let tagRequired = true;
@@ -67331,7 +67131,7 @@ var require_discriminator = __commonJS({
67331
67131
  if (sch === void 0)
67332
67132
  throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref);
67333
67133
  }
67334
- const propSch = (_a2 = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a2 === void 0 ? void 0 : _a2[tagName];
67134
+ const propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName];
67335
67135
  if (typeof propSch != "object") {
67336
67136
  throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`);
67337
67137
  }
@@ -67900,9 +67700,9 @@ var require_dist = __commonJS({
67900
67700
  return f;
67901
67701
  };
67902
67702
  function addFormats(ajv, list, fs47, exportName) {
67903
- var _a2;
67703
+ var _a;
67904
67704
  var _b;
67905
- (_a2 = (_b = ajv.opts.code).formats) !== null && _a2 !== void 0 ? _a2 : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
67705
+ (_a = (_b = ajv.opts.code).formats) !== null && _a !== void 0 ? _a : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
67906
67706
  for (const f of list)
67907
67707
  ajv.addFormat(f, fs47[f]);
67908
67708
  }
@@ -70106,7 +69906,7 @@ function checkPackEngineVersion2(pkg) {
70106
69906
  }
70107
69907
  function deriveNamespace(packageName) {
70108
69908
  const base = packageName.replace(/^@[^/]+\//, "");
70109
- return base.replace(/^flow-weaver-pack-/, "");
69909
+ return base.replace(/^(flowweaver|flow-weaver)-pack-/, "");
70110
69910
  }
70111
69911
  async function registerPackCommands(program3) {
70112
69912
  const projectDir = process.cwd();
@@ -76699,12 +76499,12 @@ var NEVER2 = Object.freeze({
76699
76499
  // @__NO_SIDE_EFFECTS__
76700
76500
  function $constructor(name, initializer3, params) {
76701
76501
  function init(inst, def) {
76702
- var _a2;
76502
+ var _a;
76703
76503
  Object.defineProperty(inst, "_zod", {
76704
76504
  value: inst._zod ?? {},
76705
76505
  enumerable: false
76706
76506
  });
76707
- (_a2 = inst._zod).traits ?? (_a2.traits = /* @__PURE__ */ new Set());
76507
+ (_a = inst._zod).traits ?? (_a.traits = /* @__PURE__ */ new Set());
76708
76508
  inst._zod.traits.add(name);
76709
76509
  initializer3(inst, def);
76710
76510
  for (const k in _.prototype) {
@@ -76719,10 +76519,10 @@ function $constructor(name, initializer3, params) {
76719
76519
  }
76720
76520
  Object.defineProperty(Definition, "name", { value: name });
76721
76521
  function _(def) {
76722
- var _a2;
76522
+ var _a;
76723
76523
  const inst = params?.Parent ? new Definition() : this;
76724
76524
  init(inst, def);
76725
- (_a2 = inst._zod).deferred ?? (_a2.deferred = []);
76525
+ (_a = inst._zod).deferred ?? (_a.deferred = []);
76726
76526
  for (const fn of inst._zod.deferred) {
76727
76527
  fn();
76728
76528
  }
@@ -77212,8 +77012,8 @@ function aborted(x, startIndex = 0) {
77212
77012
  }
77213
77013
  function prefixIssues(path50, issues) {
77214
77014
  return issues.map((iss) => {
77215
- var _a2;
77216
- (_a2 = iss).path ?? (_a2.path = []);
77015
+ var _a;
77016
+ (_a = iss).path ?? (_a.path = []);
77217
77017
  iss.path.unshift(path50);
77218
77018
  return iss;
77219
77019
  });
@@ -77459,10 +77259,10 @@ var uppercase = /^[^a-z]*$/;
77459
77259
 
77460
77260
  // node_modules/zod/v4/core/checks.js
77461
77261
  var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
77462
- var _a2;
77262
+ var _a;
77463
77263
  inst._zod ?? (inst._zod = {});
77464
77264
  inst._zod.def = def;
77465
- (_a2 = inst._zod).onattach ?? (_a2.onattach = []);
77265
+ (_a = inst._zod).onattach ?? (_a.onattach = []);
77466
77266
  });
77467
77267
  var numericOriginMap = {
77468
77268
  number: "number",
@@ -77528,8 +77328,8 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
77528
77328
  var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
77529
77329
  $ZodCheck.init(inst, def);
77530
77330
  inst._zod.onattach.push((inst2) => {
77531
- var _a2;
77532
- (_a2 = inst2._zod.bag).multipleOf ?? (_a2.multipleOf = def.value);
77331
+ var _a;
77332
+ (_a = inst2._zod.bag).multipleOf ?? (_a.multipleOf = def.value);
77533
77333
  });
77534
77334
  inst._zod.check = (payload) => {
77535
77335
  if (typeof payload.value !== typeof def.value)
@@ -77622,9 +77422,9 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
77622
77422
  };
77623
77423
  });
77624
77424
  var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
77625
- var _a2;
77425
+ var _a;
77626
77426
  $ZodCheck.init(inst, def);
77627
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
77427
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
77628
77428
  const val = payload.value;
77629
77429
  return !nullish(val) && val.length !== void 0;
77630
77430
  });
@@ -77651,9 +77451,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
77651
77451
  };
77652
77452
  });
77653
77453
  var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
77654
- var _a2;
77454
+ var _a;
77655
77455
  $ZodCheck.init(inst, def);
77656
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
77456
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
77657
77457
  const val = payload.value;
77658
77458
  return !nullish(val) && val.length !== void 0;
77659
77459
  });
@@ -77680,9 +77480,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
77680
77480
  };
77681
77481
  });
77682
77482
  var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
77683
- var _a2;
77483
+ var _a;
77684
77484
  $ZodCheck.init(inst, def);
77685
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
77485
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
77686
77486
  const val = payload.value;
77687
77487
  return !nullish(val) && val.length !== void 0;
77688
77488
  });
@@ -77711,7 +77511,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
77711
77511
  };
77712
77512
  });
77713
77513
  var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
77714
- var _a2, _b;
77514
+ var _a, _b;
77715
77515
  $ZodCheck.init(inst, def);
77716
77516
  inst._zod.onattach.push((inst2) => {
77717
77517
  const bag = inst2._zod.bag;
@@ -77722,7 +77522,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
77722
77522
  }
77723
77523
  });
77724
77524
  if (def.pattern)
77725
- (_a2 = inst._zod).check ?? (_a2.check = (payload) => {
77525
+ (_a = inst._zod).check ?? (_a.check = (payload) => {
77726
77526
  def.pattern.lastIndex = 0;
77727
77527
  if (def.pattern.test(payload.value))
77728
77528
  return;
@@ -77887,7 +77687,7 @@ var version = {
77887
77687
 
77888
77688
  // node_modules/zod/v4/core/schemas.js
77889
77689
  var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
77890
- var _a2;
77690
+ var _a;
77891
77691
  inst ?? (inst = {});
77892
77692
  inst._zod.def = def;
77893
77693
  inst._zod.bag = inst._zod.bag || {};
@@ -77902,7 +77702,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
77902
77702
  }
77903
77703
  }
77904
77704
  if (checks.length === 0) {
77905
- (_a2 = inst._zod).deferred ?? (_a2.deferred = []);
77705
+ (_a = inst._zod).deferred ?? (_a.deferred = []);
77906
77706
  inst._zod.deferred?.push(() => {
77907
77707
  inst._zod.run = inst._zod.parse;
77908
77708
  });
@@ -79741,7 +79541,7 @@ var JSONSchemaGenerator = class {
79741
79541
  this.seen = /* @__PURE__ */ new Map();
79742
79542
  }
79743
79543
  process(schema2, _params = { path: [], schemaPath: [] }) {
79744
- var _a2;
79544
+ var _a;
79745
79545
  const def = schema2._zod.def;
79746
79546
  const formatMap = {
79747
79547
  guid: "uuid",
@@ -80203,7 +80003,7 @@ var JSONSchemaGenerator = class {
80203
80003
  delete result.schema.default;
80204
80004
  }
80205
80005
  if (this.io === "input" && result.schema._prefault)
80206
- (_a2 = result.schema).default ?? (_a2.default = result.schema._prefault);
80006
+ (_a = result.schema).default ?? (_a.default = result.schema._prefault);
80207
80007
  delete result.schema._prefault;
80208
80008
  const _result = this.seen.get(schema2);
80209
80009
  return _result.schema;
@@ -88342,7 +88142,7 @@ import * as path32 from "path";
88342
88142
  function issue2(code, severity, message) {
88343
88143
  return { code, severity, message };
88344
88144
  }
88345
- var PACK_NAME_RE2 = /^(@[^/]+\/)?flow-weaver-pack-.+$/;
88145
+ var PACK_NAME_RE2 = /^(@[^/]+\/)?(flowweaver|flow-weaver)-pack-.+$/;
88346
88146
  var MARKETPLACE_KEYWORD2 = "flowweaver-marketplace-pack";
88347
88147
  function validatePackageJson(pkg, directory) {
88348
88148
  const issues = [];
@@ -92836,7 +92636,7 @@ function displayInstalledPackage(pkg) {
92836
92636
  // src/cli/index.ts
92837
92637
  init_logger();
92838
92638
  init_error_utils();
92839
- var version2 = true ? "0.21.4" : "0.0.0-dev";
92639
+ var version2 = true ? "0.21.5" : "0.0.0-dev";
92840
92640
  var program2 = new Command();
92841
92641
  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", () => {
92842
92642
  logger.banner(version2);
@@ -39,7 +39,7 @@ function checkPackEngineVersion(pkg) {
39
39
  */
40
40
  function deriveNamespace(packageName) {
41
41
  const base = packageName.replace(/^@[^/]+\//, '');
42
- return base.replace(/^flow-weaver-pack-/, '');
42
+ return base.replace(/^(flowweaver|flow-weaver)-pack-/, '');
43
43
  }
44
44
  export async function registerPackCommands(program) {
45
45
  const projectDir = process.cwd();
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.21.4";
1
+ export declare const VERSION = "0.21.5";
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.4';
2
+ export const VERSION = '0.21.5';
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 = /^(@[^/]+\/)?flow-weaver-pack-.+$/;
13
+ const PACK_NAME_RE = /^(@[^/]+\/)?(flowweaver|flow-weaver)-pack-.+$/;
14
14
  /**
15
15
  * Search the npm registry for marketplace packages.
16
16
  */
@@ -49,8 +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 flow-weaver-pack-* and @*/flow-weaver-pack-* directories
52
+ // Look for both flowweaver-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
56
  path.join(nodeModules, 'flow-weaver-pack-*', 'flowweaver.manifest.json'),
55
57
  path.join(nodeModules, '@*', 'flow-weaver-pack-*', 'flowweaver.manifest.json'),
56
58
  ];
@@ -9,7 +9,7 @@ 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 = /^(@[^/]+\/)?flow-weaver-pack-.+$/;
12
+ const PACK_NAME_RE = /^(@[^/]+\/)?(flowweaver|flow-weaver)-pack-.+$/;
13
13
  const MARKETPLACE_KEYWORD = 'flowweaver-marketplace-pack';
14
14
  // ── Package-level rules ──────────────────────────────────────────────────────
15
15
  function validatePackageJson(pkg, directory) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synergenius/flow-weaver",
3
- "version": "0.21.4",
3
+ "version": "0.21.5",
4
4
  "description": "Deterministic workflow compiler for AI agents. Compiles to standalone TypeScript, no runtime dependencies.",
5
5
  "private": false,
6
6
  "type": "module",