@swarm.ing/pieui 2.0.33 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/agent/index.d.ts +12 -0
  2. package/dist/agent/index.d.ts.map +1 -0
  3. package/dist/agent/index.esm.js +2 -0
  4. package/dist/agent/index.js +2 -0
  5. package/dist/cli.js +358 -95
  6. package/dist/code/args.d.ts +1 -1
  7. package/dist/code/args.d.ts.map +1 -1
  8. package/dist/code/commands/createPieApp.d.ts.map +1 -1
  9. package/dist/code/commands/registry.d.ts +8 -0
  10. package/dist/code/commands/registry.d.ts.map +1 -0
  11. package/dist/code/types.d.ts +5 -0
  12. package/dist/code/types.d.ts.map +1 -1
  13. package/dist/components/Common/AutoRedirectCard/ui/AutoRedirectCard.d.ts +1 -1
  14. package/dist/components/Common/AutoRedirectCard/ui/AutoRedirectCard.d.ts.map +1 -1
  15. package/dist/components/Common/CloudStorageCard/ui/CloudStorageCard.d.ts +1 -1
  16. package/dist/components/Common/CloudStorageCard/ui/CloudStorageCard.d.ts.map +1 -1
  17. package/dist/components/Common/DeviceStorageCard/ui/DeviceStorageCard.d.ts +1 -1
  18. package/dist/components/Common/DeviceStorageCard/ui/DeviceStorageCard.d.ts.map +1 -1
  19. package/dist/components/Common/HTMLEmbedCard/ui/HTMLEmbedCard.d.ts +1 -1
  20. package/dist/components/Common/HTMLEmbedCard/ui/HTMLEmbedCard.d.ts.map +1 -1
  21. package/dist/components/Common/HiddenCard/ui/HiddenCard.d.ts +1 -1
  22. package/dist/components/Common/HiddenCard/ui/HiddenCard.d.ts.map +1 -1
  23. package/dist/components/Common/IOEventsCard/ui/IOEventsCard.d.ts +1 -1
  24. package/dist/components/Common/IOEventsCard/ui/IOEventsCard.d.ts.map +1 -1
  25. package/dist/components/Common/SecureStorageCard/ui/SecureStorageCard.d.ts +1 -1
  26. package/dist/components/Common/SecureStorageCard/ui/SecureStorageCard.d.ts.map +1 -1
  27. package/dist/components/Common/SessionStorageCard/ui/SessionStorageCard.d.ts +1 -1
  28. package/dist/components/Common/SessionStorageCard/ui/SessionStorageCard.d.ts.map +1 -1
  29. package/dist/components/Containers/AjaxGroupCard/ui/AjaxGroupCard.d.ts +1 -1
  30. package/dist/components/Containers/AjaxGroupCard/ui/AjaxGroupCard.d.ts.map +1 -1
  31. package/dist/components/Containers/BoxCard/ui/BoxCard.d.ts +1 -1
  32. package/dist/components/Containers/BoxCard/ui/BoxCard.d.ts.map +1 -1
  33. package/dist/components/Containers/OneOfCard/ui/OneOfCard.d.ts +1 -1
  34. package/dist/components/Containers/OneOfCard/ui/OneOfCard.d.ts.map +1 -1
  35. package/dist/components/Containers/SequenceCard/ui/SequenceCard.d.ts +1 -1
  36. package/dist/components/Containers/SequenceCard/ui/SequenceCard.d.ts.map +1 -1
  37. package/dist/components/Containers/UnionCard/ui/UnionCard.d.ts +1 -1
  38. package/dist/components/Containers/UnionCard/ui/UnionCard.d.ts.map +1 -1
  39. package/dist/components/LazyBoundary/index.d.ts +43 -0
  40. package/dist/components/LazyBoundary/index.d.ts.map +1 -0
  41. package/dist/components/PieBaseRoot/index.d.ts +1 -1
  42. package/dist/components/PieBaseRoot/index.d.ts.map +1 -1
  43. package/dist/components/PieCard/index.d.ts +1 -1
  44. package/dist/components/PieCard/index.d.ts.map +1 -1
  45. package/dist/components/PieMaxRoot/index.d.ts.map +1 -1
  46. package/dist/components/PiePreviewRoot/index.d.ts +37 -0
  47. package/dist/components/PiePreviewRoot/index.d.ts.map +1 -0
  48. package/dist/components/PieRoot/index.d.ts +1 -1
  49. package/dist/components/PieRoot/index.d.ts.map +1 -1
  50. package/dist/components/PieRoot/types/index.d.ts +19 -3
  51. package/dist/components/PieRoot/types/index.d.ts.map +1 -1
  52. package/dist/components/PieTelegramRoot/index.d.ts.map +1 -1
  53. package/dist/components/UI/index.d.ts +1 -1
  54. package/dist/components/UI/index.d.ts.map +1 -1
  55. package/dist/components/UILoading/index.d.ts +1 -1
  56. package/dist/components/UILoading/index.d.ts.map +1 -1
  57. package/dist/components/index.esm.js +1 -1
  58. package/dist/components/index.js +1 -1
  59. package/dist/index.d.ts +4 -7
  60. package/dist/index.d.ts.map +1 -1
  61. package/dist/index.esm.js +2 -2
  62. package/dist/index.js +2 -2
  63. package/dist/max/index.d.ts +12 -0
  64. package/dist/max/index.d.ts.map +1 -0
  65. package/dist/max/index.esm.js +2 -0
  66. package/dist/max/index.js +2 -0
  67. package/dist/storybook/index.d.ts +3 -3
  68. package/dist/storybook/index.d.ts.map +1 -1
  69. package/dist/telegram/index.d.ts +12 -0
  70. package/dist/telegram/index.d.ts.map +1 -0
  71. package/dist/telegram/index.esm.js +2 -0
  72. package/dist/telegram/index.js +2 -0
  73. package/dist/util/lazy.d.ts.map +1 -1
  74. package/dist/util/lazyError.d.ts +9 -0
  75. package/dist/util/lazyError.d.ts.map +1 -0
  76. package/dist/util/registry.d.ts +28 -0
  77. package/dist/util/registry.d.ts.map +1 -1
  78. package/package.json +33 -11
package/dist/cli.js CHANGED
@@ -175416,6 +175416,7 @@ var require_acorn = __commonJS((exports2, module2) => {
175416
175416
  var defaultOptions = {
175417
175417
  ecmaVersion: null,
175418
175418
  sourceType: "script",
175419
+ strict: false,
175419
175420
  onInsertedSemicolon: null,
175420
175421
  onTrailingComma: null,
175421
175422
  allowReserved: null,
@@ -175529,7 +175530,7 @@ Defaulting to 2020, but this will stop working in the future.`);
175529
175530
  this.context = this.initialContext();
175530
175531
  this.exprAllowed = true;
175531
175532
  this.inModule = options.sourceType === "module";
175532
- this.strict = this.inModule || this.strictDirective(this.pos);
175533
+ this.strict = this.inModule || options.strict === true || this.strictDirective(this.pos);
175533
175534
  this.potentialArrowAt = -1;
175534
175535
  this.potentialArrowInForAwait = false;
175535
175536
  this.yieldPos = this.awaitPos = this.awaitIdentPos = 0;
@@ -175545,9 +175546,12 @@ Defaulting to 2020, but this will stop working in the future.`);
175545
175546
  };
175546
175547
  var prototypeAccessors = { inFunction: { configurable: true }, inGenerator: { configurable: true }, inAsync: { configurable: true }, canAwait: { configurable: true }, allowReturn: { configurable: true }, allowSuper: { configurable: true }, allowDirectSuper: { configurable: true }, treatFunctionsAsVar: { configurable: true }, allowNewDotTarget: { configurable: true }, allowUsing: { configurable: true }, inClassStaticBlock: { configurable: true } };
175547
175548
  Parser.prototype.parse = function parse2() {
175549
+ var this$1$1 = this;
175548
175550
  var node = this.options.program || this.startNode();
175549
175551
  this.nextToken();
175550
- return this.parseTopLevel(node);
175552
+ return this.catchStackOverflow(function() {
175553
+ return this$1$1.parseTopLevel(node);
175554
+ });
175551
175555
  };
175552
175556
  prototypeAccessors.inFunction.get = function() {
175553
175557
  return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0;
@@ -175682,6 +175686,17 @@ Defaulting to 2020, but this will stop working in the future.`);
175682
175686
  this.next();
175683
175687
  return true;
175684
175688
  };
175689
+ pp$9.catchStackOverflow = function(f) {
175690
+ try {
175691
+ return f();
175692
+ } catch (e) {
175693
+ if (e instanceof Error && (/\bstack\b.*\b(exceeded|overflow)\b/i.test(e.message) || /\btoo much recursion\b/i.test(e.message))) {
175694
+ this.raise(this.start, "Not enough stack space to parse input");
175695
+ } else {
175696
+ throw e;
175697
+ }
175698
+ }
175699
+ };
175685
175700
  pp$9.expectContextual = function(name) {
175686
175701
  if (!this.eatContextual(name)) {
175687
175702
  this.unexpected();
@@ -175767,12 +175782,12 @@ Defaulting to 2020, but this will stop working in the future.`);
175767
175782
  };
175768
175783
  var pp$8 = Parser.prototype;
175769
175784
  pp$8.parseTopLevel = function(node) {
175770
- var exports4 = Object.create(null);
175785
+ var exports$1 = Object.create(null);
175771
175786
  if (!node.body) {
175772
175787
  node.body = [];
175773
175788
  }
175774
175789
  while (this.type !== types$1.eof) {
175775
- var stmt = this.parseStatement(null, true, exports4);
175790
+ var stmt = this.parseStatement(null, true, exports$1);
175776
175791
  node.body.push(stmt);
175777
175792
  }
175778
175793
  if (this.inModule) {
@@ -175861,9 +175876,17 @@ Defaulting to 2020, but this will stop working in the future.`);
175861
175876
  return true;
175862
175877
  }
175863
175878
  var id = this.input.slice(idStart, next);
175864
- if (keywordRelationalOperator.test(id) || isFor && id === "of") {
175879
+ if (keywordRelationalOperator.test(id)) {
175865
175880
  return false;
175866
175881
  }
175882
+ if (isFor && !isAwaitUsing && id === "of") {
175883
+ skipWhiteSpace.lastIndex = next;
175884
+ var skipAfterOf = skipWhiteSpace.exec(this.input);
175885
+ next = next + skipAfterOf[0].length;
175886
+ if (this.input.charCodeAt(next) !== 61 || (ch = this.input.charCodeAt(next + 1)) === 61 || ch === 62) {
175887
+ return false;
175888
+ }
175889
+ }
175867
175890
  return true;
175868
175891
  };
175869
175892
  pp$8.isAwaitUsing = function(isFor) {
@@ -175872,7 +175895,7 @@ Defaulting to 2020, but this will stop working in the future.`);
175872
175895
  pp$8.isUsing = function(isFor) {
175873
175896
  return this.isUsingKeyword(false, isFor);
175874
175897
  };
175875
- pp$8.parseStatement = function(context, topLevel, exports4) {
175898
+ pp$8.parseStatement = function(context, topLevel, exports$1) {
175876
175899
  var starttype = this.type, node = this.startNode(), kind;
175877
175900
  if (this.isLet(context)) {
175878
175901
  starttype = types$1._var;
@@ -175941,7 +175964,7 @@ Defaulting to 2020, but this will stop working in the future.`);
175941
175964
  this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'");
175942
175965
  }
175943
175966
  }
175944
- return starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports4);
175967
+ return starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports$1);
175945
175968
  default:
175946
175969
  if (this.isAsyncFunction()) {
175947
175970
  if (context) {
@@ -175955,6 +175978,9 @@ Defaulting to 2020, but this will stop working in the future.`);
175955
175978
  if (!this.allowUsing) {
175956
175979
  this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script` or in the bare case statement");
175957
175980
  }
175981
+ if (context) {
175982
+ this.raise(this.start, "Using declaration is not allowed in single-statement positions");
175983
+ }
175958
175984
  if (usingKind === "await using") {
175959
175985
  if (!this.canAwait) {
175960
175986
  this.raise(this.start, "Await using cannot appear outside of async function");
@@ -176089,14 +176115,15 @@ Defaulting to 2020, but this will stop working in the future.`);
176089
176115
  };
176090
176116
  pp$8.parseForAfterInit = function(node, init, awaitAt) {
176091
176117
  if ((this.type === types$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && init.declarations.length === 1) {
176092
- if (this.options.ecmaVersion >= 9) {
176093
- if (this.type === types$1._in) {
176094
- if (awaitAt > -1) {
176095
- this.unexpected(awaitAt);
176096
- }
176097
- } else {
176098
- node.await = awaitAt > -1;
176118
+ if (this.type === types$1._in) {
176119
+ if ((init.kind === "using" || init.kind === "await using") && !init.declarations[0].init) {
176120
+ this.raise(this.start, "Using declaration is not allowed in for-in loops");
176099
176121
  }
176122
+ if (this.options.ecmaVersion >= 9 && awaitAt > -1) {
176123
+ this.unexpected(awaitAt);
176124
+ }
176125
+ } else if (this.options.ecmaVersion >= 9) {
176126
+ node.await = awaitAt > -1;
176100
176127
  }
176101
176128
  return this.parseForIn(node, init);
176102
176129
  }
@@ -176611,11 +176638,11 @@ Defaulting to 2020, but this will stop working in the future.`);
176611
176638
  var key = node.key;
176612
176639
  return !computed && (key.type === "Identifier" && key.name === name || key.type === "Literal" && key.value === name);
176613
176640
  }
176614
- pp$8.parseExportAllDeclaration = function(node, exports4) {
176641
+ pp$8.parseExportAllDeclaration = function(node, exports$1) {
176615
176642
  if (this.options.ecmaVersion >= 11) {
176616
176643
  if (this.eatContextual("as")) {
176617
176644
  node.exported = this.parseModuleExportName();
176618
- this.checkExport(exports4, node.exported, this.lastTokStart);
176645
+ this.checkExport(exports$1, node.exported, this.lastTokStart);
176619
176646
  } else {
176620
176647
  node.exported = null;
176621
176648
  }
@@ -176631,22 +176658,22 @@ Defaulting to 2020, but this will stop working in the future.`);
176631
176658
  this.semicolon();
176632
176659
  return this.finishNode(node, "ExportAllDeclaration");
176633
176660
  };
176634
- pp$8.parseExport = function(node, exports4) {
176661
+ pp$8.parseExport = function(node, exports$1) {
176635
176662
  this.next();
176636
176663
  if (this.eat(types$1.star)) {
176637
- return this.parseExportAllDeclaration(node, exports4);
176664
+ return this.parseExportAllDeclaration(node, exports$1);
176638
176665
  }
176639
176666
  if (this.eat(types$1._default)) {
176640
- this.checkExport(exports4, "default", this.lastTokStart);
176667
+ this.checkExport(exports$1, "default", this.lastTokStart);
176641
176668
  node.declaration = this.parseExportDefaultDeclaration();
176642
176669
  return this.finishNode(node, "ExportDefaultDeclaration");
176643
176670
  }
176644
176671
  if (this.shouldParseExportStatement()) {
176645
176672
  node.declaration = this.parseExportDeclaration(node);
176646
176673
  if (node.declaration.type === "VariableDeclaration") {
176647
- this.checkVariableExport(exports4, node.declaration.declarations);
176674
+ this.checkVariableExport(exports$1, node.declaration.declarations);
176648
176675
  } else {
176649
- this.checkExport(exports4, node.declaration.id, node.declaration.id.start);
176676
+ this.checkExport(exports$1, node.declaration.id, node.declaration.id.start);
176650
176677
  }
176651
176678
  node.specifiers = [];
176652
176679
  node.source = null;
@@ -176655,7 +176682,7 @@ Defaulting to 2020, but this will stop working in the future.`);
176655
176682
  }
176656
176683
  } else {
176657
176684
  node.declaration = null;
176658
- node.specifiers = this.parseExportSpecifiers(exports4);
176685
+ node.specifiers = this.parseExportSpecifiers(exports$1);
176659
176686
  if (this.eatContextual("from")) {
176660
176687
  if (this.type !== types$1.string) {
176661
176688
  this.unexpected();
@@ -176703,62 +176730,62 @@ Defaulting to 2020, but this will stop working in the future.`);
176703
176730
  return declaration;
176704
176731
  }
176705
176732
  };
176706
- pp$8.checkExport = function(exports4, name, pos) {
176707
- if (!exports4) {
176733
+ pp$8.checkExport = function(exports$1, name, pos) {
176734
+ if (!exports$1) {
176708
176735
  return;
176709
176736
  }
176710
176737
  if (typeof name !== "string") {
176711
176738
  name = name.type === "Identifier" ? name.name : name.value;
176712
176739
  }
176713
- if (hasOwn(exports4, name)) {
176740
+ if (hasOwn(exports$1, name)) {
176714
176741
  this.raiseRecoverable(pos, "Duplicate export '" + name + "'");
176715
176742
  }
176716
- exports4[name] = true;
176743
+ exports$1[name] = true;
176717
176744
  };
176718
- pp$8.checkPatternExport = function(exports4, pat) {
176745
+ pp$8.checkPatternExport = function(exports$1, pat) {
176719
176746
  var type = pat.type;
176720
176747
  if (type === "Identifier") {
176721
- this.checkExport(exports4, pat, pat.start);
176748
+ this.checkExport(exports$1, pat, pat.start);
176722
176749
  } else if (type === "ObjectPattern") {
176723
176750
  for (var i2 = 0, list2 = pat.properties;i2 < list2.length; i2 += 1) {
176724
176751
  var prop = list2[i2];
176725
- this.checkPatternExport(exports4, prop);
176752
+ this.checkPatternExport(exports$1, prop);
176726
176753
  }
176727
176754
  } else if (type === "ArrayPattern") {
176728
176755
  for (var i$1 = 0, list$1 = pat.elements;i$1 < list$1.length; i$1 += 1) {
176729
176756
  var elt = list$1[i$1];
176730
176757
  if (elt) {
176731
- this.checkPatternExport(exports4, elt);
176758
+ this.checkPatternExport(exports$1, elt);
176732
176759
  }
176733
176760
  }
176734
176761
  } else if (type === "Property") {
176735
- this.checkPatternExport(exports4, pat.value);
176762
+ this.checkPatternExport(exports$1, pat.value);
176736
176763
  } else if (type === "AssignmentPattern") {
176737
- this.checkPatternExport(exports4, pat.left);
176764
+ this.checkPatternExport(exports$1, pat.left);
176738
176765
  } else if (type === "RestElement") {
176739
- this.checkPatternExport(exports4, pat.argument);
176766
+ this.checkPatternExport(exports$1, pat.argument);
176740
176767
  }
176741
176768
  };
176742
- pp$8.checkVariableExport = function(exports4, decls) {
176743
- if (!exports4) {
176769
+ pp$8.checkVariableExport = function(exports$1, decls) {
176770
+ if (!exports$1) {
176744
176771
  return;
176745
176772
  }
176746
176773
  for (var i2 = 0, list2 = decls;i2 < list2.length; i2 += 1) {
176747
176774
  var decl = list2[i2];
176748
- this.checkPatternExport(exports4, decl.id);
176775
+ this.checkPatternExport(exports$1, decl.id);
176749
176776
  }
176750
176777
  };
176751
176778
  pp$8.shouldParseExportStatement = function() {
176752
176779
  return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction();
176753
176780
  };
176754
- pp$8.parseExportSpecifier = function(exports4) {
176781
+ pp$8.parseExportSpecifier = function(exports$1) {
176755
176782
  var node = this.startNode();
176756
176783
  node.local = this.parseModuleExportName();
176757
176784
  node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local;
176758
- this.checkExport(exports4, node.exported, node.exported.start);
176785
+ this.checkExport(exports$1, node.exported, node.exported.start);
176759
176786
  return this.finishNode(node, "ExportSpecifier");
176760
176787
  };
176761
- pp$8.parseExportSpecifiers = function(exports4) {
176788
+ pp$8.parseExportSpecifiers = function(exports$1) {
176762
176789
  var nodes = [], first = true;
176763
176790
  this.expect(types$1.braceL);
176764
176791
  while (!this.eat(types$1.braceR)) {
@@ -176770,7 +176797,7 @@ Defaulting to 2020, but this will stop working in the future.`);
176770
176797
  } else {
176771
176798
  first = false;
176772
176799
  }
176773
- nodes.push(this.parseExportSpecifier(exports4));
176800
+ nodes.push(this.parseExportSpecifier(exports$1));
176774
176801
  }
176775
176802
  return nodes;
176776
176803
  };
@@ -177339,17 +177366,20 @@ Defaulting to 2020, but this will stop working in the future.`);
177339
177366
  other[kind] = true;
177340
177367
  };
177341
177368
  pp$5.parseExpression = function(forInit, refDestructuringErrors) {
177342
- var startPos = this.start, startLoc = this.startLoc;
177343
- var expr = this.parseMaybeAssign(forInit, refDestructuringErrors);
177344
- if (this.type === types$1.comma) {
177345
- var node = this.startNodeAt(startPos, startLoc);
177346
- node.expressions = [expr];
177347
- while (this.eat(types$1.comma)) {
177348
- node.expressions.push(this.parseMaybeAssign(forInit, refDestructuringErrors));
177369
+ var this$1$1 = this;
177370
+ return this.catchStackOverflow(function() {
177371
+ var { start: startPos, startLoc } = this$1$1;
177372
+ var expr = this$1$1.parseMaybeAssign(forInit, refDestructuringErrors);
177373
+ if (this$1$1.type === types$1.comma) {
177374
+ var node = this$1$1.startNodeAt(startPos, startLoc);
177375
+ node.expressions = [expr];
177376
+ while (this$1$1.eat(types$1.comma)) {
177377
+ node.expressions.push(this$1$1.parseMaybeAssign(forInit, refDestructuringErrors));
177378
+ }
177379
+ return this$1$1.finishNode(node, "SequenceExpression");
177349
177380
  }
177350
- return this.finishNode(node, "SequenceExpression");
177351
- }
177352
- return expr;
177381
+ return expr;
177382
+ });
177353
177383
  };
177354
177384
  pp$5.parseMaybeAssign = function(forInit, refDestructuringErrors, afterLeftParse) {
177355
177385
  if (this.isContextual("yield")) {
@@ -177421,7 +177451,7 @@ Defaulting to 2020, but this will stop working in the future.`);
177421
177451
  if (this.checkExpressionErrors(refDestructuringErrors)) {
177422
177452
  return expr;
177423
177453
  }
177424
- if (this.eat(types$1.question)) {
177454
+ if (!(expr.type === "ArrowFunctionExpression" && expr.start === startPos) && this.eat(types$1.question)) {
177425
177455
  var node = this.startNodeAt(startPos, startLoc);
177426
177456
  node.test = expr;
177427
177457
  node.consequent = this.parseMaybeAssign();
@@ -177917,6 +177947,9 @@ Defaulting to 2020, but this will stop working in the future.`);
177917
177947
  }
177918
177948
  var startPos = this.start, startLoc = this.startLoc;
177919
177949
  node.callee = this.parseSubscripts(this.parseExprAtom(null, false, true), startPos, startLoc, true, false);
177950
+ if (node.callee.type === "Super") {
177951
+ this.raiseRecoverable(startPos, "Invalid use of 'super'");
177952
+ }
177920
177953
  if (this.eat(types$1.parenL)) {
177921
177954
  node.arguments = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false);
177922
177955
  } else {
@@ -180432,7 +180465,7 @@ Defaulting to 2020, but this will stop working in the future.`);
180432
180465
  }
180433
180466
  return this.finishToken(type, word);
180434
180467
  };
180435
- var version = "8.16.0";
180468
+ var version = "8.17.0";
180436
180469
  Parser.acorn = {
180437
180470
  Parser,
180438
180471
  version,
@@ -188143,7 +188176,7 @@ var require_typescript_json_schema = __commonJS((exports2) => {
188143
188176
  });
188144
188177
 
188145
188178
  // src/cli.ts
188146
- var import_node_path23 = __toESM(require("node:path"));
188179
+ var import_node_path24 = __toESM(require("node:path"));
188147
188180
 
188148
188181
  // src/code/args.ts
188149
188182
  var VALID_CARD_ACTIONS = [
@@ -188401,6 +188434,29 @@ var parseArgs = (argv) => {
188401
188434
  result.pageAjaxHandler = argv[4];
188402
188435
  }
188403
188436
  }
188437
+ if (command === "registry" && argv[1]) {
188438
+ const action = argv[1];
188439
+ if (action === "dev" || action === "build") {
188440
+ result.registryAction = action;
188441
+ const tail = argv.slice(2);
188442
+ for (let i = 0;i < tail.length; i++) {
188443
+ const tok = tail[i];
188444
+ if (tok === "--port" && tail[i + 1]) {
188445
+ result.registryPort = parseIntFlag("--port", tail[++i]);
188446
+ } else if (tok.startsWith("--port=")) {
188447
+ result.registryPort = parseIntFlag("--port", tok.slice("--port=".length));
188448
+ } else if (tok === "--api-server" && tail[i + 1]) {
188449
+ result.registryApiServer = tail[++i];
188450
+ } else if (tok.startsWith("--api-server=")) {
188451
+ result.registryApiServer = tok.slice("--api-server=".length);
188452
+ } else if (tok === "--out" && tail[i + 1]) {
188453
+ result.registryOut = tail[++i];
188454
+ } else if (tok.startsWith("--out=")) {
188455
+ result.registryOut = tok.slice("--out=".length);
188456
+ }
188457
+ }
188458
+ }
188459
+ }
188404
188460
  return result;
188405
188461
  };
188406
188462
  var detectHelpScope = (argv) => {
@@ -188415,6 +188471,8 @@ var detectHelpScope = (argv) => {
188415
188471
  return "card";
188416
188472
  if (c0 === "page")
188417
188473
  return "page";
188474
+ if (c0 === "registry")
188475
+ return "registry";
188418
188476
  if (c0 === "init")
188419
188477
  return "init";
188420
188478
  if (c0 === "postbuild")
@@ -188467,6 +188525,10 @@ var ALL_LINES = [
188467
188525
  " page view <path> Print app/<path>/page.tsx source",
188468
188526
  " page ajax <path> <add|remove> <handler> Add or remove an AJAX handler in app/<path>/page.tsx",
188469
188527
  "",
188528
+ "Registry preview harness (standalone PiePreviewRoot, no app layout):",
188529
+ " registry dev [--port N] [--api-server URL] Run the preview harness dev server (used by `pie card show`)",
188530
+ " registry build [--out DIR] Static-export the harness (served by `pie` with disable_serving=False)",
188531
+ "",
188470
188532
  "Component types for `card add`:",
188471
188533
  " simple Simple component (only data prop)",
188472
188534
  " complex Complex component (data + children props)",
@@ -197315,6 +197377,189 @@ var pageAjaxCommand = (pageName, action, handlerName) => {
197315
197377
  }
197316
197378
  };
197317
197379
 
197380
+ // src/code/commands/registry.ts
197381
+ var import_node_fs19 = __toESM(require("node:fs"));
197382
+ var import_node_path20 = __toESM(require("node:path"));
197383
+ var import_node_child_process6 = require("node:child_process");
197384
+ var REGISTRY_DIR = ".pie/registry";
197385
+ var OUT_DIRNAME = "out";
197386
+ var writeIfChanged = (filePath, contents) => {
197387
+ if (import_node_fs19.default.existsSync(filePath) && import_node_fs19.default.readFileSync(filePath, "utf8") === contents) {
197388
+ return;
197389
+ }
197390
+ import_node_fs19.default.mkdirSync(import_node_path20.default.dirname(filePath), { recursive: true });
197391
+ import_node_fs19.default.writeFileSync(filePath, contents, "utf8");
197392
+ };
197393
+ var scaffoldHarness = (frontendRoot, registryName) => {
197394
+ const dir = import_node_path20.default.join(frontendRoot, REGISTRY_DIR);
197395
+ writeIfChanged(import_node_path20.default.join(dir, "package.json"), JSON.stringify({ name: "pie-registry-preview", version: "0.0.0", private: true }, null, 2) + `
197396
+ `);
197397
+ writeIfChanged(import_node_path20.default.join(dir, "next.config.mjs"), `import path from 'node:path'
197398
+
197399
+ // Next runs with cwd = this harness dir; the frontend project is two levels up.
197400
+ const harnessRoot = process.cwd()
197401
+ const frontendRoot = path.resolve(harnessRoot, '..', '..')
197402
+
197403
+ /** @type {import('next').NextConfig} */
197404
+ export default {
197405
+ output: 'export',
197406
+ reactStrictMode: true,
197407
+ // Next 16 blocks dev requests from non-localhost origins; allow loopback so
197408
+ // the HMR socket / lazy chunk loading work when opened via 127.0.0.1.
197409
+ allowedDevOrigins: ['127.0.0.1', 'localhost'],
197410
+ images: { unoptimized: true },
197411
+ typescript: { ignoreBuildErrors: true },
197412
+ transpilePackages: ['@swarm.ing/pieui'],
197413
+ // The workspace root must be the frontend project: that's where node_modules
197414
+ // (incl. \`next\`) lives and where the card registry + cards are imported from
197415
+ // (outside this harness dir). The app dir stays this harness (cwd).
197416
+ outputFileTracingRoot: frontendRoot,
197417
+ env: {
197418
+ PIE_API_SERVER: process.env.PIE_API_SERVER ?? '',
197419
+ NEXT_PUBLIC_PIE_API_SERVER: process.env.NEXT_PUBLIC_PIE_API_SERVER ?? '',
197420
+ },
197421
+ turbopack: { root: frontendRoot, resolveAlias: { '@': frontendRoot } },
197422
+ webpack: (config) => {
197423
+ config.resolve = config.resolve || {}
197424
+ config.resolve.alias = { ...(config.resolve.alias || {}), '@': frontendRoot }
197425
+ return config
197426
+ },
197427
+ }
197428
+ `);
197429
+ writeIfChanged(import_node_path20.default.join(dir, "tsconfig.json"), JSON.stringify({
197430
+ compilerOptions: {
197431
+ target: "ES2017",
197432
+ lib: ["dom", "dom.iterable", "esnext"],
197433
+ allowJs: true,
197434
+ skipLibCheck: true,
197435
+ strict: false,
197436
+ noEmit: true,
197437
+ esModuleInterop: true,
197438
+ module: "esnext",
197439
+ moduleResolution: "bundler",
197440
+ resolveJsonModule: true,
197441
+ isolatedModules: true,
197442
+ jsx: "preserve",
197443
+ incremental: true,
197444
+ baseUrl: "../..",
197445
+ paths: { "@/*": ["./*"] },
197446
+ plugins: [{ name: "next" }]
197447
+ },
197448
+ include: [
197449
+ "next-env.d.ts",
197450
+ "**/*.ts",
197451
+ "**/*.tsx",
197452
+ ".next/types/**/*.ts"
197453
+ ],
197454
+ exclude: ["node_modules"]
197455
+ }, null, 2) + `
197456
+ `);
197457
+ writeIfChanged(import_node_path20.default.join(dir, "app", "layout.tsx"), `import '@/app/globals.css'
197458
+
197459
+ export const metadata = { title: 'Pie Registry Preview' }
197460
+
197461
+ export default function RootLayout({
197462
+ children,
197463
+ }: {
197464
+ children: React.ReactNode
197465
+ }) {
197466
+ return (
197467
+ <html lang="en">
197468
+ <body>{children}</body>
197469
+ </html>
197470
+ )
197471
+ }
197472
+ `);
197473
+ writeIfChanged(import_node_path20.default.join(dir, "app", "page.tsx"), `'use client'
197474
+
197475
+ import dynamic from 'next/dynamic'
197476
+
197477
+ const PreviewClient = dynamic(
197478
+ () =>
197479
+ import('./preview-client').catch((e) => ({
197480
+ default: () => (
197481
+ <pre style={{ color: 'red', padding: 16, whiteSpace: 'pre-wrap' }}>
197482
+ {'[pie] preview harness failed to load:\\n' + String(e && e.stack ? e.stack : e)}
197483
+ </pre>
197484
+ ),
197485
+ })),
197486
+ { ssr: false, loading: () => <div style={{ padding: 16 }}>harness loading…</div> }
197487
+ )
197488
+
197489
+ export default function Page() {
197490
+ return <PreviewClient />
197491
+ }
197492
+ `);
197493
+ writeIfChanged(import_node_path20.default.join(dir, "app", "preview-client.tsx"), `'use client'
197494
+
197495
+ import '@/${registryName}/registry'
197496
+ import { PiePreviewRoot } from '@swarm.ing/pieui'
197497
+
197498
+ export default function PreviewClient() {
197499
+ // Dev: NEXT_PUBLIC_PIE_API_SERVER points at the ephemeral backend (Next
197500
+ // statically inlines NEXT_PUBLIC_* into the client bundle). Static build:
197501
+ // unset → falls back to same-origin '/' (pie serves both the SPA and API).
197502
+ const apiServer = process.env.NEXT_PUBLIC_PIE_API_SERVER || '/'
197503
+ return <PiePreviewRoot apiServer={apiServer} pathname="/" />
197504
+ }
197505
+ `);
197506
+ writeIfChanged(import_node_path20.default.join(dir, ".gitignore"), `*
197507
+ `);
197508
+ return dir;
197509
+ };
197510
+ var resolveNextBin = (frontendRoot) => {
197511
+ const bin = import_node_path20.default.join(frontendRoot, "node_modules", ".bin", "next");
197512
+ if (!import_node_fs19.default.existsSync(bin)) {
197513
+ throw new Error(`Next.js binary not found at ${bin}. Install dependencies in the ` + `frontend project first (the registry harness reuses them).`);
197514
+ }
197515
+ return bin;
197516
+ };
197517
+ var registryCommand = (action, opts = {}) => {
197518
+ const frontendRoot = process.cwd();
197519
+ const settings = loadSettings(frontendRoot);
197520
+ const registryName = import_node_path20.default.basename(settings.componentsDir);
197521
+ const dir = scaffoldHarness(frontendRoot, registryName);
197522
+ const nextBin = resolveNextBin(frontendRoot);
197523
+ const env = { ...process.env };
197524
+ if (opts.apiServer) {
197525
+ env.PIE_API_SERVER = opts.apiServer;
197526
+ env.NEXT_PUBLIC_PIE_API_SERVER = opts.apiServer;
197527
+ }
197528
+ if (action === "dev") {
197529
+ const port = opts.port ?? 3210;
197530
+ console.log(`[pieui] registry dev → http://localhost:${port}`);
197531
+ console.log(`[pieui] harness: ${dir}`);
197532
+ console.log(`[pieui] PIE_API_SERVER=${env.PIE_API_SERVER ?? "(unset → /)"}`);
197533
+ const result2 = import_node_child_process6.spawnSync(nextBin, ["dev", "-p", String(port)], {
197534
+ cwd: dir,
197535
+ stdio: "inherit",
197536
+ env
197537
+ });
197538
+ if (result2.error)
197539
+ throw result2.error;
197540
+ if (typeof result2.status === "number" && result2.status !== 0) {
197541
+ process.exitCode = result2.status;
197542
+ }
197543
+ return;
197544
+ }
197545
+ delete env.PIE_API_SERVER;
197546
+ delete env.NEXT_PUBLIC_PIE_API_SERVER;
197547
+ console.log(`[pieui] registry build (static export) → ${import_node_path20.default.join(dir, OUT_DIRNAME)}`);
197548
+ const result = import_node_child_process6.spawnSync(nextBin, ["build"], {
197549
+ cwd: dir,
197550
+ stdio: "inherit",
197551
+ env
197552
+ });
197553
+ if (result.error)
197554
+ throw result.error;
197555
+ if (typeof result.status === "number" && result.status !== 0) {
197556
+ process.exitCode = result.status;
197557
+ return;
197558
+ }
197559
+ const outDir = opts.out ? import_node_path20.default.resolve(frontendRoot, opts.out) : import_node_path20.default.join(dir, OUT_DIRNAME);
197560
+ console.log(`[pieui] registry build complete: ${outDir}`);
197561
+ };
197562
+
197318
197563
  // src/code/commands/create.ts
197319
197564
  var import_fs9 = __toESM(require("fs"));
197320
197565
  var import_path11 = __toESM(require("path"));
@@ -197434,7 +197679,8 @@ var DEFAULT_SHARED_SIMPLE_TSX = `"use client";
197434
197679
 
197435
197680
  import { useEffect, useState } from "react";
197436
197681
  import { useRouter } from "next/navigation";
197437
- import { PieTelegramRoot, PieQueryOptions } from "@swarm.ing/pieui";
197682
+ import { PieQueryOptions } from "@swarm.ing/pieui";
197683
+ import { PieTelegramRoot } from "@swarm.ing/pieui/telegram";
197438
197684
 
197439
197685
  import { usePathname, useSearchParams } from "next/navigation";
197440
197686
  import LoadingScreen from "@/components/LoadingScreen";
@@ -197672,49 +197918,49 @@ var createPieAppCommand = (appName) => {
197672
197918
  };
197673
197919
 
197674
197920
  // src/code/commands/login.ts
197675
- var import_node_child_process6 = require("node:child_process");
197921
+ var import_node_child_process7 = require("node:child_process");
197676
197922
  var import_node_crypto = require("node:crypto");
197677
- var import_node_fs20 = __toESM(require("node:fs"));
197678
- var import_node_path21 = __toESM(require("node:path"));
197923
+ var import_node_fs21 = __toESM(require("node:fs"));
197924
+ var import_node_path22 = __toESM(require("node:path"));
197679
197925
 
197680
197926
  // src/code/services/projectLinks.ts
197681
- var import_node_fs19 = __toESM(require("node:fs"));
197682
- var import_node_path20 = __toESM(require("node:path"));
197927
+ var import_node_fs20 = __toESM(require("node:fs"));
197928
+ var import_node_path21 = __toESM(require("node:path"));
197683
197929
  var readline3 = __toESM(require("node:readline/promises"));
197684
197930
  var PIE_CONFIG_DIR3 = ".pie";
197685
197931
  var PIE_CONFIG_FILE3 = "config.json";
197686
- var configPathFor = (cwd) => import_node_path20.default.join(cwd, PIE_CONFIG_DIR3, PIE_CONFIG_FILE3);
197932
+ var configPathFor = (cwd) => import_node_path21.default.join(cwd, PIE_CONFIG_DIR3, PIE_CONFIG_FILE3);
197687
197933
  var readConfig2 = (cwd) => {
197688
197934
  const p = configPathFor(cwd);
197689
- if (!import_node_fs19.default.existsSync(p))
197935
+ if (!import_node_fs20.default.existsSync(p))
197690
197936
  return {};
197691
197937
  try {
197692
- const parsed = JSON.parse(import_node_fs19.default.readFileSync(p, "utf8"));
197938
+ const parsed = JSON.parse(import_node_fs20.default.readFileSync(p, "utf8"));
197693
197939
  return typeof parsed === "object" && parsed !== null && !Array.isArray(parsed) ? parsed : {};
197694
197940
  } catch {
197695
197941
  return {};
197696
197942
  }
197697
197943
  };
197698
197944
  var writeConfig2 = (cwd, config) => {
197699
- const dir = import_node_path20.default.join(cwd, PIE_CONFIG_DIR3);
197700
- import_node_fs19.default.mkdirSync(dir, { recursive: true });
197701
- import_node_fs19.default.writeFileSync(configPathFor(cwd), JSON.stringify(config, null, 2) + `
197945
+ const dir = import_node_path21.default.join(cwd, PIE_CONFIG_DIR3);
197946
+ import_node_fs20.default.mkdirSync(dir, { recursive: true });
197947
+ import_node_fs20.default.writeFileSync(configPathFor(cwd), JSON.stringify(config, null, 2) + `
197702
197948
  `, "utf8");
197703
197949
  };
197704
197950
  var walkUpForPyproject2 = (start) => {
197705
- let dir = import_node_path20.default.resolve(start);
197706
- while (dir !== import_node_path20.default.dirname(dir)) {
197707
- if (import_node_fs19.default.existsSync(import_node_path20.default.join(dir, "pyproject.toml")))
197951
+ let dir = import_node_path21.default.resolve(start);
197952
+ while (dir !== import_node_path21.default.dirname(dir)) {
197953
+ if (import_node_fs20.default.existsSync(import_node_path21.default.join(dir, "pyproject.toml")))
197708
197954
  return dir;
197709
- dir = import_node_path20.default.dirname(dir);
197955
+ dir = import_node_path21.default.dirname(dir);
197710
197956
  }
197711
197957
  return null;
197712
197958
  };
197713
197959
  var ensureBackendDir2 = async (cwd) => {
197714
197960
  const config = readConfig2(cwd);
197715
197961
  if (config.backendProjectDir) {
197716
- const dir = import_node_path20.default.resolve(cwd, config.backendProjectDir);
197717
- if (import_node_fs19.default.existsSync(dir) && import_node_fs19.default.statSync(dir).isDirectory())
197962
+ const dir = import_node_path21.default.resolve(cwd, config.backendProjectDir);
197963
+ if (import_node_fs20.default.existsSync(dir) && import_node_fs20.default.statSync(dir).isDirectory())
197718
197964
  return dir;
197719
197965
  console.error(`[pieui] Configured backendProjectDir not found: ${dir}`);
197720
197966
  }
@@ -197739,9 +197985,9 @@ var ensureBackendDir2 = async (cwd) => {
197739
197985
  const raw = (await rl.question("[pieui] Path to backend (pie) project: ")).trim();
197740
197986
  if (!raw)
197741
197987
  return null;
197742
- const expanded = raw.startsWith("~") ? import_node_path20.default.join(process.env.HOME || "", raw.slice(1).replace(/^[\\/]/, "")) : raw;
197743
- const absolute = import_node_path20.default.resolve(expanded);
197744
- if (!import_node_fs19.default.existsSync(absolute) || !import_node_fs19.default.statSync(absolute).isDirectory()) {
197988
+ const expanded = raw.startsWith("~") ? import_node_path21.default.join(process.env.HOME || "", raw.slice(1).replace(/^[\\/]/, "")) : raw;
197989
+ const absolute = import_node_path21.default.resolve(expanded);
197990
+ if (!import_node_fs20.default.existsSync(absolute) || !import_node_fs20.default.statSync(absolute).isDirectory()) {
197745
197991
  console.error(`[pieui] Not a directory: ${absolute}`);
197746
197992
  return null;
197747
197993
  }
@@ -197775,11 +198021,11 @@ var generateCode = (length = CODE_LENGTH) => {
197775
198021
  var tryOpenBrowser = (url) => {
197776
198022
  try {
197777
198023
  if (process.platform === "win32") {
197778
- import_node_child_process6.execFile("cmd", ["/c", "start", "", url], () => {});
198024
+ import_node_child_process7.execFile("cmd", ["/c", "start", "", url], () => {});
197779
198025
  } else if (process.platform === "darwin") {
197780
- import_node_child_process6.execFile("open", [url], () => {});
198026
+ import_node_child_process7.execFile("open", [url], () => {});
197781
198027
  } else {
197782
- import_node_child_process6.execFile("xdg-open", [url], () => {});
198028
+ import_node_child_process7.execFile("xdg-open", [url], () => {});
197783
198029
  }
197784
198030
  } catch {}
197785
198031
  };
@@ -197810,8 +198056,8 @@ var appendPieCredentialsToEnv = (cwd, config) => {
197810
198056
  if (Object.keys(entries).length === 0) {
197811
198057
  return;
197812
198058
  }
197813
- const envPath = import_node_path21.default.join(cwd, ".env");
197814
- let content = import_node_fs20.default.existsSync(envPath) ? import_node_fs20.default.readFileSync(envPath, "utf8") : "";
198059
+ const envPath = import_node_path22.default.join(cwd, ".env");
198060
+ let content = import_node_fs21.default.existsSync(envPath) ? import_node_fs21.default.readFileSync(envPath, "utf8") : "";
197815
198061
  if (content.length > 0 && !content.endsWith(`
197816
198062
  `)) {
197817
198063
  content += `
@@ -197821,7 +198067,7 @@ var appendPieCredentialsToEnv = (cwd, config) => {
197821
198067
  content += `${additions.join(`
197822
198068
  `)}
197823
198069
  `;
197824
- import_node_fs20.default.writeFileSync(envPath, content, "utf8");
198070
+ import_node_fs21.default.writeFileSync(envPath, content, "utf8");
197825
198071
  console.log(`[pie] Appended credentials to ${envPath}`);
197826
198072
  };
197827
198073
  async function loginCommand(options = {}) {
@@ -197842,8 +198088,8 @@ async function loginCommand(options = {}) {
197842
198088
  try {
197843
198089
  openBrowser(connectUrl);
197844
198090
  } catch {}
197845
- const pieDir = import_node_path21.default.join(cwd, ".pie");
197846
- const configPath = import_node_path21.default.join(pieDir, "config.json");
198091
+ const pieDir = import_node_path22.default.join(cwd, ".pie");
198092
+ const configPath = import_node_path22.default.join(pieDir, "config.json");
197847
198093
  const url = `${credentialsApi}?${new URLSearchParams({ code }).toString()}`;
197848
198094
  let first = true;
197849
198095
  while (true) {
@@ -197877,7 +198123,7 @@ async function loginCommand(options = {}) {
197877
198123
  throw new Error("Login succeeded but response had no 'config' field");
197878
198124
  }
197879
198125
  const credBlob = typeof record.config === "object" && record.config !== null && !Array.isArray(record.config) ? record.config : {};
197880
- import_node_fs20.default.mkdirSync(pieDir, { recursive: true });
198126
+ import_node_fs21.default.mkdirSync(pieDir, { recursive: true });
197881
198127
  mergeConfig(cwd, credBlob);
197882
198128
  console.log(`[pie] Saved credentials to ${configPath}`);
197883
198129
  appendPieCredentialsToEnv(cwd, record.config);
@@ -197892,9 +198138,9 @@ async function loginCommand(options = {}) {
197892
198138
  }
197893
198139
 
197894
198140
  // src/code/commands/selfUpgrade.ts
197895
- var import_node_child_process7 = require("node:child_process");
197896
- var import_node_fs21 = __toESM(require("node:fs"));
197897
- var import_node_path22 = __toESM(require("node:path"));
198141
+ var import_node_child_process8 = require("node:child_process");
198142
+ var import_node_fs22 = __toESM(require("node:fs"));
198143
+ var import_node_path23 = __toESM(require("node:path"));
197898
198144
  var __dirname = "/home/runner/work/pieui/pieui/src/code/commands";
197899
198145
  var PACKAGE_NAME = "@swarm.ing/pieui";
197900
198146
  var INSTALL_ARGS = {
@@ -197905,7 +198151,7 @@ var INSTALL_ARGS = {
197905
198151
  };
197906
198152
  var isPackageManager = (value2) => value2 === "bun" || value2 === "npm" || value2 === "pnpm" || value2 === "yarn";
197907
198153
  var hasBinary = (bin) => {
197908
- const result = import_node_child_process7.spawnSync("which", [bin], { stdio: "ignore" });
198154
+ const result = import_node_child_process8.spawnSync("which", [bin], { stdio: "ignore" });
197909
198155
  return result.status === 0;
197910
198156
  };
197911
198157
  var detectPackageManager = () => {
@@ -197918,13 +198164,13 @@ var detectPackageManager = () => {
197918
198164
  };
197919
198165
  var readInstalledVersion = () => {
197920
198166
  const candidates = [
197921
- import_node_path22.default.resolve(__dirname, "..", "package.json"),
197922
- import_node_path22.default.resolve(__dirname, "..", "..", "package.json"),
197923
- import_node_path22.default.resolve(__dirname, "..", "..", "..", "package.json")
198167
+ import_node_path23.default.resolve(__dirname, "..", "package.json"),
198168
+ import_node_path23.default.resolve(__dirname, "..", "..", "package.json"),
198169
+ import_node_path23.default.resolve(__dirname, "..", "..", "..", "package.json")
197924
198170
  ];
197925
198171
  for (const file of candidates) {
197926
198172
  try {
197927
- const raw = import_node_fs21.default.readFileSync(file, "utf8");
198173
+ const raw = import_node_fs22.default.readFileSync(file, "utf8");
197928
198174
  const parsed = JSON.parse(raw);
197929
198175
  if (parsed.name === PACKAGE_NAME && parsed.version) {
197930
198176
  return parsed.version;
@@ -197948,7 +198194,7 @@ var selfUpgradeCommand = async (override) => {
197948
198194
  }
197949
198195
  const args = INSTALL_ARGS[pm];
197950
198196
  console.log(`[pieui] Upgrading via ${pm}: ${pm} ${args.join(" ")}`);
197951
- const result = import_node_child_process7.spawnSync(pm, args, {
198197
+ const result = import_node_child_process8.spawnSync(pm, args, {
197952
198198
  stdio: "inherit",
197953
198199
  env: process.env
197954
198200
  });
@@ -198007,7 +198253,11 @@ var main = async () => {
198007
198253
  historyPage,
198008
198254
  historyPerPage,
198009
198255
  historyFrom,
198010
- historyTo
198256
+ historyTo,
198257
+ registryAction,
198258
+ registryPort,
198259
+ registryApiServer,
198260
+ registryOut
198011
198261
  } = args;
198012
198262
  console.log(`[pieui] CLI started with command: "${command}"`);
198013
198263
  switch (command) {
@@ -198031,9 +198281,22 @@ var main = async () => {
198031
198281
  case "self-upgrade":
198032
198282
  await selfUpgradeCommand(args.selfUpgradePm);
198033
198283
  return;
198284
+ case "registry": {
198285
+ if (registryAction !== "dev" && registryAction !== "build") {
198286
+ console.error("[pieui] Error: Supported registry subcommands: dev, build");
198287
+ printUsage();
198288
+ process.exit(1);
198289
+ }
198290
+ registryCommand(registryAction, {
198291
+ port: registryPort,
198292
+ apiServer: registryApiServer,
198293
+ out: registryOut
198294
+ });
198295
+ return;
198296
+ }
198034
198297
  case "postbuild":
198035
- console.log(`[pieui] Source directory: ${import_node_path23.default.resolve(process.cwd(), srcDir)}`);
198036
- console.log(`[pieui] Output directory: ${import_node_path23.default.resolve(process.cwd(), outDir)}`);
198298
+ console.log(`[pieui] Source directory: ${import_node_path24.default.resolve(process.cwd(), srcDir)}`);
198299
+ console.log(`[pieui] Output directory: ${import_node_path24.default.resolve(process.cwd(), outDir)}`);
198037
198300
  console.log(`[pieui] Append mode: ${append}`);
198038
198301
  await postbuildCommand(srcDir, outDir, append);
198039
198302
  return;