@superblocksteam/cli 2.0.0-next.31 → 2.0.0-next.33

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/README.md CHANGED
@@ -14,7 +14,7 @@ $ npm install -g @superblocksteam/cli
14
14
  $ superblocks COMMAND
15
15
  running command...
16
16
  $ superblocks (--version)
17
- @superblocksteam/cli/2.0.0-next.31 linux-x64 node-v20.19.0
17
+ @superblocksteam/cli/2.0.0-next.33 linux-x64 node-v20.19.0
18
18
  $ superblocks --help [COMMAND]
19
19
  USAGE
20
20
  $ superblocks COMMAND
package/dist/index.js CHANGED
@@ -263727,7 +263727,7 @@ var import_util8 = __toESM(require_dist4(), 1);
263727
263727
  // ../sdk/package.json
263728
263728
  var package_default = {
263729
263729
  name: "@superblocksteam/sdk",
263730
- version: "2.0.0-next.31",
263730
+ version: "2.0.0-next.33",
263731
263731
  type: "module",
263732
263732
  description: "Superblocks JS SDK",
263733
263733
  homepage: "https://www.superblocks.com",
@@ -263764,8 +263764,8 @@ var package_default = {
263764
263764
  "@rollup/wasm-node": "^4.35.0",
263765
263765
  "@superblocksteam/bucketeer-sdk": "0.4.1",
263766
263766
  "@superblocksteam/shared": "0.9132.0",
263767
- "@superblocksteam/util": "2.0.0-next.31",
263768
- "@superblocksteam/vite-plugin-file-sync": "2.0.0-next.31",
263767
+ "@superblocksteam/util": "2.0.0-next.33",
263768
+ "@superblocksteam/vite-plugin-file-sync": "2.0.0-next.33",
263769
263769
  "@vitejs/plugin-react": "^4.3.4",
263770
263770
  axios: "^1.4.0",
263771
263771
  chokidar: "^4.0.3",
@@ -276897,26 +276897,16 @@ function buildNodes(node, parent, context2) {
276897
276897
  }
276898
276898
  function isNamedComponent(element) {
276899
276899
  const bindAttr = element.attributes.find((attr) => attr.type === "JSXAttribute" && attr.name.name === "bind");
276900
- const nameAttr = element.attributes.find((attr) => attr.type === "JSXAttribute" && attr.name.name === "name");
276901
- return !!bindAttr || !!nameAttr;
276900
+ return !!bindAttr;
276902
276901
  }
276903
276902
  function getDescriptiveName(element) {
276904
276903
  const bindAttr = element.openingElement.attributes.find((attr) => attr.type === "JSXAttribute" && attr.name.name === "bind");
276905
- const nameAttr = element.openingElement.attributes.find((attr) => attr.type === "JSXAttribute" && attr.name.name === "name");
276906
276904
  if (bindAttr) {
276907
276905
  const extractedName = extractNameFromBindAttribute(bindAttr);
276908
276906
  if (extractedName) {
276909
276907
  return extractedName;
276910
276908
  }
276911
276909
  }
276912
- if (nameAttr?.value?.type === "StringLiteral") {
276913
- return nameAttr.value.value;
276914
- } else if (nameAttr?.value?.type === "JSXExpressionContainer") {
276915
- const expression = nameAttr.value.expression;
276916
- if (expression.type === "StringLiteral") {
276917
- return expression.value;
276918
- }
276919
- }
276920
276910
  const openingName = element.openingElement.name;
276921
276911
  if (openingName.type === "JSXIdentifier") {
276922
276912
  const name17 = openingName.name;
@@ -278595,7 +278585,8 @@ var RenameManager = class {
278595
278585
  return;
278596
278586
  } else {
278597
278587
  oldName = nameAttribute.node.value ? nodeToValue(nameAttribute.node.value) : null;
278598
- nameAttribute.node.value = import_types18.default.stringLiteral(newName);
278588
+ widgetNode.pushContainer("attributes", import_types18.default.jsxAttribute(import_types18.default.jsxIdentifier("bind"), import_types18.default.jsxExpressionContainer(import_types18.default.identifier(newName))));
278589
+ nameAttribute.remove();
278599
278590
  }
278600
278591
  if (!oldName) {
278601
278592
  getLogger().error("Existing widget name is not found");
@@ -302908,6 +302899,13 @@ var SourceTracker = class {
302908
302899
  }
302909
302900
  const hasNameAttribute = isNamedComponent(widgetNode.node);
302910
302901
  if (scopeName) {
302902
+ if (!hasNameAttribute) {
302903
+ this.sbScopeManager.addScopeDestructuringForComponent({
302904
+ elementLocation: widgetNode,
302905
+ scopeName,
302906
+ componentFilePath: filePath
302907
+ });
302908
+ }
302911
302909
  const changedFiles = this.sbScopeManager.renameScopeComponent({
302912
302910
  oldName: hasNameAttribute ? oldName : void 0,
302913
302911
  newName,
@@ -308654,7 +308652,7 @@ async function startVite({ app, httpServer: httpServer2, root: root2, mode, port
308654
308652
  };
308655
308653
  const isCustomBuildEnabled2 = await isCustomComponentsEnabled();
308656
308654
  const customFolder = path21.join(root2, "custom");
308657
- const cdnUrl = "https://assets-cdn.superblocks.com/library/2.0.0-next.31";
308655
+ const cdnUrl = "https://assets-cdn.superblocks.com/library/2.0.0-next.33";
308658
308656
  const env3 = loadEnv(mode, root2, "");
308659
308657
  const hmrPort = await getFreePort();
308660
308658
  const hmrOptions = {
@@ -509,5 +509,5 @@
509
509
  "strict": true
510
510
  }
511
511
  },
512
- "version": "2.0.0-next.31"
512
+ "version": "2.0.0-next.33"
513
513
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superblocksteam/cli",
3
- "version": "2.0.0-next.31",
3
+ "version": "2.0.0-next.33",
4
4
  "type": "module",
5
5
  "description": "Official Superblocks CLI",
6
6
  "homepage": "https://www.superblocks.com",
@@ -42,9 +42,9 @@
42
42
  "devDependencies": {
43
43
  "@eslint/js": "^9.16.0",
44
44
  "@oclif/test": "^4.1.11",
45
- "@superblocksteam/sdk": "2.0.0-next.31",
45
+ "@superblocksteam/sdk": "2.0.0-next.33",
46
46
  "@superblocksteam/shared": "0.9132.0",
47
- "@superblocksteam/util": "2.0.0-next.31",
47
+ "@superblocksteam/util": "2.0.0-next.33",
48
48
  "@types/babel__core": "^7.20.0",
49
49
  "@types/chai": "^4",
50
50
  "@types/fs-extra": "^11.0.1",