@superblocksteam/cli 2.0.0-next.30 → 2.0.0-next.32
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 +1 -1
- package/dist/index.js +14 -16
- package/oclif.manifest.json +1 -1
- package/package.json +3 -3
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.
|
|
17
|
+
@superblocksteam/cli/2.0.0-next.32 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.
|
|
263730
|
+
version: "2.0.0-next.32",
|
|
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.
|
|
263768
|
-
"@superblocksteam/vite-plugin-file-sync": "2.0.0-next.
|
|
263767
|
+
"@superblocksteam/util": "2.0.0-next.32",
|
|
263768
|
+
"@superblocksteam/vite-plugin-file-sync": "2.0.0-next.32",
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
308655
|
+
const cdnUrl = "https://assets-cdn.superblocks.com/library/2.0.0-next.32";
|
|
308658
308656
|
const env3 = loadEnv(mode, root2, "");
|
|
308659
308657
|
const hmrPort = await getFreePort();
|
|
308660
308658
|
const hmrOptions = {
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superblocksteam/cli",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.32",
|
|
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.
|
|
45
|
+
"@superblocksteam/sdk": "2.0.0-next.32",
|
|
46
46
|
"@superblocksteam/shared": "0.9132.0",
|
|
47
|
-
"@superblocksteam/util": "2.0.0-next.
|
|
47
|
+
"@superblocksteam/util": "2.0.0-next.32",
|
|
48
48
|
"@types/babel__core": "^7.20.0",
|
|
49
49
|
"@types/chai": "^4",
|
|
50
50
|
"@types/fs-extra": "^11.0.1",
|