@superblocksteam/cli 2.0.0-next.103 → 2.0.0-next.104

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2336,17 +2336,17 @@ var require_inc = __commonJS({
2336
2336
  "../../../../node_modules/.pnpm/semver@7.7.1/node_modules/semver/functions/inc.js"(exports2, module2) {
2337
2337
  init_cjs_shims();
2338
2338
  var SemVer = require_semver();
2339
- var inc = (version2, release, options8, identifier4, identifierBase) => {
2339
+ var inc = (version2, release, options8, identifier3, identifierBase) => {
2340
2340
  if (typeof options8 === "string") {
2341
- identifierBase = identifier4;
2342
- identifier4 = options8;
2341
+ identifierBase = identifier3;
2342
+ identifier3 = options8;
2343
2343
  options8 = void 0;
2344
2344
  }
2345
2345
  try {
2346
2346
  return new SemVer(
2347
2347
  version2 instanceof SemVer ? version2.version : version2,
2348
2348
  options8
2349
- ).inc(release, identifier4, identifierBase).version;
2349
+ ).inc(release, identifier3, identifierBase).version;
2350
2350
  } catch (er) {
2351
2351
  return null;
2352
2352
  }
@@ -26302,10 +26302,10 @@ var require_core = __commonJS({
26302
26302
  fields: {
26303
26303
  operator: {
26304
26304
  validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("string") : Object.assign(function() {
26305
- const identifier4 = (0, _utils.assertOneOf)(..._index.ASSIGNMENT_OPERATORS);
26305
+ const identifier3 = (0, _utils.assertOneOf)(..._index.ASSIGNMENT_OPERATORS);
26306
26306
  const pattern = (0, _utils.assertOneOf)("=");
26307
26307
  return function(node, key2, val) {
26308
- const validator2 = (0, _is.default)("Pattern", node.left) ? pattern : identifier4;
26308
+ const validator2 = (0, _is.default)("Pattern", node.left) ? pattern : identifier3;
26309
26309
  validator2(node, key2, val);
26310
26310
  };
26311
26311
  }(), {
@@ -26597,10 +26597,10 @@ var require_core = __commonJS({
26597
26597
  }),
26598
26598
  aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"],
26599
26599
  validate: !process.env.BABEL_TYPES_8_BREAKING ? void 0 : function() {
26600
- const identifier4 = (0, _utils.assertNodeType)("Identifier");
26600
+ const identifier3 = (0, _utils.assertNodeType)("Identifier");
26601
26601
  return function(parent, key2, node) {
26602
26602
  if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
26603
- identifier4(node, "id", node.id);
26603
+ identifier3(node, "id", node.id);
26604
26604
  }
26605
26605
  };
26606
26606
  }()
@@ -27268,10 +27268,10 @@ var require_core = __commonJS({
27268
27268
  }
27269
27269
  },
27270
27270
  validate: !process.env.BABEL_TYPES_8_BREAKING ? void 0 : function() {
27271
- const identifier4 = (0, _utils.assertNodeType)("Identifier");
27271
+ const identifier3 = (0, _utils.assertNodeType)("Identifier");
27272
27272
  return function(parent, key2, node) {
27273
27273
  if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
27274
- identifier4(node, "id", node.id);
27274
+ identifier3(node, "id", node.id);
27275
27275
  }
27276
27276
  };
27277
27277
  }()
@@ -29552,15 +29552,15 @@ var require_lowercase = __commonJS({
29552
29552
  exports2.functionTypeAnnotation = functionTypeAnnotation;
29553
29553
  exports2.functionTypeParam = functionTypeParam;
29554
29554
  exports2.genericTypeAnnotation = genericTypeAnnotation;
29555
- exports2.identifier = identifier4;
29555
+ exports2.identifier = identifier3;
29556
29556
  exports2.ifStatement = ifStatement;
29557
29557
  exports2.import = _import;
29558
29558
  exports2.importAttribute = importAttribute;
29559
- exports2.importDeclaration = importDeclaration2;
29559
+ exports2.importDeclaration = importDeclaration;
29560
29560
  exports2.importDefaultSpecifier = importDefaultSpecifier;
29561
29561
  exports2.importExpression = importExpression;
29562
29562
  exports2.importNamespaceSpecifier = importNamespaceSpecifier;
29563
- exports2.importSpecifier = importSpecifier2;
29563
+ exports2.importSpecifier = importSpecifier;
29564
29564
  exports2.indexedAccessType = indexedAccessType;
29565
29565
  exports2.inferredPredicate = inferredPredicate;
29566
29566
  exports2.interfaceDeclaration = interfaceDeclaration;
@@ -29598,10 +29598,10 @@ var require_lowercase = __commonJS({
29598
29598
  exports2.numberLiteralTypeAnnotation = numberLiteralTypeAnnotation;
29599
29599
  exports2.numberTypeAnnotation = numberTypeAnnotation;
29600
29600
  exports2.numericLiteral = numericLiteral;
29601
- exports2.objectExpression = objectExpression2;
29601
+ exports2.objectExpression = objectExpression;
29602
29602
  exports2.objectMethod = objectMethod;
29603
29603
  exports2.objectPattern = objectPattern2;
29604
- exports2.objectProperty = objectProperty4;
29604
+ exports2.objectProperty = objectProperty3;
29605
29605
  exports2.objectTypeAnnotation = objectTypeAnnotation;
29606
29606
  exports2.objectTypeCallProperty = objectTypeCallProperty;
29607
29607
  exports2.objectTypeIndexer = objectTypeIndexer;
@@ -29630,7 +29630,7 @@ var require_lowercase = __commonJS({
29630
29630
  exports2.spreadElement = spreadElement;
29631
29631
  exports2.spreadProperty = SpreadProperty;
29632
29632
  exports2.staticBlock = staticBlock;
29633
- exports2.stringLiteral = stringLiteral3;
29633
+ exports2.stringLiteral = stringLiteral2;
29634
29634
  exports2.stringLiteralTypeAnnotation = stringLiteralTypeAnnotation;
29635
29635
  exports2.stringTypeAnnotation = stringTypeAnnotation;
29636
29636
  exports2.super = _super;
@@ -29972,7 +29972,7 @@ var require_lowercase = __commonJS({
29972
29972
  validate2(defs.async, node, "async", async);
29973
29973
  return node;
29974
29974
  }
29975
- function identifier4(name18) {
29975
+ function identifier3(name18) {
29976
29976
  const node = {
29977
29977
  type: "Identifier",
29978
29978
  name: name18
@@ -30005,7 +30005,7 @@ var require_lowercase = __commonJS({
30005
30005
  validate2(defs.body, node, "body", body, 1);
30006
30006
  return node;
30007
30007
  }
30008
- function stringLiteral3(value2) {
30008
+ function stringLiteral2(value2) {
30009
30009
  const node = {
30010
30010
  type: "StringLiteral",
30011
30011
  value: value2
@@ -30102,7 +30102,7 @@ var require_lowercase = __commonJS({
30102
30102
  validate2(defs.interpreter, node, "interpreter", interpreter, 1);
30103
30103
  return node;
30104
30104
  }
30105
- function objectExpression2(properties) {
30105
+ function objectExpression(properties) {
30106
30106
  const node = {
30107
30107
  type: "ObjectExpression",
30108
30108
  properties
@@ -30132,7 +30132,7 @@ var require_lowercase = __commonJS({
30132
30132
  validate2(defs.async, node, "async", async);
30133
30133
  return node;
30134
30134
  }
30135
- function objectProperty4(key2, value2, computed = false, shorthand = false, decorators = null) {
30135
+ function objectProperty3(key2, value2, computed = false, shorthand = false, decorators = null) {
30136
30136
  const node = {
30137
30137
  type: "ObjectProperty",
30138
30138
  key: key2,
@@ -30434,7 +30434,7 @@ var require_lowercase = __commonJS({
30434
30434
  validate2(defs.await, node, "await", _await);
30435
30435
  return node;
30436
30436
  }
30437
- function importDeclaration2(specifiers, source2) {
30437
+ function importDeclaration(specifiers, source2) {
30438
30438
  const node = {
30439
30439
  type: "ImportDeclaration",
30440
30440
  specifiers,
@@ -30463,7 +30463,7 @@ var require_lowercase = __commonJS({
30463
30463
  validate2(defs.local, node, "local", local, 1);
30464
30464
  return node;
30465
30465
  }
30466
- function importSpecifier2(local, imported) {
30466
+ function importSpecifier(local, imported) {
30467
30467
  const node = {
30468
30468
  type: "ImportSpecifier",
30469
30469
  local,
@@ -50417,8 +50417,8 @@ var require_lib9 = __commonJS({
50417
50417
  this.declareNameFromIdentifier(at3, bindingType);
50418
50418
  }
50419
50419
  }
50420
- declareNameFromIdentifier(identifier4, binding) {
50421
- this.scope.declareName(identifier4.name, binding, identifier4.loc.start);
50420
+ declareNameFromIdentifier(identifier3, binding) {
50421
+ this.scope.declareName(identifier3.name, binding, identifier3.loc.start);
50422
50422
  }
50423
50423
  checkToRestConversion(node, allowPattern) {
50424
50424
  switch (node.type) {
@@ -53250,10 +53250,10 @@ var require_lib9 = __commonJS({
53250
53250
  this.next();
53251
53251
  if (tokenIsIdentifier(this.state.type)) {
53252
53252
  const name18 = this.parseIdentifierName();
53253
- const identifier4 = this.createIdentifier(node, name18);
53254
- identifier4.type = "V8IntrinsicIdentifier";
53253
+ const identifier3 = this.createIdentifier(node, name18);
53254
+ identifier3.type = "V8IntrinsicIdentifier";
53255
53255
  if (this.match(10)) {
53256
- return identifier4;
53256
+ return identifier3;
53257
53257
  }
53258
53258
  }
53259
53259
  this.unexpected(v8IntrinsicStartLoc);
@@ -56952,8 +56952,8 @@ var require_lib9 = __commonJS({
56952
56952
  const importedIsString = this.match(134);
56953
56953
  const isMaybeTypeOnly = this.isContextual(130);
56954
56954
  specifier.imported = this.parseModuleExportName();
56955
- const importSpecifier2 = this.parseImportSpecifier(specifier, importedIsString, node.importKind === "type" || node.importKind === "typeof", isMaybeTypeOnly, void 0);
56956
- node.specifiers.push(importSpecifier2);
56955
+ const importSpecifier = this.parseImportSpecifier(specifier, importedIsString, node.importKind === "type" || node.importKind === "typeof", isMaybeTypeOnly, void 0);
56956
+ node.specifiers.push(importSpecifier);
56957
56957
  }
56958
56958
  }
56959
56959
  parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, bindingType) {
@@ -153248,14 +153248,14 @@ var require_esprima = __commonJS({
153248
153248
  JSXParser2.prototype.parseJSXAttributeName = function() {
153249
153249
  var node = this.createJSXNode();
153250
153250
  var attributeName;
153251
- var identifier4 = this.parseJSXIdentifier();
153251
+ var identifier3 = this.parseJSXIdentifier();
153252
153252
  if (this.matchJSX(":")) {
153253
- var namespace = identifier4;
153253
+ var namespace = identifier3;
153254
153254
  this.expectJSX(":");
153255
153255
  var name_2 = this.parseJSXIdentifier();
153256
153256
  attributeName = this.finalize(node, new JSXNode.JSXNamespacedName(namespace, name_2));
153257
153257
  } else {
153258
- attributeName = identifier4;
153258
+ attributeName = identifier3;
153259
153259
  }
153260
153260
  return attributeName;
153261
153261
  };
@@ -159412,7 +159412,7 @@ var require_binding = __commonJS({
159412
159412
  exports2.default = void 0;
159413
159413
  var Binding = class {
159414
159414
  constructor({
159415
- identifier: identifier4,
159415
+ identifier: identifier3,
159416
159416
  scope,
159417
159417
  path: path53,
159418
159418
  kind
@@ -159426,7 +159426,7 @@ var require_binding = __commonJS({
159426
159426
  this.referencePaths = [];
159427
159427
  this.referenced = false;
159428
159428
  this.references = 0;
159429
- this.identifier = identifier4;
159429
+ this.identifier = identifier3;
159430
159430
  this.scope = scope;
159431
159431
  this.path = path53;
159432
159432
  this.kind = kind;
@@ -161136,7 +161136,7 @@ var require_scope2 = __commonJS({
161136
161136
  callExpression,
161137
161137
  cloneNode,
161138
161138
  getBindingIdentifiers,
161139
- identifier: identifier4,
161139
+ identifier: identifier3,
161140
161140
  isArrayExpression,
161141
161141
  isBinary: isBinary2,
161142
161142
  isCallExpression: isCallExpression3,
@@ -161458,7 +161458,7 @@ var require_scope2 = __commonJS({
161458
161458
  return cloneNode(id2);
161459
161459
  }
161460
161460
  generateUidIdentifier(name18) {
161461
- return identifier4(this.generateUid(name18));
161461
+ return identifier3(this.generateUid(name18));
161462
161462
  }
161463
161463
  generateUid(name18 = "temp") {
161464
161464
  name18 = toIdentifier(name18).replace(/^_+/, "").replace(/\d+$/g, "");
@@ -161482,7 +161482,7 @@ var require_scope2 = __commonJS({
161482
161482
  return this.generateUid(id2.slice(0, 20));
161483
161483
  }
161484
161484
  generateUidIdentifierBasedOnNode(node, defaultName) {
161485
- return identifier4(this.generateUidBasedOnNode(node, defaultName));
161485
+ return identifier3(this.generateUidBasedOnNode(node, defaultName));
161486
161486
  }
161487
161487
  isStatic(node) {
161488
161488
  if (isThisExpression(node) || isSuper(node) || isTopicReference(node)) {
@@ -162000,7 +162000,7 @@ var require_scope2 = __commonJS({
162000
162000
  }
162001
162001
  const ids = Object.keys(getBindingIdentifiers(decl, false, true, true));
162002
162002
  for (const name19 of ids) {
162003
- emit(identifier4(name19), decl.init != null);
162003
+ emit(identifier3(name19), decl.init != null);
162004
162004
  }
162005
162005
  }
162006
162006
  if (parentPath.parentPath.isFor({
@@ -162053,7 +162053,7 @@ var require_scope2 = __commonJS({
162053
162053
  if (isIdentifier2(node, {
162054
162054
  name: "arguments"
162055
162055
  })) {
162056
- return callExpression(memberExpression(memberExpression(memberExpression(identifier4("Array"), identifier4("prototype")), identifier4("slice")), identifier4("call")), [node]);
162056
+ return callExpression(memberExpression(memberExpression(memberExpression(identifier3("Array"), identifier3("prototype")), identifier3("slice")), identifier3("call")), [node]);
162057
162057
  }
162058
162058
  let helperName;
162059
162059
  const args = [node];
@@ -162493,7 +162493,7 @@ var require_inferers = __commonJS({
162493
162493
  booleanTypeAnnotation,
162494
162494
  buildMatchMemberExpression,
162495
162495
  genericTypeAnnotation,
162496
- identifier: identifier4,
162496
+ identifier: identifier3,
162497
162497
  nullLiteralTypeAnnotation,
162498
162498
  numberTypeAnnotation,
162499
162499
  stringTypeAnnotation,
@@ -162590,20 +162590,20 @@ var require_inferers = __commonJS({
162590
162590
  return nullLiteralTypeAnnotation();
162591
162591
  }
162592
162592
  function RegExpLiteral() {
162593
- return genericTypeAnnotation(identifier4("RegExp"));
162593
+ return genericTypeAnnotation(identifier3("RegExp"));
162594
162594
  }
162595
162595
  function ObjectExpression() {
162596
- return genericTypeAnnotation(identifier4("Object"));
162596
+ return genericTypeAnnotation(identifier3("Object"));
162597
162597
  }
162598
162598
  function ArrayExpression2() {
162599
- return genericTypeAnnotation(identifier4("Array"));
162599
+ return genericTypeAnnotation(identifier3("Array"));
162600
162600
  }
162601
162601
  function RestElement() {
162602
162602
  return ArrayExpression2();
162603
162603
  }
162604
162604
  RestElement.validParent = true;
162605
162605
  function Func() {
162606
- return genericTypeAnnotation(identifier4("Function"));
162606
+ return genericTypeAnnotation(identifier3("Function"));
162607
162607
  }
162608
162608
  var isArrayFrom = buildMatchMemberExpression("Array.from");
162609
162609
  var isObjectKeys = buildMatchMemberExpression("Object.keys");
@@ -162635,13 +162635,13 @@ var require_inferers = __commonJS({
162635
162635
  } = callee;
162636
162636
  if (node.async) {
162637
162637
  if (node.generator) {
162638
- return genericTypeAnnotation(identifier4("AsyncIterator"));
162638
+ return genericTypeAnnotation(identifier3("AsyncIterator"));
162639
162639
  } else {
162640
- return genericTypeAnnotation(identifier4("Promise"));
162640
+ return genericTypeAnnotation(identifier3("Promise"));
162641
162641
  }
162642
162642
  } else {
162643
162643
  if (node.generator) {
162644
- return genericTypeAnnotation(identifier4("Iterator"));
162644
+ return genericTypeAnnotation(identifier3("Iterator"));
162645
162645
  } else if (callee.node.returnType) {
162646
162646
  return callee.node.returnType;
162647
162647
  } else {
@@ -163361,7 +163361,7 @@ var require_replacement = __commonJS({
163361
163361
  conditionalExpression,
163362
163362
  expressionStatement,
163363
163363
  getBindingIdentifiers,
163364
- identifier: identifier4,
163364
+ identifier: identifier3,
163365
163365
  inheritLeadingComments,
163366
163366
  inheritTrailingComments,
163367
163367
  inheritsComments,
@@ -163506,7 +163506,7 @@ var require_replacement = __commonJS({
163506
163506
  callee.get("body").pushContainer("body", returnStatement2(cloneNode(uid)));
163507
163507
  loop.setData("expressionReplacementReturnUid", uid);
163508
163508
  } else {
163509
- uid = identifier4(uid.name);
163509
+ uid = identifier3(uid.name);
163510
163510
  }
163511
163511
  path53.get("expression").replaceWith(assignmentExpression("=", cloneNode(uid), path53.node.expression));
163512
163512
  } else {
@@ -164294,10 +164294,10 @@ var require_populate = __commonJS({
164294
164294
  cloneNode,
164295
164295
  emptyStatement,
164296
164296
  expressionStatement,
164297
- identifier: identifier4,
164297
+ identifier: identifier3,
164298
164298
  isStatement,
164299
164299
  isStringLiteral,
164300
- stringLiteral: stringLiteral3,
164300
+ stringLiteral: stringLiteral2,
164301
164301
  validate: validate2
164302
164302
  } = _t;
164303
164303
  function populatePlaceholders(metadata, replacements) {
@@ -164343,7 +164343,7 @@ var require_populate = __commonJS({
164343
164343
  } = placeholder.resolve(ast);
164344
164344
  if (placeholder.type === "string") {
164345
164345
  if (typeof replacement === "string") {
164346
- replacement = stringLiteral3(replacement);
164346
+ replacement = stringLiteral2(replacement);
164347
164347
  }
164348
164348
  if (!replacement || !isStringLiteral(replacement)) {
164349
164349
  throw new Error("Expected string substitution");
@@ -164355,14 +164355,14 @@ var require_populate = __commonJS({
164355
164355
  } else if (Array.isArray(replacement)) {
164356
164356
  replacement = blockStatement2(replacement);
164357
164357
  } else if (typeof replacement === "string") {
164358
- replacement = expressionStatement(identifier4(replacement));
164358
+ replacement = expressionStatement(identifier3(replacement));
164359
164359
  } else if (!isStatement(replacement)) {
164360
164360
  replacement = expressionStatement(replacement);
164361
164361
  }
164362
164362
  } else {
164363
164363
  if (replacement && !Array.isArray(replacement)) {
164364
164364
  if (typeof replacement === "string") {
164365
- replacement = identifier4(replacement);
164365
+ replacement = identifier3(replacement);
164366
164366
  }
164367
164367
  if (!isStatement(replacement)) {
164368
164368
  replacement = expressionStatement(replacement);
@@ -164371,12 +164371,12 @@ var require_populate = __commonJS({
164371
164371
  }
164372
164372
  } else if (placeholder.type === "param") {
164373
164373
  if (typeof replacement === "string") {
164374
- replacement = identifier4(replacement);
164374
+ replacement = identifier3(replacement);
164375
164375
  }
164376
164376
  if (index === void 0) throw new Error("Assertion failure.");
164377
164377
  } else {
164378
164378
  if (typeof replacement === "string") {
164379
- replacement = identifier4(replacement);
164379
+ replacement = identifier3(replacement);
164380
164380
  }
164381
164381
  if (Array.isArray(replacement)) {
164382
164382
  throw new Error("Cannot replace single expression with an array.");
@@ -164645,7 +164645,7 @@ var require_conversion = __commonJS({
164645
164645
  callExpression,
164646
164646
  conditionalExpression,
164647
164647
  expressionStatement,
164648
- identifier: identifier4,
164648
+ identifier: identifier3,
164649
164649
  isIdentifier: isIdentifier2,
164650
164650
  jsxIdentifier,
164651
164651
  logicalExpression,
@@ -164653,12 +164653,12 @@ var require_conversion = __commonJS({
164653
164653
  memberExpression,
164654
164654
  metaProperty,
164655
164655
  numericLiteral,
164656
- objectExpression: objectExpression2,
164656
+ objectExpression,
164657
164657
  restElement,
164658
164658
  returnStatement: returnStatement2,
164659
164659
  sequenceExpression,
164660
164660
  spreadElement,
164661
- stringLiteral: stringLiteral3,
164661
+ stringLiteral: stringLiteral2,
164662
164662
  super: _super,
164663
164663
  thisExpression,
164664
164664
  toExpression,
@@ -164685,7 +164685,7 @@ var require_conversion = __commonJS({
164685
164685
  throw new ReferenceError("todo");
164686
164686
  }
164687
164687
  if (!this.node.computed) {
164688
- if (isIdentifier2(key2)) key2 = stringLiteral3(key2.name);
164688
+ if (isIdentifier2(key2)) key2 = stringLiteral2(key2.name);
164689
164689
  }
164690
164690
  return key2;
164691
164691
  }
@@ -164763,11 +164763,11 @@ var require_conversion = __commonJS({
164763
164763
  if (checkBinding) {
164764
164764
  fn.parentPath.scope.push({
164765
164765
  id: checkBinding,
164766
- init: objectExpression2([])
164766
+ init: objectExpression([])
164767
164767
  });
164768
164768
  }
164769
- fn.get("body").unshiftContainer("body", expressionStatement(callExpression(this.hub.addHelper("newArrowCheck"), [thisExpression(), checkBinding ? identifier4(checkBinding.name) : identifier4(thisBinding)])));
164770
- fn.replaceWith(callExpression(memberExpression(fn.node, identifier4("bind")), [checkBinding ? identifier4(checkBinding.name) : thisExpression()]));
164769
+ fn.get("body").unshiftContainer("body", expressionStatement(callExpression(this.hub.addHelper("newArrowCheck"), [thisExpression(), checkBinding ? identifier3(checkBinding.name) : identifier3(thisBinding)])));
164770
+ fn.replaceWith(callExpression(memberExpression(fn.node, identifier3("bind")), [checkBinding ? identifier3(checkBinding.name) : thisExpression()]));
164771
164771
  return fn.get("callee.object");
164772
164772
  }
164773
164773
  return fn;
@@ -164827,30 +164827,30 @@ var require_conversion = __commonJS({
164827
164827
  });
164828
164828
  const superBinding = getSuperBinding(thisEnvFn);
164829
164829
  allSuperCalls.forEach((superCall) => {
164830
- const callee = identifier4(superBinding);
164830
+ const callee = identifier3(superBinding);
164831
164831
  callee.loc = superCall.node.callee.loc;
164832
164832
  superCall.get("callee").replaceWith(callee);
164833
164833
  });
164834
164834
  }
164835
164835
  if (argumentsPaths.length > 0) {
164836
164836
  const argumentsBinding = getBinding(thisEnvFn, "arguments", () => {
164837
- const args = () => identifier4("arguments");
164837
+ const args = () => identifier3("arguments");
164838
164838
  if (thisEnvFn.scope.path.isProgram()) {
164839
- return conditionalExpression(binaryExpression("===", unaryExpression("typeof", args()), stringLiteral3("undefined")), thisEnvFn.scope.buildUndefinedNode(), args());
164839
+ return conditionalExpression(binaryExpression("===", unaryExpression("typeof", args()), stringLiteral2("undefined")), thisEnvFn.scope.buildUndefinedNode(), args());
164840
164840
  } else {
164841
164841
  return args();
164842
164842
  }
164843
164843
  });
164844
164844
  argumentsPaths.forEach((argumentsChild) => {
164845
- const argsRef = identifier4(argumentsBinding);
164845
+ const argsRef = identifier3(argumentsBinding);
164846
164846
  argsRef.loc = argumentsChild.node.loc;
164847
164847
  argumentsChild.replaceWith(argsRef);
164848
164848
  });
164849
164849
  }
164850
164850
  if (newTargetPaths.length > 0) {
164851
- const newTargetBinding = getBinding(thisEnvFn, "newtarget", () => metaProperty(identifier4("new"), identifier4("target")));
164851
+ const newTargetBinding = getBinding(thisEnvFn, "newtarget", () => metaProperty(identifier3("new"), identifier3("target")));
164852
164852
  newTargetPaths.forEach((targetChild) => {
164853
- const targetRef = identifier4(newTargetBinding);
164853
+ const targetRef = identifier3(newTargetBinding);
164854
164854
  targetRef.loc = targetChild.node.loc;
164855
164855
  targetChild.replaceWith(targetRef);
164856
164856
  });
@@ -164881,15 +164881,15 @@ var require_conversion = __commonJS({
164881
164881
  const value2 = superParentPath.node.right;
164882
164882
  args.push(value2);
164883
164883
  }
164884
- const call = callExpression(identifier4(superBinding), args);
164884
+ const call = callExpression(identifier3(superBinding), args);
164885
164885
  if (isCall) {
164886
164886
  superParentPath.unshiftContainer("arguments", thisExpression());
164887
- superProp.replaceWith(memberExpression(call, identifier4("call")));
164887
+ superProp.replaceWith(memberExpression(call, identifier3("call")));
164888
164888
  thisPaths.push(superParentPath.get("arguments.0"));
164889
164889
  } else if (isAssignment) {
164890
164890
  superParentPath.replaceWith(call);
164891
164891
  } else if (isTaggedTemplate) {
164892
- superProp.replaceWith(callExpression(memberExpression(call, identifier4("bind"), false), [thisExpression()]));
164892
+ superProp.replaceWith(callExpression(memberExpression(call, identifier3("bind"), false), [thisExpression()]));
164893
164893
  thisPaths.push(superProp.get("arguments.0"));
164894
164894
  } else {
164895
164895
  superProp.replaceWith(call);
@@ -164901,7 +164901,7 @@ var require_conversion = __commonJS({
164901
164901
  thisBinding = getThisBinding(thisEnvFn, inConstructor);
164902
164902
  if (noNewArrows || inConstructor && hasSuperClass(thisEnvFn)) {
164903
164903
  thisPaths.forEach((thisChild) => {
164904
- const thisRef = thisChild.isJSX() ? jsxIdentifier(thisBinding) : identifier4(thisBinding);
164904
+ const thisRef = thisChild.isJSX() ? jsxIdentifier(thisBinding) : identifier3(thisBinding);
164905
164905
  thisRef.loc = thisChild.node.loc;
164906
164906
  thisChild.replaceWith(thisRef);
164907
164907
  });
@@ -164927,12 +164927,12 @@ var require_conversion = __commonJS({
164927
164927
  const object2 = superProp.node.object;
164928
164928
  const property = superProp.node.property;
164929
164929
  assignmentPath.get("left").replaceWith(memberExpression(object2, assignmentExpression("=", tmp, property), true));
164930
- assignmentPath.get("right").replaceWith(rightExpression(isLogicalAssignment ? "=" : op, memberExpression(object2, identifier4(tmp.name), true), value2));
164930
+ assignmentPath.get("right").replaceWith(rightExpression(isLogicalAssignment ? "=" : op, memberExpression(object2, identifier3(tmp.name), true), value2));
164931
164931
  } else {
164932
164932
  const object2 = superProp.node.object;
164933
164933
  const property = superProp.node.property;
164934
164934
  assignmentPath.get("left").replaceWith(memberExpression(object2, property));
164935
- assignmentPath.get("right").replaceWith(rightExpression(isLogicalAssignment ? "=" : op, memberExpression(object2, identifier4(property.name)), value2));
164935
+ assignmentPath.get("right").replaceWith(rightExpression(isLogicalAssignment ? "=" : op, memberExpression(object2, identifier3(property.name)), value2));
164936
164936
  }
164937
164937
  if (isLogicalAssignment) {
164938
164938
  assignmentPath.replaceWith(logicalExpression(op, assignmentPath.node.left, assignmentPath.node.right));
@@ -164944,9 +164944,9 @@ var require_conversion = __commonJS({
164944
164944
  const updateExpr = superProp.parentPath;
164945
164945
  const tmp = superProp.scope.generateDeclaredUidIdentifier("tmp");
164946
164946
  const computedKey = superProp.node.computed ? superProp.scope.generateDeclaredUidIdentifier("prop") : null;
164947
- const parts = [assignmentExpression("=", tmp, memberExpression(superProp.node.object, computedKey ? assignmentExpression("=", computedKey, superProp.node.property) : superProp.node.property, superProp.node.computed)), assignmentExpression("=", memberExpression(superProp.node.object, computedKey ? identifier4(computedKey.name) : superProp.node.property, superProp.node.computed), binaryExpression(superProp.parentPath.node.operator[0], identifier4(tmp.name), numericLiteral(1)))];
164947
+ const parts = [assignmentExpression("=", tmp, memberExpression(superProp.node.object, computedKey ? assignmentExpression("=", computedKey, superProp.node.property) : superProp.node.property, superProp.node.computed)), assignmentExpression("=", memberExpression(superProp.node.object, computedKey ? identifier3(computedKey.name) : superProp.node.property, superProp.node.computed), binaryExpression(superProp.parentPath.node.operator[0], identifier3(tmp.name), numericLiteral(1)))];
164948
164948
  if (!superProp.parentPath.node.prefix) {
164949
- parts.push(identifier4(tmp.name));
164949
+ parts.push(identifier3(tmp.name));
164950
164950
  }
164951
164951
  updateExpr.replaceWith(sequenceExpression(parts));
164952
164952
  const left = updateExpr.get("expressions.0.right");
@@ -164973,7 +164973,7 @@ var require_conversion = __commonJS({
164973
164973
  if (!child.get("callee").isSuper()) return;
164974
164974
  if (supers.has(child.node)) return;
164975
164975
  supers.add(child.node);
164976
- child.replaceWithMultiple([child.node, assignmentExpression("=", identifier4(thisBinding), identifier4("this"))]);
164976
+ child.replaceWithMultiple([child.node, assignmentExpression("=", identifier3(thisBinding), identifier3("this"))]);
164977
164977
  }
164978
164978
  });
164979
164979
  function getThisBinding(thisEnvFn, inConstructor) {
@@ -164988,7 +164988,7 @@ var require_conversion = __commonJS({
164988
164988
  function getSuperBinding(thisEnvFn) {
164989
164989
  return getBinding(thisEnvFn, "supercall", () => {
164990
164990
  const argsBinding = thisEnvFn.scope.generateUidIdentifier("args");
164991
- return arrowFunctionExpression([restElement(argsBinding)], callExpression(_super(), [spreadElement(identifier4(argsBinding.name))]));
164991
+ return arrowFunctionExpression([restElement(argsBinding)], callExpression(_super(), [spreadElement(identifier3(argsBinding.name))]));
164992
164992
  });
164993
164993
  }
164994
164994
  function getSuperPropBinding(thisEnvFn, isAssignment, propName) {
@@ -164997,16 +164997,16 @@ var require_conversion = __commonJS({
164997
164997
  const argsList = [];
164998
164998
  let fnBody;
164999
164999
  if (propName) {
165000
- fnBody = memberExpression(_super(), identifier4(propName));
165000
+ fnBody = memberExpression(_super(), identifier3(propName));
165001
165001
  } else {
165002
165002
  const method = thisEnvFn.scope.generateUidIdentifier("prop");
165003
165003
  argsList.unshift(method);
165004
- fnBody = memberExpression(_super(), identifier4(method.name), true);
165004
+ fnBody = memberExpression(_super(), identifier3(method.name), true);
165005
165005
  }
165006
165006
  if (isAssignment) {
165007
165007
  const valueIdent = thisEnvFn.scope.generateUidIdentifier("value");
165008
165008
  argsList.push(valueIdent);
165009
- fnBody = assignmentExpression("=", fnBody, identifier4(valueIdent.name));
165009
+ fnBody = assignmentExpression("=", fnBody, identifier3(valueIdent.name));
165010
165010
  }
165011
165011
  return arrowFunctionExpression(argsList, fnBody);
165012
165012
  });
@@ -165130,7 +165130,7 @@ var require_conversion = __commonJS({
165130
165130
  id2 = scope.generateUidIdentifier(id2.name);
165131
165131
  }
165132
165132
  const updatedDeclaration = standaloneDeclaration ? declaration.node : variableDeclaration2("var", [variableDeclarator2(cloneNode(id2), declaration.node)]);
165133
- const updatedExportDeclaration = exportNamedDeclaration(null, [exportSpecifier(cloneNode(id2), identifier4("default"))]);
165133
+ const updatedExportDeclaration = exportNamedDeclaration(null, [exportSpecifier(cloneNode(id2), identifier3("default"))]);
165134
165134
  this.insertAfter(updatedExportDeclaration);
165135
165135
  this.replaceWith(updatedDeclaration);
165136
165136
  if (needBindingRegistration) {
@@ -165142,7 +165142,7 @@ var require_conversion = __commonJS({
165142
165142
  }
165143
165143
  const bindingIdentifiers = declaration.getOuterBindingIdentifiers();
165144
165144
  const specifiers = Object.keys(bindingIdentifiers).map((name18) => {
165145
- return exportSpecifier(identifier4(name18), identifier4(name18));
165145
+ return exportSpecifier(identifier3(name18), identifier3(name18));
165146
165146
  });
165147
165147
  const aliasDeclar = exportNamedDeclaration(null, specifiers);
165148
165148
  this.insertAfter(aliasDeclar);
@@ -165175,7 +165175,7 @@ var require_conversion = __commonJS({
165175
165175
  return null;
165176
165176
  }
165177
165177
  name18 = toBindingIdentifierName(name18.replace(/[/ ]/g, "_"));
165178
- const id2 = identifier4(name18);
165178
+ const id2 = identifier3(name18);
165179
165179
  inherits2(id2, res.originalNode);
165180
165180
  const state = {
165181
165181
  needsRename: false,
@@ -168113,7 +168113,7 @@ var require_lib15 = __commonJS({
168113
168113
  var _helpersGenerated = require_helpers_generated();
168114
168114
  var {
168115
168115
  cloneNode,
168116
- identifier: identifier4
168116
+ identifier: identifier3
168117
168117
  } = _t;
168118
168118
  function deep(obj, path53, value2) {
168119
168119
  try {
@@ -168151,12 +168151,12 @@ var require_lib15 = __commonJS({
168151
168151
  }
168152
168152
  if (newName !== name18) {
168153
168153
  for (const path53 of paths) {
168154
- deep(ast, path53, identifier4(newName));
168154
+ deep(ast, path53, identifier3(newName));
168155
168155
  }
168156
168156
  }
168157
168157
  }
168158
168158
  for (const [name18, paths] of (Object.entries || ((o) => Object.keys(o).map((k) => [k, o[k]])))(dependencies)) {
168159
- const ref = typeof getDependency === "function" && getDependency(name18) || identifier4(name18);
168159
+ const ref = typeof getDependency === "function" && getDependency(name18) || identifier3(name18);
168160
168160
  for (const path53 of paths) {
168161
168161
  deep(ast, path53, cloneNode(ref));
168162
168162
  }
@@ -168236,13 +168236,13 @@ var require_import_builder = __commonJS({
168236
168236
  callExpression,
168237
168237
  cloneNode,
168238
168238
  expressionStatement,
168239
- identifier: identifier4,
168240
- importDeclaration: importDeclaration2,
168239
+ identifier: identifier3,
168240
+ importDeclaration,
168241
168241
  importDefaultSpecifier,
168242
168242
  importNamespaceSpecifier,
168243
- importSpecifier: importSpecifier2,
168243
+ importSpecifier,
168244
168244
  memberExpression,
168245
- stringLiteral: stringLiteral3,
168245
+ stringLiteral: stringLiteral2,
168246
168246
  variableDeclaration: variableDeclaration2,
168247
168247
  variableDeclarator: variableDeclarator2
168248
168248
  } = _t;
@@ -168262,11 +168262,11 @@ var require_import_builder = __commonJS({
168262
168262
  };
168263
168263
  }
168264
168264
  import() {
168265
- this._statements.push(importDeclaration2([], stringLiteral3(this._importedSource)));
168265
+ this._statements.push(importDeclaration([], stringLiteral2(this._importedSource)));
168266
168266
  return this;
168267
168267
  }
168268
168268
  require() {
168269
- this._statements.push(expressionStatement(callExpression(identifier4("require"), [stringLiteral3(this._importedSource)])));
168269
+ this._statements.push(expressionStatement(callExpression(identifier3("require"), [stringLiteral2(this._importedSource)])));
168270
168270
  return this;
168271
168271
  }
168272
168272
  namespace(name18 = "namespace") {
@@ -168293,7 +168293,7 @@ var require_import_builder = __commonJS({
168293
168293
  const statement = this._statements[this._statements.length - 1];
168294
168294
  _assert(statement.type === "ImportDeclaration");
168295
168295
  _assert(statement.specifiers.length === 0);
168296
- statement.specifiers = [importSpecifier2(id2, identifier4(importName))];
168296
+ statement.specifiers = [importSpecifier(id2, identifier3(importName))];
168297
168297
  this._resultName = cloneNode(id2);
168298
168298
  return this;
168299
168299
  }
@@ -168330,17 +168330,17 @@ var require_import_builder = __commonJS({
168330
168330
  prop(name18) {
168331
168331
  const statement = this._statements[this._statements.length - 1];
168332
168332
  if (statement.type === "ExpressionStatement") {
168333
- statement.expression = memberExpression(statement.expression, identifier4(name18));
168333
+ statement.expression = memberExpression(statement.expression, identifier3(name18));
168334
168334
  } else if (statement.type === "VariableDeclaration") {
168335
168335
  _assert(statement.declarations.length === 1);
168336
- statement.declarations[0].init = memberExpression(statement.declarations[0].init, identifier4(name18));
168336
+ statement.declarations[0].init = memberExpression(statement.declarations[0].init, identifier3(name18));
168337
168337
  } else {
168338
168338
  _assert.fail("Unexpected type:" + statement.type);
168339
168339
  }
168340
168340
  return this;
168341
168341
  }
168342
168342
  read(name18) {
168343
- this._resultName = memberExpression(this._resultName, identifier4(name18));
168343
+ this._resultName = memberExpression(this._resultName, identifier3(name18));
168344
168344
  }
168345
168345
  };
168346
168346
  exports2.default = ImportBuilder;
@@ -168376,8 +168376,8 @@ var require_import_injector = __commonJS({
168376
168376
  var _importBuilder = require_import_builder();
168377
168377
  var _isModule = require_is_module();
168378
168378
  var {
168379
- identifier: identifier4,
168380
- importSpecifier: importSpecifier2,
168379
+ identifier: identifier3,
168380
+ importSpecifier,
168381
168381
  numericLiteral,
168382
168382
  sequenceExpression,
168383
168383
  isImportDeclaration
@@ -168659,7 +168659,7 @@ var require_import_injector = __commonJS({
168659
168659
  if (hasNamespaceImport(target) || hasNamespaceImport(source2)) return false;
168660
168660
  if (hasDefaultImport(source2)) {
168661
168661
  if (hasDefaultImport(target)) {
168662
- source2.specifiers[0] = importSpecifier2(source2.specifiers[0].local, identifier4("default"));
168662
+ source2.specifiers[0] = importSpecifier(source2.specifiers[0].local, identifier3("default"));
168663
168663
  } else {
168664
168664
  target.specifiers.unshift(source2.specifiers.shift());
168665
168665
  }
@@ -170318,33 +170318,33 @@ var require_semver4 = __commonJS({
170318
170318
  }
170319
170319
  } while (++i3);
170320
170320
  };
170321
- SemVer.prototype.inc = function(release, identifier4) {
170321
+ SemVer.prototype.inc = function(release, identifier3) {
170322
170322
  switch (release) {
170323
170323
  case "premajor":
170324
170324
  this.prerelease.length = 0;
170325
170325
  this.patch = 0;
170326
170326
  this.minor = 0;
170327
170327
  this.major++;
170328
- this.inc("pre", identifier4);
170328
+ this.inc("pre", identifier3);
170329
170329
  break;
170330
170330
  case "preminor":
170331
170331
  this.prerelease.length = 0;
170332
170332
  this.patch = 0;
170333
170333
  this.minor++;
170334
- this.inc("pre", identifier4);
170334
+ this.inc("pre", identifier3);
170335
170335
  break;
170336
170336
  case "prepatch":
170337
170337
  this.prerelease.length = 0;
170338
- this.inc("patch", identifier4);
170339
- this.inc("pre", identifier4);
170338
+ this.inc("patch", identifier3);
170339
+ this.inc("pre", identifier3);
170340
170340
  break;
170341
170341
  // If the input is a non-prerelease version, this acts the same as
170342
170342
  // prepatch.
170343
170343
  case "prerelease":
170344
170344
  if (this.prerelease.length === 0) {
170345
- this.inc("patch", identifier4);
170345
+ this.inc("patch", identifier3);
170346
170346
  }
170347
- this.inc("pre", identifier4);
170347
+ this.inc("pre", identifier3);
170348
170348
  break;
170349
170349
  case "major":
170350
170350
  if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
@@ -170384,13 +170384,13 @@ var require_semver4 = __commonJS({
170384
170384
  this.prerelease.push(0);
170385
170385
  }
170386
170386
  }
170387
- if (identifier4) {
170388
- if (this.prerelease[0] === identifier4) {
170387
+ if (identifier3) {
170388
+ if (this.prerelease[0] === identifier3) {
170389
170389
  if (isNaN(this.prerelease[1])) {
170390
- this.prerelease = [identifier4, 0];
170390
+ this.prerelease = [identifier3, 0];
170391
170391
  }
170392
170392
  } else {
170393
- this.prerelease = [identifier4, 0];
170393
+ this.prerelease = [identifier3, 0];
170394
170394
  }
170395
170395
  }
170396
170396
  break;
@@ -170402,13 +170402,13 @@ var require_semver4 = __commonJS({
170402
170402
  return this;
170403
170403
  };
170404
170404
  exports2.inc = inc;
170405
- function inc(version2, release, loose, identifier4) {
170405
+ function inc(version2, release, loose, identifier3) {
170406
170406
  if (typeof loose === "string") {
170407
- identifier4 = loose;
170407
+ identifier3 = loose;
170408
170408
  loose = void 0;
170409
170409
  }
170410
170410
  try {
170411
- return new SemVer(version2, loose).inc(release, identifier4).version;
170411
+ return new SemVer(version2, loose).inc(release, identifier3).version;
170412
170412
  } catch (er) {
170413
170413
  return null;
170414
170414
  }
@@ -171436,11 +171436,11 @@ var require_build_external_helpers = __commonJS({
171436
171436
  exportSpecifier,
171437
171437
  expressionStatement,
171438
171438
  functionExpression,
171439
- identifier: identifier4,
171439
+ identifier: identifier3,
171440
171440
  memberExpression,
171441
- objectExpression: objectExpression2,
171441
+ objectExpression,
171442
171442
  program,
171443
- stringLiteral: stringLiteral3,
171443
+ stringLiteral: stringLiteral2,
171444
171444
  unaryExpression,
171445
171445
  variableDeclaration: variableDeclaration2,
171446
171446
  variableDeclarator: variableDeclarator2
@@ -171459,11 +171459,11 @@ var require_build_external_helpers = __commonJS({
171459
171459
  });
171460
171460
  `(replacements);
171461
171461
  function buildGlobal(allowlist) {
171462
- const namespace = identifier4("babelHelpers");
171462
+ const namespace = identifier3("babelHelpers");
171463
171463
  const body = [];
171464
- const container = functionExpression(null, [identifier4("global")], blockStatement2(body));
171465
- const tree = program([expressionStatement(callExpression(container, [conditionalExpression(binaryExpression("===", unaryExpression("typeof", identifier4("global")), stringLiteral3("undefined")), identifier4("self"), identifier4("global"))]))]);
171466
- body.push(variableDeclaration2("var", [variableDeclarator2(namespace, assignmentExpression("=", memberExpression(identifier4("global"), namespace), objectExpression2([])))]));
171464
+ const container = functionExpression(null, [identifier3("global")], blockStatement2(body));
171465
+ const tree = program([expressionStatement(callExpression(container, [conditionalExpression(binaryExpression("===", unaryExpression("typeof", identifier3("global")), stringLiteral2("undefined")), identifier3("self"), identifier3("global"))]))]);
171466
+ body.push(variableDeclaration2("var", [variableDeclarator2(namespace, assignmentExpression("=", memberExpression(identifier3("global"), namespace), objectExpression([])))]));
171467
171467
  buildHelpers(body, namespace, allowlist);
171468
171468
  return tree;
171469
171469
  }
@@ -171471,28 +171471,28 @@ var require_build_external_helpers = __commonJS({
171471
171471
  const body = [];
171472
171472
  const refs = buildHelpers(body, null, allowlist);
171473
171473
  body.unshift(exportNamedDeclaration(null, Object.keys(refs).map((name18) => {
171474
- return exportSpecifier(cloneNode(refs[name18]), identifier4(name18));
171474
+ return exportSpecifier(cloneNode(refs[name18]), identifier3(name18));
171475
171475
  })));
171476
171476
  return program(body, [], "module");
171477
171477
  }
171478
171478
  function buildUmd(allowlist) {
171479
- const namespace = identifier4("babelHelpers");
171479
+ const namespace = identifier3("babelHelpers");
171480
171480
  const body = [];
171481
- body.push(variableDeclaration2("var", [variableDeclarator2(namespace, identifier4("global"))]));
171481
+ body.push(variableDeclaration2("var", [variableDeclarator2(namespace, identifier3("global"))]));
171482
171482
  buildHelpers(body, namespace, allowlist);
171483
171483
  return program([buildUmdWrapper({
171484
- FACTORY_PARAMETERS: identifier4("global"),
171485
- BROWSER_ARGUMENTS: assignmentExpression("=", memberExpression(identifier4("root"), namespace), objectExpression2([])),
171486
- COMMON_ARGUMENTS: identifier4("exports"),
171487
- AMD_ARGUMENTS: arrayExpression([stringLiteral3("exports")]),
171484
+ FACTORY_PARAMETERS: identifier3("global"),
171485
+ BROWSER_ARGUMENTS: assignmentExpression("=", memberExpression(identifier3("root"), namespace), objectExpression([])),
171486
+ COMMON_ARGUMENTS: identifier3("exports"),
171487
+ AMD_ARGUMENTS: arrayExpression([stringLiteral2("exports")]),
171488
171488
  FACTORY_BODY: body,
171489
- UMD_ROOT: identifier4("this")
171489
+ UMD_ROOT: identifier3("this")
171490
171490
  })]);
171491
171491
  }
171492
171492
  function buildVar(allowlist) {
171493
- const namespace = identifier4("babelHelpers");
171493
+ const namespace = identifier3("babelHelpers");
171494
171494
  const body = [];
171495
- body.push(variableDeclaration2("var", [variableDeclarator2(namespace, objectExpression2([]))]));
171495
+ body.push(variableDeclaration2("var", [variableDeclarator2(namespace, objectExpression([]))]));
171496
171496
  const tree = program(body);
171497
171497
  buildHelpers(body, namespace, allowlist);
171498
171498
  body.push(expressionStatement(namespace));
@@ -171500,7 +171500,7 @@ var require_build_external_helpers = __commonJS({
171500
171500
  }
171501
171501
  function buildHelpers(body, namespace, allowlist) {
171502
171502
  const getHelperReference = (name18) => {
171503
- return namespace ? memberExpression(namespace, identifier4(name18)) : identifier4(`_${name18}`);
171503
+ return namespace ? memberExpression(namespace, identifier3(name18)) : identifier3(`_${name18}`);
171504
171504
  };
171505
171505
  const refs = {};
171506
171506
  helpers().list.forEach(function(name18) {
@@ -180744,7 +180744,7 @@ var require_lib23 = __commonJS({
180744
180744
  callExpression,
180745
180745
  cloneNode,
180746
180746
  conditionalExpression,
180747
- identifier: identifier4,
180747
+ identifier: identifier3,
180748
180748
  isMemberExpression: isMemberExpression2,
180749
180749
  isOptionalCallExpression,
180750
180750
  isOptionalMemberExpression,
@@ -180797,7 +180797,7 @@ var require_lib23 = __commonJS({
180797
180797
  const object2 = callee.node.object;
180798
180798
  const context2 = path53.scope.maybeGenerateMemoised(object2);
180799
180799
  callee.get("object").replaceWith(assignmentExpression("=", context2, object2));
180800
- return callExpression(memberExpression(base, identifier4("call")), [context2, ...path53.node.arguments]);
180800
+ return callExpression(memberExpression(base, identifier3("call")), [context2, ...path53.node.arguments]);
180801
180801
  }
180802
180802
  return callExpression(base, path53.node.arguments);
180803
180803
  }
@@ -180957,7 +180957,7 @@ var require_lib23 = __commonJS({
180957
180957
  }
180958
180958
  if (context2) {
180959
180959
  const endParent = endParentPath.node;
180960
- endParentPath.replaceWith(optionalCallExpression(optionalMemberExpression(endParent.callee, identifier4("call"), false, true), [cloneNode(context2), ...endParent.arguments], false));
180960
+ endParentPath.replaceWith(optionalCallExpression(optionalMemberExpression(endParent.callee, identifier3("call"), false, true), [cloneNode(context2), ...endParent.arguments], false));
180961
180961
  }
180962
180962
  return;
180963
180963
  }
@@ -181086,7 +181086,7 @@ var require_lib24 = __commonJS({
181086
181086
  var _t = require_lib7();
181087
181087
  var {
181088
181088
  callExpression,
181089
- identifier: identifier4,
181089
+ identifier: identifier3,
181090
181090
  isIdentifier: isIdentifier2,
181091
181091
  isSpreadElement,
181092
181092
  memberExpression,
@@ -181098,14 +181098,14 @@ var require_lib24 = __commonJS({
181098
181098
  name: "arguments"
181099
181099
  })) {
181100
181100
  if (optional) {
181101
- return optionalCallExpression(optionalMemberExpression(callee, identifier4("apply"), false, true), [thisNode, args[0].argument], false);
181101
+ return optionalCallExpression(optionalMemberExpression(callee, identifier3("apply"), false, true), [thisNode, args[0].argument], false);
181102
181102
  }
181103
- return callExpression(memberExpression(callee, identifier4("apply")), [thisNode, args[0].argument]);
181103
+ return callExpression(memberExpression(callee, identifier3("apply")), [thisNode, args[0].argument]);
181104
181104
  } else {
181105
181105
  if (optional) {
181106
- return optionalCallExpression(optionalMemberExpression(callee, identifier4("call"), false, true), [thisNode, ...args], false);
181106
+ return optionalCallExpression(optionalMemberExpression(callee, identifier3("call"), false, true), [thisNode, ...args], false);
181107
181107
  }
181108
- return callExpression(memberExpression(callee, identifier4("call")), [thisNode, ...args]);
181108
+ return callExpression(memberExpression(callee, identifier3("call")), [thisNode, ...args]);
181109
181109
  }
181110
181110
  }
181111
181111
  }
@@ -181128,10 +181128,10 @@ var require_lib25 = __commonJS({
181128
181128
  assignmentExpression,
181129
181129
  callExpression,
181130
181130
  cloneNode,
181131
- identifier: identifier4,
181131
+ identifier: identifier3,
181132
181132
  memberExpression,
181133
181133
  sequenceExpression,
181134
- stringLiteral: stringLiteral3,
181134
+ stringLiteral: stringLiteral2,
181135
181135
  thisExpression
181136
181136
  } = _core.types;
181137
181137
  {
@@ -181195,11 +181195,11 @@ var require_lib25 = __commonJS({
181195
181195
  if (computed) {
181196
181196
  return cloneNode(property);
181197
181197
  }
181198
- return stringLiteral3(property.name);
181198
+ return stringLiteral2(property.name);
181199
181199
  },
181200
181200
  _getPrototypeOfExpression() {
181201
181201
  const objectRef = cloneNode(this.getObjectRef());
181202
- const targetRef = this.isStatic || this.isPrivateMethod ? objectRef : memberExpression(objectRef, identifier4("prototype"));
181202
+ const targetRef = this.isStatic || this.isPrivateMethod ? objectRef : memberExpression(objectRef, identifier3("prototype"));
181203
181203
  return callExpression(this.file.addHelper("getPrototypeOf"), [targetRef]);
181204
181204
  },
181205
181205
  get(superMember) {
@@ -181275,11 +181275,11 @@ var require_lib25 = __commonJS({
181275
181275
  if (computed) {
181276
181276
  return cloneNode(property);
181277
181277
  }
181278
- return stringLiteral3(property.name);
181278
+ return stringLiteral2(property.name);
181279
181279
  },
181280
181280
  _getPrototypeOfExpression() {
181281
181281
  const objectRef = cloneNode(this.getObjectRef());
181282
- const targetRef = this.isStatic || this.isPrivateMethod ? objectRef : memberExpression(objectRef, identifier4("prototype"));
181282
+ const targetRef = this.isStatic || this.isPrivateMethod ? objectRef : memberExpression(objectRef, identifier3("prototype"));
181283
181283
  return callExpression(this.file.addHelper("getPrototypeOf"), [targetRef]);
181284
181284
  },
181285
181285
  get(superMember) {
@@ -181336,10 +181336,10 @@ var require_lib25 = __commonJS({
181336
181336
  let object2;
181337
181337
  if (isStatic) {
181338
181338
  var _getSuperRef;
181339
- object2 = (_getSuperRef = getSuperRef()) != null ? _getSuperRef : memberExpression(identifier4("Function"), identifier4("prototype"));
181339
+ object2 = (_getSuperRef = getSuperRef()) != null ? _getSuperRef : memberExpression(identifier3("Function"), identifier3("prototype"));
181340
181340
  } else {
181341
181341
  var _getSuperRef2;
181342
- object2 = memberExpression((_getSuperRef2 = getSuperRef()) != null ? _getSuperRef2 : identifier4("Object"), identifier4("prototype"));
181342
+ object2 = memberExpression((_getSuperRef2 = getSuperRef()) != null ? _getSuperRef2 : identifier3("Object"), identifier3("prototype"));
181343
181343
  }
181344
181344
  return memberExpression(object2, prop, computed);
181345
181345
  },
@@ -263097,16 +263097,16 @@ var require_semver3 = __commonJS2({
263097
263097
  }
263098
263098
  // preminor will bump the version up to the next minor release, and immediately
263099
263099
  // down to pre-release. premajor and prepatch work the same way.
263100
- inc(release, identifier4, identifierBase) {
263100
+ inc(release, identifier3, identifierBase) {
263101
263101
  if (release.startsWith("pre")) {
263102
- if (!identifier4 && identifierBase === false) {
263102
+ if (!identifier3 && identifierBase === false) {
263103
263103
  throw new Error("invalid increment argument: identifier is empty");
263104
263104
  }
263105
- if (identifier4) {
263105
+ if (identifier3) {
263106
263106
  const r = new RegExp(`^${this.options.loose ? src4[t13.PRERELEASELOOSE] : src4[t13.PRERELEASE]}$`);
263107
- const match3 = `-${identifier4}`.match(r);
263108
- if (!match3 || match3[1] !== identifier4) {
263109
- throw new Error(`invalid identifier: ${identifier4}`);
263107
+ const match3 = `-${identifier3}`.match(r);
263108
+ if (!match3 || match3[1] !== identifier3) {
263109
+ throw new Error(`invalid identifier: ${identifier3}`);
263110
263110
  }
263111
263111
  }
263112
263112
  }
@@ -263116,26 +263116,26 @@ var require_semver3 = __commonJS2({
263116
263116
  this.patch = 0;
263117
263117
  this.minor = 0;
263118
263118
  this.major++;
263119
- this.inc("pre", identifier4, identifierBase);
263119
+ this.inc("pre", identifier3, identifierBase);
263120
263120
  break;
263121
263121
  case "preminor":
263122
263122
  this.prerelease.length = 0;
263123
263123
  this.patch = 0;
263124
263124
  this.minor++;
263125
- this.inc("pre", identifier4, identifierBase);
263125
+ this.inc("pre", identifier3, identifierBase);
263126
263126
  break;
263127
263127
  case "prepatch":
263128
263128
  this.prerelease.length = 0;
263129
- this.inc("patch", identifier4, identifierBase);
263130
- this.inc("pre", identifier4, identifierBase);
263129
+ this.inc("patch", identifier3, identifierBase);
263130
+ this.inc("pre", identifier3, identifierBase);
263131
263131
  break;
263132
263132
  // If the input is a non-prerelease version, this acts the same as
263133
263133
  // prepatch.
263134
263134
  case "prerelease":
263135
263135
  if (this.prerelease.length === 0) {
263136
- this.inc("patch", identifier4, identifierBase);
263136
+ this.inc("patch", identifier3, identifierBase);
263137
263137
  }
263138
- this.inc("pre", identifier4, identifierBase);
263138
+ this.inc("pre", identifier3, identifierBase);
263139
263139
  break;
263140
263140
  case "release":
263141
263141
  if (this.prerelease.length === 0) {
@@ -263179,18 +263179,18 @@ var require_semver3 = __commonJS2({
263179
263179
  }
263180
263180
  }
263181
263181
  if (i2 === -1) {
263182
- if (identifier4 === this.prerelease.join(".") && identifierBase === false) {
263182
+ if (identifier3 === this.prerelease.join(".") && identifierBase === false) {
263183
263183
  throw new Error("invalid increment argument: identifier already exists");
263184
263184
  }
263185
263185
  this.prerelease.push(base);
263186
263186
  }
263187
263187
  }
263188
- if (identifier4) {
263189
- let prerelease = [identifier4, base];
263188
+ if (identifier3) {
263189
+ let prerelease = [identifier3, base];
263190
263190
  if (identifierBase === false) {
263191
- prerelease = [identifier4];
263191
+ prerelease = [identifier3];
263192
263192
  }
263193
- if (compareIdentifiers(this.prerelease[0], identifier4) === 0) {
263193
+ if (compareIdentifiers(this.prerelease[0], identifier3) === 0) {
263194
263194
  if (isNaN(this.prerelease[1])) {
263195
263195
  this.prerelease = prerelease;
263196
263196
  }
@@ -279218,8 +279218,8 @@ async function extractImportsFromCode(code) {
279218
279218
  const allImports = [];
279219
279219
  for (const imp of imports) {
279220
279220
  if (imp.d === -1) {
279221
- const importSpecifier2 = imp.n || code.substring(imp.s, imp.e);
279222
- const cleanedImport = typeof importSpecifier2 === "string" ? importSpecifier2.replace(/['"\`]/g, "") : "";
279221
+ const importSpecifier = imp.n || code.substring(imp.s, imp.e);
279222
+ const cleanedImport = typeof importSpecifier === "string" ? importSpecifier.replace(/['"\`]/g, "") : "";
279223
279223
  if (cleanedImport && !cleanedImport.startsWith("http")) {
279224
279224
  allImports.push(cleanedImport);
279225
279225
  }
@@ -308022,8 +308022,8 @@ var ComponentsManager = class _ComponentsManager extends EventEmitter6 {
308022
308022
  // TODO: do we want to handle named exports?
308023
308023
  ExportDefaultDeclaration: (path53) => {
308024
308024
  if (path53.get("declaration")?.isCallExpression()) {
308025
- const identifier4 = path53.get("declaration").get("callee").find((path54) => path54.isIdentifier() && path54.node.name === "registerComponent");
308026
- if (!identifier4) {
308025
+ const identifier3 = path53.get("declaration").get("callee").find((path54) => path54.isIdentifier() && path54.node.name === "registerComponent");
308026
+ if (!identifier3) {
308027
308027
  path53.skip();
308028
308028
  return;
308029
308029
  }
@@ -308284,18 +308284,18 @@ function addImport({ path: path53, importName, importPath, isDefaultImport, onAd
308284
308284
  return;
308285
308285
  }
308286
308286
  const existingImportDeclaration = programPath.get("body").find((p) => p.isImportDeclaration() && p.node.source.value === importPath);
308287
- const importSpecifier2 = isDefaultImport ? import_types7.default.importDefaultSpecifier(import_types7.default.identifier(importName)) : import_types7.default.importSpecifier(import_types7.default.identifier(importName), import_types7.default.identifier(importName));
308287
+ const importSpecifier = isDefaultImport ? import_types7.default.importDefaultSpecifier(import_types7.default.identifier(importName)) : import_types7.default.importSpecifier(import_types7.default.identifier(importName), import_types7.default.identifier(importName));
308288
308288
  if (!existingImportDeclaration) {
308289
- programPath.unshiftContainer("body", import_types7.default.importDeclaration([importSpecifier2], import_types7.default.stringLiteral(importPath)));
308289
+ programPath.unshiftContainer("body", import_types7.default.importDeclaration([importSpecifier], import_types7.default.stringLiteral(importPath)));
308290
308290
  } else {
308291
308291
  const existingSpecifier = existingImportDeclaration.node.specifiers.find((specifier) => specifier.type === "ImportSpecifier" && specifier.local.name === importName);
308292
308292
  if (existingSpecifier) {
308293
308293
  return;
308294
308294
  }
308295
308295
  if (isDefaultImport) {
308296
- existingImportDeclaration.node.specifiers.unshift(importSpecifier2);
308296
+ existingImportDeclaration.node.specifiers.unshift(importSpecifier);
308297
308297
  } else {
308298
- existingImportDeclaration.node.specifiers.push(importSpecifier2);
308298
+ existingImportDeclaration.node.specifiers.push(importSpecifier);
308299
308299
  }
308300
308300
  }
308301
308301
  onAdd();
@@ -309865,175 +309865,18 @@ function getPageName(file) {
309865
309865
  init_cjs_shims();
309866
309866
  var import_core2 = __toESM(require_lib33(), 1);
309867
309867
  var import_parser4 = __toESM(require_lib9(), 1);
309868
- var import_types17 = __toESM(require_lib7(), 1);
309869
- var t7 = __toESM(require_lib7(), 1);
309870
-
309871
- // ../../../vite-plugin-file-sync/dist/refactor/javascript.js
309872
- init_cjs_shims();
309873
- var import_types14 = __toESM(require_lib7(), 1);
309874
- var import_shared26 = __toESM(require_dist2(), 1);
309875
- function renameEntityInJavascript({ oldName, newName, nodePath, parentBinding, checkFunctionBinding = false }) {
309876
- const functionVisitor = checkFunctionBinding ? {
309877
- Function(path53) {
309878
- const paramBindings = path53.scope.getAllBindingsOfKind("param");
309879
- for (const binding of Object.values(paramBindings)) {
309880
- const bindingPath = binding.path;
309881
- if (bindingPath.isObjectPattern()) {
309882
- const properties = bindingPath.get("properties");
309883
- for (const property of properties) {
309884
- if (!property.isObjectProperty())
309885
- continue;
309886
- const keyName = getIdentiferName(property.get("key").node);
309887
- if (keyName === oldName && !property.node.shorthand) {
309888
- property.get("key").replaceInline(import_types14.default.identifier(newName));
309889
- path53.skip();
309890
- return;
309891
- }
309892
- }
309893
- }
309894
- }
309895
- if (path53.scope.hasBinding(oldName) && !parentBinding) {
309896
- const binding = path53.scope.getBinding(oldName);
309897
- path53.scope.rename(oldName, newName);
309898
- const bindingPath = binding.path;
309899
- if (bindingPath.isObjectPattern()) {
309900
- for (const property of bindingPath.get("properties")) {
309901
- if (!property.isObjectProperty())
309902
- continue;
309903
- const keyName = getIdentiferName(property.get("key").node);
309904
- if (keyName === oldName) {
309905
- property.get("key").replaceInline(import_types14.default.identifier(newName));
309906
- property.get("value").replaceInline(import_types14.default.identifier(newName));
309907
- property.set("shorthand", true);
309908
- }
309909
- }
309910
- }
309911
- path53.skip();
309912
- return;
309913
- }
309914
- const ids = path53.getBindingIdentifierPaths();
309915
- for (const bindingName of Object.keys(ids)) {
309916
- const binding = path53.scope.getBinding(bindingName);
309917
- if (!binding || binding.kind !== "param") {
309918
- continue;
309919
- }
309920
- for (const reference of binding.referencePaths) {
309921
- if (reference.parentPath?.isMemberExpression() || reference.parentPath?.isOptionalMemberExpression()) {
309922
- let property = reference.parentPath.get("property");
309923
- if (Array.isArray(property)) {
309924
- property = property[0];
309925
- }
309926
- if (property.isIdentifier() && property.node.name === parentBinding && reference.parentPath.parentPath?.isMemberExpression()) {
309927
- handleMemberExpression(reference.parentPath.parentPath);
309928
- path53.skip();
309929
- return;
309930
- }
309931
- if (property.isIdentifier() && property.node.name === oldName) {
309932
- property.replaceInline(import_types14.default.identifier(newName));
309933
- path53.skip();
309934
- }
309935
- }
309936
- }
309937
- }
309938
- }
309939
- } : {};
309940
- let traversePath = nodePath;
309941
- if (traversePath.isFunction()) {
309942
- traversePath = traversePath.parentPath;
309943
- }
309944
- function handleMemberExpression(path53) {
309945
- if (path53.node.computed) {
309946
- const property = path53.get("property");
309947
- if (property.isIdentifier() && property.node.name === oldName) {
309948
- property.replaceInline(import_types14.default.identifier(newName));
309949
- path53.skip();
309950
- return;
309951
- }
309952
- }
309953
- const components2 = [];
309954
- let current = path53;
309955
- while (current.isMemberExpression() || current.isOptionalMemberExpression()) {
309956
- const property = current.get("property");
309957
- if (Array.isArray(property)) {
309958
- break;
309959
- }
309960
- if (property.isIdentifier()) {
309961
- components2.unshift({ name: property.node.name, path: property });
309962
- }
309963
- const object2 = current.get("object");
309964
- if (Array.isArray(object2)) {
309965
- break;
309966
- }
309967
- current = object2;
309968
- }
309969
- if (current.isIdentifier()) {
309970
- components2.unshift({ name: current.node.name, path: current });
309971
- }
309972
- if (components2.length === 0) {
309973
- return;
309974
- }
309975
- if (parentBinding) {
309976
- for (let i2 = 0; i2 < components2.length - 1; i2++) {
309977
- if (components2[i2]?.name === parentBinding && components2[i2 + 1]?.name === oldName) {
309978
- components2[i2 + 1]?.path.replaceInline(import_types14.default.identifier(newName));
309979
- path53.skip();
309980
- return;
309981
- }
309982
- }
309983
- } else {
309984
- for (const component of components2) {
309985
- if (component.name === oldName) {
309986
- component.path.replaceInline(import_types14.default.identifier(newName));
309987
- path53.skip();
309988
- return;
309989
- }
309990
- }
309991
- }
309992
- }
309993
- traversePath.traverse({
309994
- ...functionVisitor,
309995
- OptionalMemberExpression(path53) {
309996
- handleMemberExpression(path53);
309997
- },
309998
- MemberExpression(path53) {
309999
- handleMemberExpression(path53);
310000
- },
310001
- CallExpression(path53) {
310002
- const args = path53.get("arguments");
310003
- if (args.length === 0) {
310004
- return;
310005
- }
310006
- for (const arg of args) {
310007
- if (arg.isIdentifier() && getIdentiferName(arg.node) === oldName) {
310008
- arg.replaceInline(import_types14.default.identifier(newName));
310009
- }
310010
- }
310011
- },
310012
- VariableDeclarator(path53) {
310013
- const init3 = path53.get("init");
310014
- if (init3.isIdentifier() && getIdentiferName(init3.node) === oldName) {
310015
- init3.replaceInline(import_types14.default.identifier(newName));
310016
- }
310017
- },
310018
- Identifier(path53) {
310019
- if (path53.parentPath.isArrayExpression()) {
310020
- if (path53.node.name === oldName) {
310021
- path53.replaceInline(import_types14.default.identifier(newName));
310022
- }
310023
- }
310024
- }
310025
- });
310026
- }
309868
+ var import_types16 = __toESM(require_lib7(), 1);
309869
+ var t6 = __toESM(require_lib7(), 1);
310027
309870
 
310028
309871
  // ../../../vite-plugin-file-sync/dist/parsing/entity/index.js
310029
309872
  init_cjs_shims();
310030
309873
 
310031
309874
  // ../../../vite-plugin-file-sync/dist/parsing/entity/to-code-entity.js
310032
309875
  init_cjs_shims();
310033
- var import_shared27 = __toESM(require_dist2(), 1);
309876
+ var import_shared26 = __toESM(require_dist2(), 1);
310034
309877
  var toCodeProperty = (value2) => {
310035
309878
  if (typeof value2 === "string") {
310036
- if ((0, import_shared27.containsBindingsAnywhere)(value2)) {
309879
+ if ((0, import_shared26.containsBindingsAnywhere)(value2)) {
310037
309880
  return `SB\`${value2}\``;
310038
309881
  }
310039
309882
  return `"${value2}"`;
@@ -310301,9 +310144,9 @@ function updateEntityNode(node, updates, entityId) {
310301
310144
  return property2.isObjectProperty() && property2.get("key").isIdentifier() && getIdentiferName(property2.node.key) === key2;
310302
310145
  });
310303
310146
  if (!property) {
310304
- configObject.pushContainer("properties", (0, import_types17.objectProperty)((0, import_types17.identifier)(key2), getPropertyExpression(info)));
310147
+ configObject.pushContainer("properties", (0, import_types16.objectProperty)((0, import_types16.identifier)(key2), getPropertyExpression(info)));
310305
310148
  } else {
310306
- property.replaceWith((0, import_types17.objectProperty)((0, import_types17.identifier)(key2), getPropertyExpression(info)));
310149
+ property.replaceWith((0, import_types16.objectProperty)((0, import_types16.identifier)(key2), getPropertyExpression(info)));
310307
310150
  }
310308
310151
  if (info.type in REQUIRED_IMPORTS_BY_PROPERTY_TYPE) {
310309
310152
  const requiredImports = REQUIRED_IMPORTS_BY_PROPERTY_TYPE[info.type];
@@ -310325,7 +310168,7 @@ function fromEntityToNode(entity) {
310325
310168
  throw new Error("Invalid entity ast definition");
310326
310169
  }
310327
310170
  return {
310328
- entity: (0, import_types17.objectProperty)((0, import_types17.identifier)(entity.name), parsedEntity.program.body[0].expression),
310171
+ entity: (0, import_types16.objectProperty)((0, import_types16.identifier)(entity.name), parsedEntity.program.body[0].expression),
310329
310172
  imports
310330
310173
  };
310331
310174
  }
@@ -310412,9 +310255,9 @@ function updateScopeUsages(scopeUsages, entityNames) {
310412
310255
  continue;
310413
310256
  const id2 = declaration.get("id");
310414
310257
  if (id2.isObjectPattern()) {
310415
- const newProperties = entityNames.map((name18) => (0, import_types17.objectProperty)(
310416
- (0, import_types17.identifier)(name18),
310417
- (0, import_types17.identifier)(name18),
310258
+ const newProperties = entityNames.map((name18) => (0, import_types16.objectProperty)(
310259
+ (0, import_types16.identifier)(name18),
310260
+ (0, import_types16.identifier)(name18),
310418
310261
  false,
310419
310262
  // computed
310420
310263
  true
@@ -310445,14 +310288,14 @@ function findEnclosingComponent(elementPath) {
310445
310288
  }
310446
310289
  function addScopeDestructuring(componentPath, scopeDefinition) {
310447
310290
  const uniqueEntityNames = [...new Set(scopeDefinition.entityNames)];
310448
- const destructuringDeclaration = (0, import_types17.variableDeclaration)("const", [
310449
- (0, import_types17.variableDeclarator)((0, import_types17.objectPattern)(uniqueEntityNames.map((name18) => (0, import_types17.objectProperty)(
310450
- (0, import_types17.identifier)(name18),
310451
- (0, import_types17.identifier)(name18),
310291
+ const destructuringDeclaration = (0, import_types16.variableDeclaration)("const", [
310292
+ (0, import_types16.variableDeclarator)((0, import_types16.objectPattern)(uniqueEntityNames.map((name18) => (0, import_types16.objectProperty)(
310293
+ (0, import_types16.identifier)(name18),
310294
+ (0, import_types16.identifier)(name18),
310452
310295
  false,
310453
310296
  // computed
310454
310297
  true
310455
- ))), (0, import_types17.identifier)(scopeDefinition.name))
310298
+ ))), (0, import_types16.identifier)(scopeDefinition.name))
310456
310299
  ]);
310457
310300
  let addedNodePath = null;
310458
310301
  if (componentPath.isFunctionDeclaration() || componentPath.isFunctionExpression() || componentPath.isArrowFunctionExpression()) {
@@ -310467,8 +310310,8 @@ function addScopeDestructuring(componentPath, scopeDefinition) {
310467
310310
  const [newPath] = body.unshiftContainer("body", destructuringDeclaration);
310468
310311
  addedNodePath = newPath;
310469
310312
  } else {
310470
- const retStatement = (0, import_types17.returnStatement)(body.node);
310471
- componentPath.node.body = (0, import_types17.blockStatement)([
310313
+ const retStatement = (0, import_types16.returnStatement)(body.node);
310314
+ componentPath.node.body = (0, import_types16.blockStatement)([
310472
310315
  destructuringDeclaration,
310473
310316
  retStatement
310474
310317
  ]);
@@ -310530,7 +310373,6 @@ function parseSbScopeDefinition(ast) {
310530
310373
  let scopeFunction = null;
310531
310374
  const scopeNameToEntityId = {};
310532
310375
  let scopeId = null;
310533
- let exportedPageName = null;
310534
310376
  function extractEntityNamesFromObject(objExpr) {
310535
310377
  const properties = objExpr.get("properties");
310536
310378
  properties.forEach((prop) => {
@@ -310587,59 +310429,17 @@ function parseSbScopeDefinition(ast) {
310587
310429
  if (property.isIdentifier() && property.node.name === "entities") {
310588
310430
  const object2 = init3.get("object");
310589
310431
  if (object2.isIdentifier()) {
310590
- exportedPageName = id2.node.name;
310432
+ scopeName = id2.node.name;
310591
310433
  scopeScopeName = object2.node.name;
310434
+ scopeId = getStableScopeId(scopeName);
310592
310435
  break;
310593
310436
  }
310594
310437
  }
310595
310438
  }
310596
310439
  }
310597
- },
310598
- VariableDeclaration(path53) {
310599
- const declarations = path53.get("declarations");
310600
- for (const varDeclarator of declarations) {
310601
- if (!varDeclarator.isVariableDeclarator())
310602
- continue;
310603
- const id2 = varDeclarator.get("id");
310604
- const init3 = varDeclarator.get("init");
310605
- if (id2.isIdentifier() && init3.isCallExpression() && init3.get("callee").isIdentifier()) {
310606
- const callee = init3.get("callee");
310607
- if (callee.isIdentifier() && isSbScopeFunction(callee.node.name)) {
310608
- if (!scopeScopeName || id2.node.name === scopeScopeName) {
310609
- if (init3.node.arguments.length > 1) {
310610
- const args = init3.get("arguments");
310611
- const optionsArg = args[1];
310612
- if (optionsArg && optionsArg.isObjectExpression()) {
310613
- const properties = optionsArg.get("properties");
310614
- const nameProperty = properties.find((prop) => {
310615
- if (prop.isObjectProperty() && prop.get("key").isIdentifier()) {
310616
- return prop.get("key").node.name === "name";
310617
- }
310618
- return false;
310619
- });
310620
- if (nameProperty && nameProperty.isObjectProperty()) {
310621
- const value2 = nameProperty.get("value");
310622
- if (value2.isStringLiteral()) {
310623
- scopeName = value2.node.value;
310624
- scopeId = getStableScopeId(scopeName);
310625
- if (!scopeScopeName) {
310626
- scopeScopeName = id2.node.name;
310627
- }
310628
- }
310629
- }
310630
- }
310631
- }
310632
- }
310633
- }
310634
- }
310635
- }
310636
310440
  }
310637
310441
  });
310638
- if (!scopeName && exportedPageName) {
310639
- scopeName = exportedPageName;
310640
- scopeId = getStableScopeId(scopeName);
310641
- }
310642
- if (scopeScopeName && (scopeName || exportedPageName)) {
310442
+ if (scopeName && scopeScopeName && scopeId) {
310643
310443
  traverse(ast, {
310644
310444
  VariableDeclaration(path53) {
310645
310445
  const declarations = path53.get("declarations");
@@ -310750,7 +310550,7 @@ function addTypeParametersToScope(scopeDefinition) {
310750
310550
  const mainPath = scopeDefinition.mainNode;
310751
310551
  if (mainPath.node.typeParameters) {
310752
310552
  const typeParams = mainPath.node.typeParameters.params;
310753
- if (typeParams.length > 0 && t7.isTSTypeLiteral(typeParams[0])) {
310553
+ if (typeParams.length > 0 && t6.isTSTypeLiteral(typeParams[0])) {
310754
310554
  return scopeDefinition;
310755
310555
  }
310756
310556
  }
@@ -310760,94 +310560,6 @@ function addTypeParametersToScope(scopeDefinition) {
310760
310560
  scopeDefinition.scopeComponents = emptyScope.scopeComponents;
310761
310561
  return scopeDefinition;
310762
310562
  }
310763
- function renameScopeVariableDeclaration(ast, oldName, newName) {
310764
- traverse(ast, {
310765
- ExportNamedDeclaration(path53) {
310766
- const declaration = path53.get("declaration");
310767
- if (!declaration.isVariableDeclaration()) {
310768
- return;
310769
- }
310770
- const declarations = declaration.get("declarations");
310771
- for (const varDeclarator of declarations) {
310772
- if (!varDeclarator.isVariableDeclarator()) {
310773
- continue;
310774
- }
310775
- const id2 = varDeclarator.get("id");
310776
- if (!id2.isIdentifier()) {
310777
- continue;
310778
- }
310779
- const name18 = getIdentiferName(id2.node);
310780
- if (name18 === oldName) {
310781
- id2.replaceWith(t7.identifier(newName));
310782
- }
310783
- if (name18 === `${oldName}Scope`) {
310784
- id2.replaceWith(t7.identifier(`${newName}Scope`));
310785
- }
310786
- renameEntityInJavascript({
310787
- oldName: `${oldName}Scope`,
310788
- newName: `${newName}Scope`,
310789
- nodePath: path53
310790
- });
310791
- }
310792
- }
310793
- });
310794
- }
310795
- function updateScopeNameInOptions(scopeDefinition, newName) {
310796
- const mainNode = scopeDefinition.mainNode;
310797
- const args = mainNode.get("arguments");
310798
- if (args.length >= 2) {
310799
- const optionsArg = args[1];
310800
- if (optionsArg?.isObjectExpression()) {
310801
- const properties = optionsArg.get("properties");
310802
- const nameProperty = properties.find((prop) => {
310803
- if (prop.isObjectProperty() && prop.get("key").isIdentifier()) {
310804
- const key2 = prop.get("key");
310805
- return key2.isIdentifier() && key2.node.name === "name";
310806
- }
310807
- return false;
310808
- });
310809
- if (nameProperty && nameProperty.isObjectProperty()) {
310810
- nameProperty.get("value").replaceWith(t7.stringLiteral(newName));
310811
- } else {
310812
- const newNameProperty = t7.objectProperty(t7.identifier("name"), t7.stringLiteral(newName));
310813
- optionsArg.pushContainer("properties", newNameProperty);
310814
- }
310815
- }
310816
- } else if (args.length === 1) {
310817
- const optionsObject = t7.objectExpression([
310818
- t7.objectProperty(t7.identifier("name"), t7.stringLiteral(newName))
310819
- ]);
310820
- mainNode.pushContainer("arguments", optionsObject);
310821
- }
310822
- }
310823
- function updateScopeImports(ast, oldName, newName) {
310824
- traverse(ast, {
310825
- ImportDeclaration(path53) {
310826
- const source2 = path53.get("source");
310827
- if (source2.isStringLiteral() && source2.node.value === "./scope") {
310828
- path53.replaceWith(t7.importDeclaration([
310829
- t7.importSpecifier(t7.identifier(newName), t7.identifier(newName)),
310830
- t7.importSpecifier(t7.identifier(`${newName}Scope`), t7.identifier(`${newName}Scope`))
310831
- ], t7.stringLiteral(`./scope`)));
310832
- path53.stop();
310833
- }
310834
- },
310835
- Program: {
310836
- exit(path53) {
310837
- renameEntityInJavascript({
310838
- oldName,
310839
- newName,
310840
- nodePath: path53
310841
- });
310842
- renameEntityInJavascript({
310843
- oldName: `${oldName}Scope`,
310844
- newName: `${newName}Scope`,
310845
- nodePath: path53
310846
- });
310847
- }
310848
- }
310849
- });
310850
- }
310851
310563
  function updateDestructuredEntitiesParam(scopeDef) {
310852
310564
  const uniqueEntityNames = [...new Set(scopeDef.entityNames)];
310853
310565
  if (uniqueEntityNames.length === 0) {
@@ -310857,15 +310569,15 @@ function updateDestructuredEntitiesParam(scopeDef) {
310857
310569
  }
310858
310570
  return;
310859
310571
  }
310860
- const entitiesDestructuring = (0, import_types17.objectPattern)(uniqueEntityNames.map((name18) => (0, import_types17.objectProperty)(
310861
- (0, import_types17.identifier)(name18),
310862
- (0, import_types17.identifier)(name18),
310572
+ const entitiesDestructuring = (0, import_types16.objectPattern)(uniqueEntityNames.map((name18) => (0, import_types16.objectProperty)(
310573
+ (0, import_types16.identifier)(name18),
310574
+ (0, import_types16.identifier)(name18),
310863
310575
  false,
310864
310576
  // computed
310865
310577
  true
310866
310578
  )));
310867
- const entitiesProperty = (0, import_types17.objectProperty)((0, import_types17.identifier)("entities"), entitiesDestructuring);
310868
- const mainDestructuringPattern = (0, import_types17.objectPattern)([entitiesProperty]);
310579
+ const entitiesProperty = (0, import_types16.objectProperty)((0, import_types16.identifier)("entities"), entitiesDestructuring);
310580
+ const mainDestructuringPattern = (0, import_types16.objectPattern)([entitiesProperty]);
310869
310581
  if (scopeDef.scopeFunction.node.params.length > 0) {
310870
310582
  const firstParam = scopeDef.scopeFunction.get("params")[0];
310871
310583
  if (firstParam && firstParam.isObjectPattern()) {
@@ -310887,7 +310599,7 @@ var import_types19 = __toESM(require_lib7(), 1);
310887
310599
 
310888
310600
  // ../../../vite-plugin-file-sync/dist/refactor/blocks.js
310889
310601
  init_cjs_shims();
310890
- var import_shared28 = __toESM(require_dist2(), 1);
310602
+ var import_shared27 = __toESM(require_dist2(), 1);
310891
310603
  var import_esprima2 = __toESM(require_esprima(), 1);
310892
310604
  init_lodash();
310893
310605
  function flattenBlocks(blocks) {
@@ -310895,19 +310607,19 @@ function flattenBlocks(blocks) {
310895
310607
  return [];
310896
310608
  }
310897
310609
  return blocks.flatMap((block) => {
310898
- const localBlock = (0, import_shared28.convertBlock)(block);
310610
+ const localBlock = (0, import_shared27.convertBlock)(block);
310899
310611
  if (!localBlock) {
310900
310612
  return null;
310901
310613
  }
310902
- if ((0, import_shared28.isStepBlock)(localBlock)) {
310614
+ if ((0, import_shared27.isStepBlock)(localBlock)) {
310903
310615
  return localBlock;
310904
- } else if ((0, import_shared28.isControlBlock)(localBlock)) {
310616
+ } else if ((0, import_shared27.isControlBlock)(localBlock)) {
310905
310617
  switch (localBlock.type) {
310906
- case import_shared28.BlockType.PARALLEL: {
310618
+ case import_shared27.BlockType.PARALLEL: {
310907
310619
  const config2 = localBlock.config;
310908
310620
  return flattenBlocks(config2.dynamic?.blocks);
310909
310621
  }
310910
- case import_shared28.BlockType.CONDITION: {
310622
+ case import_shared27.BlockType.CONDITION: {
310911
310623
  const config2 = localBlock.config;
310912
310624
  const blocks2 = [
310913
310625
  ...flattenBlocks(config2.if?.blocks),
@@ -310916,7 +310628,7 @@ function flattenBlocks(blocks) {
310916
310628
  ];
310917
310629
  if (config2.if?.condition) {
310918
310630
  blocks2.push({
310919
- type: import_shared28.BlockType.CONDITION,
310631
+ type: import_shared27.BlockType.CONDITION,
310920
310632
  config: {
310921
310633
  if: config2.if
310922
310634
  }
@@ -310924,7 +310636,7 @@ function flattenBlocks(blocks) {
310924
310636
  }
310925
310637
  if (config2.elseIf?.length) {
310926
310638
  blocks2.push({
310927
- type: import_shared28.BlockType.CONDITION,
310639
+ type: import_shared27.BlockType.CONDITION,
310928
310640
  config: {
310929
310641
  elseIf: config2.elseIf
310930
310642
  }
@@ -310932,11 +310644,11 @@ function flattenBlocks(blocks) {
310932
310644
  }
310933
310645
  return blocks2;
310934
310646
  }
310935
- case import_shared28.BlockType.LOOP: {
310647
+ case import_shared27.BlockType.LOOP: {
310936
310648
  const config2 = localBlock.config;
310937
310649
  return flattenBlocks(config2.blocks);
310938
310650
  }
310939
- case import_shared28.BlockType.TRY_CATCH: {
310651
+ case import_shared27.BlockType.TRY_CATCH: {
310940
310652
  const config2 = localBlock.config;
310941
310653
  return [
310942
310654
  ...flattenBlocks(config2.try?.blocks),
@@ -310944,7 +310656,7 @@ function flattenBlocks(blocks) {
310944
310656
  ...flattenBlocks(config2.finally?.blocks)
310945
310657
  ];
310946
310658
  }
310947
- case import_shared28.BlockType.STREAM: {
310659
+ case import_shared27.BlockType.STREAM: {
310948
310660
  const config2 = localBlock.config;
310949
310661
  return flattenBlocks(config2.process?.blocks);
310950
310662
  }
@@ -310955,19 +310667,19 @@ function flattenBlocks(blocks) {
310955
310667
  }).filter(Boolean);
310956
310668
  }
310957
310669
  var extractPythonEvaluationPairs2 = async (code, entities, dataTree, namespacedEntitiesToExtract) => {
310958
- return (0, import_shared28.extractPythonEvaluationPairsWithParser)(code, entities, dataTree, parser, namespacedEntitiesToExtract);
310670
+ return (0, import_shared27.extractPythonEvaluationPairsWithParser)(code, entities, dataTree, parser, namespacedEntitiesToExtract);
310959
310671
  };
310960
310672
  var extractJsEvaluationPairs2 = async (jsSnippet, entitiesToExtract, dataTree, namespacedEntitiesToExtract) => {
310961
- return (0, import_shared28.extractJsEvaluationPairsWithTokenizer)(jsSnippet, entitiesToExtract, dataTree, import_esprima2.tokenize, namespacedEntitiesToExtract);
310673
+ return (0, import_shared27.extractJsEvaluationPairsWithTokenizer)(jsSnippet, entitiesToExtract, dataTree, import_esprima2.tokenize, namespacedEntitiesToExtract);
310962
310674
  };
310963
310675
  function getExtractorByPluginId(pluginId) {
310964
310676
  if (!pluginId) {
310965
310677
  return extractJsEvaluationPairs2;
310966
310678
  }
310967
310679
  switch (pluginId.trim().toLowerCase()) {
310968
- case import_shared28.LanguagePluginID.Python:
310680
+ case import_shared27.LanguagePluginID.Python:
310969
310681
  return extractPythonEvaluationPairs2;
310970
- case import_shared28.LanguagePluginID.JavaScript:
310682
+ case import_shared27.LanguagePluginID.JavaScript:
310971
310683
  default:
310972
310684
  return extractJsEvaluationPairs2;
310973
310685
  }
@@ -310976,14 +310688,14 @@ async function refactorNameInBlocks(params) {
310976
310688
  const { blocks, oldName, newName, namespace } = params;
310977
310689
  const flattenedBlocks = flattenBlocks(blocks);
310978
310690
  for (const block of flattenedBlocks) {
310979
- const pluginType = (0, import_shared28.getPluginType)(block) ?? void 0;
310691
+ const pluginType = (0, import_shared27.getPluginType)(block) ?? void 0;
310980
310692
  const extractor = getExtractorByPluginId(pluginType);
310981
- if ((0, import_shared28.isStepBlock)(block) && pluginType) {
310693
+ if ((0, import_shared27.isStepBlock)(block) && pluginType) {
310982
310694
  const configuration = block.config[pluginType];
310983
310695
  if (typeof configuration !== "object" || configuration == null) {
310984
310696
  continue;
310985
310697
  }
310986
- await (0, import_shared28.refactorNameInStep)({
310698
+ await (0, import_shared27.refactorNameInStep)({
310987
310699
  ...params,
310988
310700
  dataTree: {
310989
310701
  [newName]: {},
@@ -310993,9 +310705,9 @@ async function refactorNameInBlocks(params) {
310993
310705
  configuration,
310994
310706
  extractor
310995
310707
  });
310996
- } else if ((0, import_shared28.isControlBlock)(block)) {
310708
+ } else if ((0, import_shared27.isControlBlock)(block)) {
310997
310709
  for (const [value2, setValue] of getSetControlBlockExpressions2(block)) {
310998
- const newValue = await (0, import_shared28.refactorNameInString)({
310710
+ const newValue = await (0, import_shared27.refactorNameInString)({
310999
310711
  value: value2,
311000
310712
  oldName,
311001
310713
  newName,
@@ -311025,34 +310737,34 @@ function getSetControlBlockExpressions2(block) {
311025
310737
  const { config: config2, type: type2 } = block;
311026
310738
  const results = [];
311027
310739
  switch (type2) {
311028
- case import_shared28.BlockType.BREAK: {
310740
+ case import_shared27.BlockType.BREAK: {
311029
310741
  const controlConfig = config2;
311030
310742
  results.push(makeGetSet2(controlConfig, "condition"));
311031
310743
  break;
311032
310744
  }
311033
- case import_shared28.BlockType.THROW: {
310745
+ case import_shared27.BlockType.THROW: {
311034
310746
  const controlConfig = config2;
311035
310747
  results.push(makeGetSet2(controlConfig, "error"));
311036
310748
  break;
311037
310749
  }
311038
- case import_shared28.BlockType.RETURN: {
310750
+ case import_shared27.BlockType.RETURN: {
311039
310751
  const controlConfig = config2;
311040
310752
  results.push(makeGetSet2(controlConfig, "data"));
311041
310753
  break;
311042
310754
  }
311043
- case import_shared28.BlockType.WAIT: {
310755
+ case import_shared27.BlockType.WAIT: {
311044
310756
  const controlConfig = config2;
311045
310757
  results.push(makeGetSet2(controlConfig, "condition"));
311046
310758
  break;
311047
310759
  }
311048
- case import_shared28.BlockType.PARALLEL: {
310760
+ case import_shared27.BlockType.PARALLEL: {
311049
310761
  const controlConfig = config2;
311050
310762
  if (controlConfig.dynamic) {
311051
310763
  results.push(makeGetSet2(controlConfig.dynamic, "paths"));
311052
310764
  }
311053
310765
  break;
311054
310766
  }
311055
- case import_shared28.BlockType.CONDITION: {
310767
+ case import_shared27.BlockType.CONDITION: {
311056
310768
  const controlConfig = config2;
311057
310769
  if (controlConfig.if) {
311058
310770
  results.push(makeGetSet2(controlConfig.if, "condition"));
@@ -311062,15 +310774,15 @@ function getSetControlBlockExpressions2(block) {
311062
310774
  }
311063
310775
  break;
311064
310776
  }
311065
- case import_shared28.BlockType.LOOP: {
310777
+ case import_shared27.BlockType.LOOP: {
311066
310778
  const controlConfig = config2;
311067
310779
  results.push(makeGetSet2(controlConfig, "range"));
311068
310780
  break;
311069
310781
  }
311070
- case import_shared28.BlockType.TRY_CATCH: {
310782
+ case import_shared27.BlockType.TRY_CATCH: {
311071
310783
  break;
311072
310784
  }
311073
- case import_shared28.BlockType.VARIABLES: {
310785
+ case import_shared27.BlockType.VARIABLES: {
311074
310786
  const controlConfig = config2;
311075
310787
  for (const variable of controlConfig.items) {
311076
310788
  if (variable.value) {
@@ -311079,12 +310791,12 @@ function getSetControlBlockExpressions2(block) {
311079
310791
  }
311080
310792
  break;
311081
310793
  }
311082
- case import_shared28.BlockType.SEND: {
310794
+ case import_shared27.BlockType.SEND: {
311083
310795
  const controlConfig = config2;
311084
310796
  results.push(makeGetSet2(controlConfig, "message"));
311085
310797
  break;
311086
310798
  }
311087
- case import_shared28.BlockType.STREAM: {
310799
+ case import_shared27.BlockType.STREAM: {
311088
310800
  break;
311089
310801
  }
311090
310802
  default: {
@@ -311095,6 +310807,146 @@ function getSetControlBlockExpressions2(block) {
311095
310807
  return results;
311096
310808
  }
311097
310809
 
310810
+ // ../../../vite-plugin-file-sync/dist/refactor/javascript.js
310811
+ init_cjs_shims();
310812
+ var import_types18 = __toESM(require_lib7(), 1);
310813
+ var import_shared28 = __toESM(require_dist2(), 1);
310814
+ function renameEntityInJavascript({ oldName, newName, nodePath, parentBinding, checkFunctionBinding = false }) {
310815
+ const functionVisitor = checkFunctionBinding ? {
310816
+ Function(path53) {
310817
+ const paramBindings = path53.scope.getAllBindingsOfKind("param");
310818
+ for (const binding of Object.values(paramBindings)) {
310819
+ const bindingPath = binding.path;
310820
+ if (bindingPath.isObjectPattern()) {
310821
+ const properties = bindingPath.get("properties");
310822
+ for (const property of properties) {
310823
+ if (!property.isObjectProperty())
310824
+ continue;
310825
+ const keyName = getIdentiferName(property.get("key").node);
310826
+ if (keyName === oldName && !property.node.shorthand) {
310827
+ property.get("key").replaceInline(import_types18.default.identifier(newName));
310828
+ path53.skip();
310829
+ return;
310830
+ }
310831
+ }
310832
+ }
310833
+ }
310834
+ if (path53.scope.hasBinding(oldName) && !parentBinding) {
310835
+ const binding = path53.scope.getBinding(oldName);
310836
+ path53.scope.rename(oldName, newName);
310837
+ const bindingPath = binding.path;
310838
+ if (bindingPath.isObjectPattern()) {
310839
+ for (const property of bindingPath.get("properties")) {
310840
+ if (!property.isObjectProperty())
310841
+ continue;
310842
+ const keyName = getIdentiferName(property.get("key").node);
310843
+ if (keyName === oldName) {
310844
+ property.get("key").replaceInline(import_types18.default.identifier(newName));
310845
+ property.get("value").replaceInline(import_types18.default.identifier(newName));
310846
+ property.set("shorthand", true);
310847
+ }
310848
+ }
310849
+ }
310850
+ path53.skip();
310851
+ return;
310852
+ }
310853
+ const ids = path53.getBindingIdentifierPaths();
310854
+ for (const bindingName of Object.keys(ids)) {
310855
+ const binding = path53.scope.getBinding(bindingName);
310856
+ if (!binding || binding.kind !== "param") {
310857
+ continue;
310858
+ }
310859
+ for (const reference of binding.referencePaths) {
310860
+ if (reference.parentPath?.isMemberExpression() || reference.parentPath?.isOptionalMemberExpression()) {
310861
+ let property = reference.parentPath.get("property");
310862
+ if (Array.isArray(property)) {
310863
+ property = property[0];
310864
+ }
310865
+ if (property.isIdentifier() && property.node.name === parentBinding && reference.parentPath.parentPath?.isMemberExpression()) {
310866
+ handleMemberExpression(reference.parentPath.parentPath);
310867
+ path53.skip();
310868
+ return;
310869
+ }
310870
+ if (property.isIdentifier() && property.node.name === oldName) {
310871
+ property.replaceInline(import_types18.default.identifier(newName));
310872
+ path53.skip();
310873
+ }
310874
+ }
310875
+ }
310876
+ }
310877
+ }
310878
+ } : {};
310879
+ let traversePath = nodePath;
310880
+ if (traversePath.isFunction()) {
310881
+ traversePath = traversePath.parentPath;
310882
+ }
310883
+ function handleMemberExpression(path53) {
310884
+ if (path53.node.computed) {
310885
+ const property = path53.get("property");
310886
+ if (property.isIdentifier() && property.node.name === oldName) {
310887
+ property.replaceInline(import_types18.default.identifier(newName));
310888
+ path53.skip();
310889
+ return;
310890
+ }
310891
+ }
310892
+ const components2 = [];
310893
+ let current = path53;
310894
+ while (current.isMemberExpression() || current.isOptionalMemberExpression()) {
310895
+ const property = current.get("property");
310896
+ if (Array.isArray(property)) {
310897
+ break;
310898
+ }
310899
+ if (property.isIdentifier()) {
310900
+ components2.unshift({ name: property.node.name, path: property });
310901
+ }
310902
+ const object2 = current.get("object");
310903
+ if (Array.isArray(object2)) {
310904
+ break;
310905
+ }
310906
+ current = object2;
310907
+ }
310908
+ if (current.isIdentifier()) {
310909
+ components2.unshift({ name: current.node.name, path: current });
310910
+ }
310911
+ if (components2.length === 0) {
310912
+ return;
310913
+ }
310914
+ if (parentBinding) {
310915
+ for (let i2 = 0; i2 < components2.length - 1; i2++) {
310916
+ if (components2[i2]?.name === parentBinding && components2[i2 + 1]?.name === oldName) {
310917
+ components2[i2 + 1]?.path.replaceInline(import_types18.default.identifier(newName));
310918
+ path53.skip();
310919
+ return;
310920
+ }
310921
+ }
310922
+ } else {
310923
+ for (const component of components2) {
310924
+ if (component.name === oldName) {
310925
+ component.path.replaceInline(import_types18.default.identifier(newName));
310926
+ path53.skip();
310927
+ return;
310928
+ }
310929
+ }
310930
+ }
310931
+ }
310932
+ traversePath.traverse({
310933
+ ...functionVisitor,
310934
+ OptionalMemberExpression(path53) {
310935
+ handleMemberExpression(path53);
310936
+ },
310937
+ MemberExpression(path53) {
310938
+ handleMemberExpression(path53);
310939
+ },
310940
+ Identifier(path53) {
310941
+ if (path53.parentPath.isArrayExpression()) {
310942
+ if (path53.node.name === oldName) {
310943
+ path53.replaceInline(import_types18.default.identifier(newName));
310944
+ }
310945
+ }
310946
+ }
310947
+ });
310948
+ }
310949
+
311098
310950
  // ../../../vite-plugin-file-sync/dist/rename-manager.js
311099
310951
  var traverseFn = traverse.default || traverse;
311100
310952
  var RenameManager = class {
@@ -311409,12 +311261,12 @@ var SbScopeManager = class extends EventEmitter7 {
311409
311261
  }
311410
311262
  return this.reconcileBindPropertiesAndScopeDefinitions();
311411
311263
  }
311412
- getScopeDefinitionAndFilePathByNameOrId({ identifier: identifier4, type: type2 }) {
311264
+ getScopeDefinitionAndFilePathByNameOrId({ identifier: identifier3, type: type2 }) {
311413
311265
  for (const [filePath, scopeDef] of this.pageAndAppScopes.entries()) {
311414
- if (type2 === "id" && scopeDef.id === identifier4) {
311266
+ if (type2 === "id" && scopeDef.id === identifier3) {
311415
311267
  return { scopeDefinition: scopeDef, filePath };
311416
311268
  }
311417
- if (type2 === "name" && scopeDef.name === identifier4) {
311269
+ if (type2 === "name" && scopeDef.name === identifier3) {
311418
311270
  return { scopeDefinition: scopeDef, filePath };
311419
311271
  }
311420
311272
  }
@@ -311781,36 +311633,6 @@ var SbScopeManager = class extends EventEmitter7 {
311781
311633
  }
311782
311634
  return [];
311783
311635
  }
311784
- renamePage(newName, oldFilePath, newFilePath) {
311785
- const pageDir = path24.dirname(oldFilePath);
311786
- const scopeFilePath = path24.join(pageDir, SCOPE_FILE);
311787
- const pageFile = this.sourceTracker.getCurrentFiles()[oldFilePath];
311788
- if (!pageFile || !pageFile.ast) {
311789
- throw new Error(`Page file not found in source tracker: ${oldFilePath}`);
311790
- }
311791
- const scopeDef = this.pageAndAppScopes.get(scopeFilePath);
311792
- if (!scopeDef) {
311793
- throw new Error(`Scope definition not found for file: ${scopeFilePath}`);
311794
- }
311795
- const scopeFile = this.sourceTracker.getCurrentFiles()[scopeFilePath];
311796
- if (!scopeFile || !scopeFile.ast) {
311797
- throw new Error(`File not found in source tracker: ${scopeFilePath}`);
311798
- }
311799
- const oldName = scopeDef.name;
311800
- updateScopeNameInOptions(scopeDef, newName);
311801
- renameScopeVariableDeclaration(scopeFile.ast, oldName, newName);
311802
- scopeDef.name = newName;
311803
- updateScopeImports(pageFile.ast, oldName, newName);
311804
- const newScopeFilePath = path24.join(path24.dirname(newFilePath), SCOPE_FILE);
311805
- this.pageAndAppScopes.set(newScopeFilePath, scopeDef);
311806
- this.pageAndAppScopes.delete(scopeFilePath);
311807
- Object.entries(this.scopeIdToFilePath).forEach(([scopeId, scopeFilePath_]) => {
311808
- if (scopeFilePath_ === scopeFilePath) {
311809
- delete this.scopeIdToFilePath[scopeId];
311810
- }
311811
- });
311812
- return [scopeFilePath];
311813
- }
311814
311636
  };
311815
311637
 
311816
311638
  // ../../../vite-plugin-file-sync/dist/source-tracker.js
@@ -311884,21 +311706,6 @@ var SourceTracker = class {
311884
311706
  deleteElementToFilePath(el) {
311885
311707
  delete this.elementToFilePath[el];
311886
311708
  }
311887
- deleteElementsForFilePath(filePath) {
311888
- Object.entries(this.elementToFilePath).forEach(([el, filePath_]) => {
311889
- if (filePath_ === filePath) {
311890
- delete this.elementToLocation[el];
311891
- delete this.elementToFilePath[el];
311892
- }
311893
- });
311894
- }
311895
- deleteScopeForFilePath(filePath) {
311896
- Object.entries(this.scopeIdToFilePath).forEach(([scopeId, filePath_]) => {
311897
- if (filePath_ === filePath) {
311898
- delete this.scopeIdToFilePath[scopeId];
311899
- }
311900
- });
311901
- }
311902
311709
  getScopeDefinitionForPage(pageName) {
311903
311710
  const { scopeDefinition } = this.sbScopeManager.getScopeDefinitionAndFilePathByNameOrId({
311904
311711
  identifier: pageName,
@@ -312647,31 +312454,24 @@ var SourceTracker = class {
312647
312454
  this.changedFiles.add(filePath);
312648
312455
  };
312649
312456
  /**
312650
- * Change the name of the page element within a page file and update its scope
312651
- * references. Note: this does not actually rename the page file, but only the name
312652
- * of the page element, you have to perform the file system operation separately.
312457
+ * Change the name of the page element within a page file. Note: this does not actually
312458
+ * rename the page file, but only the name of the page element, you have to perform the
312459
+ * file system operation separately.
312653
312460
  */
312654
- renamePage = async ({ newName, oldFilePath, newFilePath }) => {
312655
- const currentFile = this.fileToMeta[oldFilePath];
312461
+ renamePage = async ({ newName, filePath }) => {
312462
+ const currentFile = this.fileToMeta[filePath];
312656
312463
  if (!currentFile || !currentFile.ast) {
312657
- throw new Error(`File not found for element ${oldFilePath}`);
312464
+ throw new Error(`File not found for element ${filePath}`);
312658
312465
  }
312659
- const widgetSourceId = generateElementId(oldFilePath, ["SbPage"], 0);
312660
- let pageElement = this.getElementToLocation(widgetSourceId);
312466
+ const widgetSourceId = generateElementId(filePath, ["SbPage"], 0);
312467
+ const pageElement = this.getElementToLocation(widgetSourceId);
312661
312468
  if (!pageElement) {
312662
312469
  throw new Error(`Page element not found for ${widgetSourceId}`);
312663
312470
  }
312664
- if (pageElement?.isJSXElement()) {
312665
- pageElement = pageElement.get("openingElement");
312666
- }
312667
- const attributes = pageElement.get("attributes");
312471
+ const attributes = pageElement.get("openingElement").get("attributes");
312668
312472
  const attribute = attributes?.find((attr) => attr.isJSXAttribute() && attr.node.name.name === "name");
312669
312473
  attribute?.replaceWith(import_types23.default.jsxAttribute(import_types23.default.jsxIdentifier("name"), import_types23.default.stringLiteral(newName)));
312670
- const changedPages = this.sbScopeManager.renamePage(newName, oldFilePath, newFilePath);
312671
- changedPages.forEach((page) => this.changedFiles.add(page));
312672
- this.changedFiles.add(oldFilePath);
312673
- this.deleteElementsForFilePath(oldFilePath);
312674
- this.deleteScopeForFilePath(oldFilePath);
312474
+ this.changedFiles.add(filePath);
312675
312475
  };
312676
312476
  getAddElementImports = ({ properties, children }) => {
312677
312477
  const getPropertyImports = (properties2) => {
@@ -313151,11 +312951,6 @@ var FileSyncManager = class extends EventEmitter8 {
313151
312951
  this.apiFiles[path53].stepPathMap = stepPathMap;
313152
312952
  }
313153
312953
  });
313154
- } else {
313155
- getLogger().info(`Writing non-TS, non-API file: ${path53}`);
313156
- await this.fsOperationQueue.enqueue(async () => {
313157
- await fs13.writeFile(path53, content2);
313158
- });
313159
312954
  }
313160
312955
  }
313161
312956
  readFile(path53) {
@@ -313717,59 +313512,28 @@ export default registerPage(Page, { name: "${name18}" });
313717
313512
  const oldPageFolder = getPageFolder(this.rootDir, oldName);
313718
313513
  this.watcher?.unwatch(newPageFolder);
313719
313514
  this.watcher?.unwatch(oldPageFolder);
313720
- const oldScopeFilePath = path27.join(oldPageFolder, SCOPE_FILE);
313721
- const newScopeFilePath = path27.join(newPageFolder, SCOPE_FILE);
313722
- try {
313723
- const existingRoute = Object.keys(this.routes).find((route) => this.routes[route]?.file === this.getRelativeRoutePath(oldIndexFilePath));
313724
- if (!existingRoute) {
313725
- throw new Error(`Route for ${oldName} not found`);
313726
- }
313727
- const oldScopeId = this.sourceTracker?.getScopeDefinitionForPage(oldName);
313728
- await this.sourceTracker?.renamePage({
313729
- newName,
313730
- oldFilePath: oldIndexFilePath,
313731
- newFilePath: newIndexFilePath
313732
- });
313733
- const scopeChanges = await this.sourceTracker?.getAndFlushChanges() ?? [];
313734
- await this.writeChanges(scopeChanges);
313735
- await fs13.cp(oldPageFolder, newPageFolder, { recursive: true });
313736
- const newIndexFile = await readFile6(newIndexFilePath);
313737
- if (!newIndexFile) {
313738
- throw new Error(`New index file ${newIndexFilePath} not found`);
313739
- }
313740
- const newScopeFile = await readFile6(newScopeFilePath);
313741
- if (!newScopeFile) {
313742
- throw new Error(`New scope file ${newScopeFilePath} not found`);
313743
- }
313744
- delete this.tsFiles[oldIndexFilePath];
313745
- delete this.tsFiles[oldScopeFilePath];
313746
- this.tsFiles[newIndexFilePath] = newIndexFile;
313747
- this.tsFiles[newScopeFilePath] = newScopeFile;
313748
- await this.handleNonVisualChangeByDeletingIds(newScopeFilePath, newScopeFile);
313749
- await this.handleNonVisualChangeByDeletingIds(newIndexFilePath, newIndexFile);
313750
- await fs13.rm(oldPageFolder, { recursive: true });
313751
- await this.removeRoute(oldIndexFilePath);
313752
- await this.addRoute(existingRoute, newIndexFilePath);
313753
- const newScopeId = this.sourceTracker?.getScopeDefinitionForPage(newName);
313754
- this.emit("renamePage", {
313755
- oldScopeId: oldScopeId?.id,
313756
- newScopeId: newScopeId?.id,
313757
- newName
313758
- });
313759
- this.watcher?.add(newPageFolder);
313760
- } catch (error) {
313761
- this.watcher?.add(oldPageFolder);
313762
- const oldScopeFile = await readFile6(oldScopeFilePath);
313763
- if (oldScopeFile) {
313764
- await this.handleNonVisualChangeByDeletingIds(oldScopeFilePath, oldScopeFile);
313765
- }
313766
- const oldIndexFile = await readFile6(oldIndexFilePath);
313767
- if (oldIndexFile) {
313768
- await this.handleNonVisualChangeByDeletingIds(oldIndexFilePath, oldIndexFile);
313769
- }
313770
- getLogger().error("Error renaming page", error);
313771
- throw error;
313515
+ const existingRoute = Object.keys(this.routes).find((route) => this.routes[route]?.file === this.getRelativeRoutePath(oldIndexFilePath));
313516
+ if (!existingRoute) {
313517
+ throw new Error(`Route for ${oldName} not found`);
313772
313518
  }
313519
+ await this.sourceTracker?.renamePage({
313520
+ newName,
313521
+ filePath: oldIndexFilePath
313522
+ });
313523
+ const changes = await this.sourceTracker?.getAndFlushChanges() ?? [];
313524
+ await this.writeChanges(changes);
313525
+ await fs13.rename(oldPageFolder, newPageFolder);
313526
+ await this.removeRoute(oldIndexFilePath);
313527
+ await this.addRoute(existingRoute, newIndexFilePath);
313528
+ const newIndexFile = await readFile6(newIndexFilePath);
313529
+ if (!newIndexFile) {
313530
+ throw new Error(`New index file ${newIndexFilePath} not found`);
313531
+ }
313532
+ this.tsFiles[newIndexFilePath] = newIndexFile;
313533
+ await this.handleNonVisualChangeByDeletingIds(newIndexFilePath, newIndexFile);
313534
+ this.emit("renamePage", newIndexFilePath);
313535
+ this.watcher?.add(newPageFolder);
313536
+ this.watcher?.add(oldPageFolder);
313773
313537
  };
313774
313538
  getPageRoots(filePath) {
313775
313539
  const scopeFilePath = path27.join(path27.dirname(filePath), "index.tsx");
@@ -314532,28 +314296,14 @@ var fileSyncVitePlugin = (pluginParams, options8) => {
314532
314296
  await syncService.uploadDirectory();
314533
314297
  }
314534
314298
  };
314535
- const sendRootReset = async ({ newName, oldScopeId, newScopeId }) => {
314299
+ const sendRootReset = async (sync2 = false) => {
314536
314300
  const appScope = await getAppScope(fileSyncManager);
314537
- const allApis = fileSyncManager.getApiFiles();
314538
- socketManager.callEditorClients(async (socket) => {
314539
- await socket.call.resetScope({
314301
+ socketManager.callEditorClients((socket) => {
314302
+ return socket.call.resetScope({
314540
314303
  appScope
314541
314304
  });
314542
- for (const api of Object.values(allApis)) {
314543
- void socket.call.manualUpdateApi({
314544
- api: api.api
314545
- });
314546
- }
314547
314305
  });
314548
- socketManager.callLibraryClients(async (socket) => {
314549
- socket.call.moveScope({ oldScopeId, newScopeId, newName }).then(() => {
314550
- socket.call.updateApis(Object.values(allApis).map((api) => ({
314551
- api: api.api,
314552
- scopeId: api.scopeId
314553
- })));
314554
- });
314555
- });
314556
- if (syncService) {
314306
+ if (sync2 && syncService) {
314557
314307
  await syncService.uploadDirectory();
314558
314308
  }
314559
314309
  };
@@ -314624,7 +314374,7 @@ var fileSyncVitePlugin = (pluginParams, options8) => {
314624
314374
  fileSyncManager.on("renameComponent", sendFileUpdate);
314625
314375
  fileSyncManager.on("renameEntity", sendFileUpdate);
314626
314376
  fileSyncManager.on("addPage", sendRootUpdate);
314627
- fileSyncManager.on("renamePage", sendRootReset);
314377
+ fileSyncManager.on("renamePage", () => sendRootReset(true));
314628
314378
  fileSyncManager.on("fileChanged", async (path53, _content, isNonVisualEdit) => {
314629
314379
  socketManager.callLibraryClients((socket) => {
314630
314380
  return socket.call.updateLocalBindingEntities({
@@ -314644,7 +314394,7 @@ var fileSyncVitePlugin = (pluginParams, options8) => {
314644
314394
  fileSyncManager.on("apiUpdate", async (payload) => {
314645
314395
  socketManager.callLibraryClients(async (socket) => {
314646
314396
  Promise.all([
314647
- socket.call.updateApis([payload]),
314397
+ socket.call.updateApi(payload),
314648
314398
  extractApiParamsAndDependencies(socket)
314649
314399
  ]);
314650
314400
  });
@@ -314659,7 +314409,7 @@ var fileSyncVitePlugin = (pluginParams, options8) => {
314659
314409
  fileSyncManager.on("apiManualUpdate", async (payload, sendScopeUpdates = false) => {
314660
314410
  socketManager.callLibraryClients(async (socket) => {
314661
314411
  Promise.all([
314662
- socket.call.updateApis([payload]),
314412
+ socket.call.updateApi(payload),
314663
314413
  extractApiParamsAndDependencies(socket)
314664
314414
  ]);
314665
314415
  });
@@ -318615,7 +318365,7 @@ var import_util29 = __toESM(require_dist3(), 1);
318615
318365
  // ../sdk/package.json
318616
318366
  var package_default = {
318617
318367
  name: "@superblocksteam/sdk",
318618
- version: "2.0.0-next.103",
318368
+ version: "2.0.0-next.104",
318619
318369
  type: "module",
318620
318370
  description: "Superblocks JS SDK",
318621
318371
  homepage: "https://www.superblocks.com",
@@ -318657,8 +318407,8 @@ var package_default = {
318657
318407
  "@rollup/wasm-node": "^4.35.0",
318658
318408
  "@superblocksteam/bucketeer-sdk": "0.5.0",
318659
318409
  "@superblocksteam/shared": "0.9149.0",
318660
- "@superblocksteam/util": "2.0.0-next.103",
318661
- "@superblocksteam/vite-plugin-file-sync": "2.0.0-next.103",
318410
+ "@superblocksteam/util": "2.0.0-next.104",
318411
+ "@superblocksteam/vite-plugin-file-sync": "2.0.0-next.104",
318662
318412
  "@vitejs/plugin-react": "^4.3.4",
318663
318413
  axios: "^1.4.0",
318664
318414
  chokidar: "^4.0.3",
@@ -325607,7 +325357,7 @@ async function startVite({ app, httpServer: httpServer2, root: root2, mode, port
325607
325357
  };
325608
325358
  const isCustomBuildEnabled2 = await isCustomComponentsEnabled();
325609
325359
  const customFolder = path34.join(root2, "custom");
325610
- const cdnUrl = "https://assets-cdn.superblocks.com/library/2.0.0-next.103";
325360
+ const cdnUrl = "https://assets-cdn.superblocks.com/library/2.0.0-next.104";
325611
325361
  const env3 = loadEnv(mode, root2, "");
325612
325362
  const hmrPort = await getFreePort();
325613
325363
  const hmrOptions = {