@superblocksteam/cli 2.0.1 → 2.0.3-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.js +53 -6
- 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.
|
|
17
|
+
@superblocksteam/cli/2.0.3-next.0 linux-x64 node-v20.19.0
|
|
18
18
|
$ superblocks --help [COMMAND]
|
|
19
19
|
USAGE
|
|
20
20
|
$ superblocks COMMAND
|
package/dist/index.js
CHANGED
|
@@ -310976,6 +310976,14 @@ function renameEntityInJavascript({ oldName, newName, nodePath, parentBinding, c
|
|
|
310976
310976
|
}
|
|
310977
310977
|
});
|
|
310978
310978
|
}
|
|
310979
|
+
function deleteEntityInJavascriptArray({ name: name18, nodePath }) {
|
|
310980
|
+
nodePath.traverse({
|
|
310981
|
+
ArrayExpression(path53) {
|
|
310982
|
+
path53.node.elements = path53.node.elements.filter((element) => !import_types18.default.isIdentifier(element) || element.name !== name18);
|
|
310983
|
+
path53.skip();
|
|
310984
|
+
}
|
|
310985
|
+
});
|
|
310986
|
+
}
|
|
310979
310987
|
|
|
310980
310988
|
// ../../../vite-plugin-file-sync/dist/rename-manager.js
|
|
310981
310989
|
var traverseFn = traverse.default || traverse;
|
|
@@ -311099,6 +311107,32 @@ var RenameManager = class {
|
|
|
311099
311107
|
}
|
|
311100
311108
|
});
|
|
311101
311109
|
}
|
|
311110
|
+
deleteApisInAST({ name: name18, ast }) {
|
|
311111
|
+
traverseFn(ast, {
|
|
311112
|
+
// At the moment, we only delete API references from runApis and cancelApis calls in SbEventFlow
|
|
311113
|
+
Identifier(path53) {
|
|
311114
|
+
if (path53.node.name === "runApis" || path53.node.name === "cancelApis") {
|
|
311115
|
+
let isEventFlow = false;
|
|
311116
|
+
path53.parentPath.traverse({
|
|
311117
|
+
Identifier(path54) {
|
|
311118
|
+
if (path54.node.name === "SbEventFlow") {
|
|
311119
|
+
isEventFlow = true;
|
|
311120
|
+
path54.skip();
|
|
311121
|
+
}
|
|
311122
|
+
}
|
|
311123
|
+
});
|
|
311124
|
+
if (isEventFlow) {
|
|
311125
|
+
deleteEntityInJavascriptArray({
|
|
311126
|
+
name: name18,
|
|
311127
|
+
nodePath: path53.parentPath.parentPath
|
|
311128
|
+
});
|
|
311129
|
+
path53.skip();
|
|
311130
|
+
}
|
|
311131
|
+
}
|
|
311132
|
+
path53.skip();
|
|
311133
|
+
}
|
|
311134
|
+
});
|
|
311135
|
+
}
|
|
311102
311136
|
};
|
|
311103
311137
|
|
|
311104
311138
|
// ../../../vite-plugin-file-sync/dist/source-tracker.js
|
|
@@ -311960,6 +311994,19 @@ var SourceTracker = class {
|
|
|
311960
311994
|
return;
|
|
311961
311995
|
}
|
|
311962
311996
|
const { changedFiles } = this.sbScopeManager.deleteScopeEntity(entityId);
|
|
311997
|
+
const scopeFolder = path25.dirname(scopeFilePath);
|
|
311998
|
+
for (const filePath of Object.keys(this.fileToMeta)) {
|
|
311999
|
+
if (filePath.startsWith(scopeFolder) && filePath.endsWith(".tsx")) {
|
|
312000
|
+
const currentFile = this.fileToMeta[filePath];
|
|
312001
|
+
if (!currentFile || !currentFile.ast) {
|
|
312002
|
+
throw new Error(`File not found for element ${filePath}`);
|
|
312003
|
+
}
|
|
312004
|
+
this.renameManager.deleteApisInAST({
|
|
312005
|
+
name: apiName,
|
|
312006
|
+
ast: currentFile.ast
|
|
312007
|
+
});
|
|
312008
|
+
}
|
|
312009
|
+
}
|
|
311963
312010
|
changedFiles.forEach((file) => {
|
|
311964
312011
|
this.changedFiles.add(file);
|
|
311965
312012
|
});
|
|
@@ -314480,7 +314527,7 @@ var fileSyncVitePlugin = (pluginParams, options8) => {
|
|
|
314480
314527
|
if (pageNames.size > 0) {
|
|
314481
314528
|
pageNames.forEach((pageName) => {
|
|
314482
314529
|
const pagePath = getPageFilePath(config.root, pageName);
|
|
314483
|
-
|
|
314530
|
+
sendFileUpdate(pagePath);
|
|
314484
314531
|
});
|
|
314485
314532
|
}
|
|
314486
314533
|
if (syncService) {
|
|
@@ -314500,7 +314547,7 @@ var fileSyncVitePlugin = (pluginParams, options8) => {
|
|
|
314500
314547
|
extractApiParamsAndDependencies(socket)
|
|
314501
314548
|
]);
|
|
314502
314549
|
const pagePath = getPageFilePath(config.root, payload.api.pageName);
|
|
314503
|
-
|
|
314550
|
+
sendFileUpdate(pagePath);
|
|
314504
314551
|
});
|
|
314505
314552
|
socketManager.callEditorClients((socket) => {
|
|
314506
314553
|
return socket.call.manualDeleteApi({
|
|
@@ -318376,7 +318423,7 @@ var import_util28 = __toESM(require_dist3(), 1);
|
|
|
318376
318423
|
// ../sdk/package.json
|
|
318377
318424
|
var package_default = {
|
|
318378
318425
|
name: "@superblocksteam/sdk",
|
|
318379
|
-
version: "2.0.
|
|
318426
|
+
version: "2.0.3-next.0",
|
|
318380
318427
|
type: "module",
|
|
318381
318428
|
description: "Superblocks JS SDK",
|
|
318382
318429
|
homepage: "https://www.superblocks.com",
|
|
@@ -318418,8 +318465,8 @@ var package_default = {
|
|
|
318418
318465
|
"@rollup/wasm-node": "^4.35.0",
|
|
318419
318466
|
"@superblocksteam/bucketeer-sdk": "0.5.0",
|
|
318420
318467
|
"@superblocksteam/shared": "0.9160.0",
|
|
318421
|
-
"@superblocksteam/util": "2.0.
|
|
318422
|
-
"@superblocksteam/vite-plugin-file-sync": "2.0.
|
|
318468
|
+
"@superblocksteam/util": "2.0.3-next.0",
|
|
318469
|
+
"@superblocksteam/vite-plugin-file-sync": "2.0.3-next.0",
|
|
318423
318470
|
"@vitejs/plugin-react": "^4.3.4",
|
|
318424
318471
|
axios: "^1.4.0",
|
|
318425
318472
|
chokidar: "^4.0.3",
|
|
@@ -325387,7 +325434,7 @@ async function startVite({ app, httpServer: httpServer2, root: root2, mode, port
|
|
|
325387
325434
|
};
|
|
325388
325435
|
const isCustomBuildEnabled2 = await isCustomComponentsEnabled();
|
|
325389
325436
|
const customFolder = path34.join(root2, "custom");
|
|
325390
|
-
const cdnUrl = "https://assets-cdn.superblocks.com/library/2.0.
|
|
325437
|
+
const cdnUrl = "https://assets-cdn.superblocks.com/library/2.0.3-next.0";
|
|
325391
325438
|
const env3 = loadEnv(mode, root2, "");
|
|
325392
325439
|
const hmrPort = await getFreePort();
|
|
325393
325440
|
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.
|
|
3
|
+
"version": "2.0.3-next.0",
|
|
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.
|
|
45
|
+
"@superblocksteam/sdk": "2.0.3-next.0",
|
|
46
46
|
"@superblocksteam/shared": "0.9160.0",
|
|
47
|
-
"@superblocksteam/util": "2.0.
|
|
47
|
+
"@superblocksteam/util": "2.0.3-next.0",
|
|
48
48
|
"@types/babel__core": "^7.20.0",
|
|
49
49
|
"@types/chai": "^4",
|
|
50
50
|
"@types/fs-extra": "^11.0.1",
|