@superblocksteam/cli 2.0.0-next.14 → 2.0.0-next.16
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 +106 -54
- 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.16 linux-x64 node-v20.19.0
|
|
18
18
|
$ superblocks --help [COMMAND]
|
|
19
19
|
USAGE
|
|
20
20
|
$ superblocks COMMAND
|
package/dist/index.js
CHANGED
|
@@ -84155,7 +84155,7 @@ var require_methodTracing = __commonJS({
|
|
|
84155
84155
|
}
|
|
84156
84156
|
return void 0;
|
|
84157
84157
|
}
|
|
84158
|
-
function
|
|
84158
|
+
function addTracingToMethods5(object2, methods, tracer2) {
|
|
84159
84159
|
methods.forEach((method) => {
|
|
84160
84160
|
if (typeof object2[method] === "function") {
|
|
84161
84161
|
const descriptor = findDescriptor(object2, method);
|
|
@@ -84165,7 +84165,7 @@ var require_methodTracing = __commonJS({
|
|
|
84165
84165
|
}
|
|
84166
84166
|
});
|
|
84167
84167
|
}
|
|
84168
|
-
exports2.addTracingToMethods =
|
|
84168
|
+
exports2.addTracingToMethods = addTracingToMethods5;
|
|
84169
84169
|
}
|
|
84170
84170
|
});
|
|
84171
84171
|
|
|
@@ -263726,7 +263726,7 @@ init_esm();
|
|
|
263726
263726
|
// ../sdk/package.json
|
|
263727
263727
|
var package_default = {
|
|
263728
263728
|
name: "@superblocksteam/sdk",
|
|
263729
|
-
version: "2.0.0-next.
|
|
263729
|
+
version: "2.0.0-next.16",
|
|
263730
263730
|
type: "module",
|
|
263731
263731
|
description: "Superblocks JS SDK",
|
|
263732
263732
|
homepage: "https://www.superblocks.com",
|
|
@@ -263763,8 +263763,8 @@ var package_default = {
|
|
|
263763
263763
|
"@rollup/wasm-node": "^4.35.0",
|
|
263764
263764
|
"@superblocksteam/bucketeer-sdk": "0.4.1",
|
|
263765
263765
|
"@superblocksteam/shared": "0.9132.0",
|
|
263766
|
-
"@superblocksteam/util": "2.0.0-next.
|
|
263767
|
-
"@superblocksteam/vite-plugin-file-sync": "2.0.0-next.
|
|
263766
|
+
"@superblocksteam/util": "2.0.0-next.16",
|
|
263767
|
+
"@superblocksteam/vite-plugin-file-sync": "2.0.0-next.16",
|
|
263768
263768
|
"@vitejs/plugin-react": "^4.3.4",
|
|
263769
263769
|
axios: "^1.4.0",
|
|
263770
263770
|
chokidar: "^4.0.3",
|
|
@@ -263874,7 +263874,7 @@ import path21 from "node:path";
|
|
|
263874
263874
|
|
|
263875
263875
|
// ../../../vite-plugin-file-sync/dist/file-sync-vite-plugin.js
|
|
263876
263876
|
init_cjs_shims();
|
|
263877
|
-
var
|
|
263877
|
+
var import_shared22 = __toESM(require_dist3(), 1);
|
|
263878
263878
|
var import_body_parser = __toESM(require_body_parser(), 1);
|
|
263879
263879
|
var import_common_tags2 = __toESM(require_lib7(), 1);
|
|
263880
263880
|
import path17 from "node:path";
|
|
@@ -275631,6 +275631,7 @@ var import_types24 = __toESM(require_lib10(), 1);
|
|
|
275631
275631
|
import fs8 from "fs/promises";
|
|
275632
275632
|
import EventEmitter6 from "node:events";
|
|
275633
275633
|
import path16 from "node:path";
|
|
275634
|
+
var import_shared16 = __toESM(require_dist3(), 1);
|
|
275634
275635
|
var import_util26 = __toESM(require_dist4(), 1);
|
|
275635
275636
|
init_lodash();
|
|
275636
275637
|
var import_yaml3 = __toESM(require_dist(), 1);
|
|
@@ -277109,7 +277110,7 @@ function generateJSXAttribute(name17, info) {
|
|
|
277109
277110
|
return import_types11.default.jsxAttribute(import_types11.default.jsxIdentifier(name17), import_types11.default.jsxExpressionContainer(valueNode));
|
|
277110
277111
|
}
|
|
277111
277112
|
}
|
|
277112
|
-
function writeNestedProperty({ node, paths, info }) {
|
|
277113
|
+
function writeNestedProperty({ node, paths, info, isDelete = false }) {
|
|
277113
277114
|
let currentNode = node;
|
|
277114
277115
|
const cleanedPaths = paths.map((path45) => {
|
|
277115
277116
|
if (path45.startsWith("[")) {
|
|
@@ -277127,7 +277128,14 @@ function writeNestedProperty({ node, paths, info }) {
|
|
|
277127
277128
|
}
|
|
277128
277129
|
if (currentNode.isObjectExpression()) {
|
|
277129
277130
|
let property = currentNode.get("properties").find((prop) => prop.isObjectProperty() && getIdentiferName(prop.node.key) === currentKey);
|
|
277131
|
+
if (isDelete && cleanedPaths.length === 0) {
|
|
277132
|
+
property?.remove();
|
|
277133
|
+
return;
|
|
277134
|
+
}
|
|
277130
277135
|
if (!property) {
|
|
277136
|
+
if (isDelete) {
|
|
277137
|
+
return;
|
|
277138
|
+
}
|
|
277131
277139
|
const value3 = cleanedPaths.length > 0 ? import_types11.default.objectExpression([]) : import_types11.default.stringLiteral("");
|
|
277132
277140
|
property = currentNode.pushContainer("properties", [
|
|
277133
277141
|
import_types11.default.objectProperty(import_types11.default.identifier(currentKey.toString()), value3)
|
|
@@ -277141,7 +277149,16 @@ function writeNestedProperty({ node, paths, info }) {
|
|
|
277141
277149
|
} else if (currentNode.isArrayExpression() && typeof currentKey === "number") {
|
|
277142
277150
|
const index = currentKey;
|
|
277143
277151
|
const nodeAtIndex = currentNode.get("elements")[index];
|
|
277152
|
+
if (isDelete && cleanedPaths.length === 0) {
|
|
277153
|
+
if (nodeAtIndex && nodeAtIndex.node != null) {
|
|
277154
|
+
nodeAtIndex.remove();
|
|
277155
|
+
}
|
|
277156
|
+
return;
|
|
277157
|
+
}
|
|
277144
277158
|
if (!nodeAtIndex || nodeAtIndex.node == null) {
|
|
277159
|
+
if (isDelete) {
|
|
277160
|
+
return;
|
|
277161
|
+
}
|
|
277145
277162
|
if (cleanedPaths.length > 0) {
|
|
277146
277163
|
const newObjectNode = import_types11.default.objectExpression([]);
|
|
277147
277164
|
if (currentNode.get("elements").length > 0) {
|
|
@@ -277170,7 +277187,7 @@ function writeNestedProperty({ node, paths, info }) {
|
|
|
277170
277187
|
}
|
|
277171
277188
|
}
|
|
277172
277189
|
}
|
|
277173
|
-
if (currentNode) {
|
|
277190
|
+
if (currentNode && !isDelete) {
|
|
277174
277191
|
const valueNode = getPropertyExpression(info, "");
|
|
277175
277192
|
currentNode.replaceWith(valueNode);
|
|
277176
277193
|
}
|
|
@@ -302694,6 +302711,23 @@ var SourceTracker = class {
|
|
|
302694
302711
|
setNestedAttribute = ({ openingTag, property, info }) => {
|
|
302695
302712
|
const [parent, ...paths] = splitJSPathAdvanced(property, []);
|
|
302696
302713
|
let parentAttr = openingTag.get("attributes").find((attr) => attr.isJSXAttribute() && attr.node.name.name === parent);
|
|
302714
|
+
if (info.value === void 0) {
|
|
302715
|
+
if (!parentAttr) {
|
|
302716
|
+
return;
|
|
302717
|
+
}
|
|
302718
|
+
const expressionContainer2 = parentAttr?.get("value");
|
|
302719
|
+
if (!expressionContainer2 || !expressionContainer2.isJSXExpressionContainer()) {
|
|
302720
|
+
return;
|
|
302721
|
+
}
|
|
302722
|
+
const currentNode2 = expressionContainer2.get("expression");
|
|
302723
|
+
writeNestedProperty({
|
|
302724
|
+
node: currentNode2,
|
|
302725
|
+
paths,
|
|
302726
|
+
info,
|
|
302727
|
+
isDelete: true
|
|
302728
|
+
});
|
|
302729
|
+
return;
|
|
302730
|
+
}
|
|
302697
302731
|
if (!parentAttr && parent) {
|
|
302698
302732
|
const newAttr = openingTag.pushContainer("attributes", [
|
|
302699
302733
|
import_types22.default.jsxAttribute(import_types22.default.jsxIdentifier(parent), import_types22.default.jSXExpressionContainer(import_types22.default.objectExpression([])))
|
|
@@ -302796,21 +302830,6 @@ var SourceTracker = class {
|
|
|
302796
302830
|
}
|
|
302797
302831
|
}
|
|
302798
302832
|
}
|
|
302799
|
-
if (info.type === "EVENT" && jsxAttribute) {
|
|
302800
|
-
const referencedGlobalFunctions = getVariableReferences(jsxAttribute, GLOBAL_LIBRARY_NAMES);
|
|
302801
|
-
referencedGlobalFunctions.forEach((funcName) => {
|
|
302802
|
-
if (!this.fileToMeta[fileName].imports[funcName]) {
|
|
302803
|
-
addImport({
|
|
302804
|
-
importPath: "@superblocksteam/library",
|
|
302805
|
-
importName: funcName,
|
|
302806
|
-
path: openingTag,
|
|
302807
|
-
onAdd: () => {
|
|
302808
|
-
this.fileToMeta[fileName].imports[funcName] = true;
|
|
302809
|
-
}
|
|
302810
|
-
});
|
|
302811
|
-
}
|
|
302812
|
-
});
|
|
302813
|
-
}
|
|
302814
302833
|
if (ATTRIBUTE_TYPES_WITH_STATE_ACCESS.includes(info.type) && jsxAttribute) {
|
|
302815
302834
|
const elementLocation = this.getElementToLocation(source2.id);
|
|
302816
302835
|
const scopeImports = this.sbScopeManager.getAndUpdateScopeImportsForCodeSnippet({
|
|
@@ -303109,7 +303128,7 @@ var FileSyncManager = class extends EventEmitter6 {
|
|
|
303109
303128
|
watcher;
|
|
303110
303129
|
registeredComponentPaths = {};
|
|
303111
303130
|
renameManager = new RenameManager();
|
|
303112
|
-
constructor(fsOperationQueue, generationNumberSequence) {
|
|
303131
|
+
constructor(fsOperationQueue, generationNumberSequence, tracer2) {
|
|
303113
303132
|
super({ captureRejections: true });
|
|
303114
303133
|
this.rootDir = "/";
|
|
303115
303134
|
this.fsOperationQueue = fsOperationQueue;
|
|
@@ -303133,6 +303152,25 @@ var FileSyncManager = class extends EventEmitter6 {
|
|
|
303133
303152
|
handleUpdateTheme: { operation: "updating the theme" },
|
|
303134
303153
|
handleRenameElement: { operation: "renaming an element" }
|
|
303135
303154
|
});
|
|
303155
|
+
const methods = [
|
|
303156
|
+
"handleCreatePage",
|
|
303157
|
+
"handleReparent",
|
|
303158
|
+
"handleCreateComponent",
|
|
303159
|
+
"handleDeleteComponents",
|
|
303160
|
+
"handleSetProperty",
|
|
303161
|
+
"handleSetProperties",
|
|
303162
|
+
"handleDeleteProperties",
|
|
303163
|
+
"handleBatchUpdate",
|
|
303164
|
+
"handleUpdateApi",
|
|
303165
|
+
"handleDeleteApi",
|
|
303166
|
+
"handleRenameApi",
|
|
303167
|
+
"handleAddEntity",
|
|
303168
|
+
"handleUpdateEntity",
|
|
303169
|
+
"handleDeleteEntity",
|
|
303170
|
+
"handleUpdateTheme",
|
|
303171
|
+
"handleRenameElement"
|
|
303172
|
+
];
|
|
303173
|
+
(0, import_shared16.addTracingToMethods)(this, methods, tracer2);
|
|
303136
303174
|
}
|
|
303137
303175
|
get appFilePath() {
|
|
303138
303176
|
if (!this.rootDir) {
|
|
@@ -304187,19 +304225,19 @@ var indexHtml = (
|
|
|
304187
304225
|
|
|
304188
304226
|
// ../../../vite-plugin-file-sync/dist/lock-service/index.js
|
|
304189
304227
|
init_cjs_shims();
|
|
304190
|
-
var
|
|
304228
|
+
var import_shared20 = __toESM(require_dist3(), 1);
|
|
304191
304229
|
import EventEmitter7 from "node:events";
|
|
304192
304230
|
|
|
304193
304231
|
// ../../../vite-plugin-file-sync/dist/sync-service/server-rpc/client.js
|
|
304194
304232
|
init_cjs_shims();
|
|
304195
|
-
var import_shared17 = __toESM(require_dist3(), 1);
|
|
304196
304233
|
var import_shared18 = __toESM(require_dist3(), 1);
|
|
304234
|
+
var import_shared19 = __toESM(require_dist3(), 1);
|
|
304197
304235
|
|
|
304198
304236
|
// ../../../vite-plugin-file-sync/dist/sync-service/server-rpc/handlers.js
|
|
304199
304237
|
init_cjs_shims();
|
|
304200
|
-
var
|
|
304238
|
+
var import_shared17 = __toESM(require_dist3(), 1);
|
|
304201
304239
|
async function notImplemented() {
|
|
304202
|
-
throw new
|
|
304240
|
+
throw new import_shared17.NotImplementedError("Signing methods are not implemented");
|
|
304203
304241
|
}
|
|
304204
304242
|
function createRequestHandlers2() {
|
|
304205
304243
|
const requestHandlers = {
|
|
@@ -304219,7 +304257,7 @@ function createRequestHandlers2() {
|
|
|
304219
304257
|
async function connectToISocketRPCServer2({ superblocksBaseUrl, token: token2 }) {
|
|
304220
304258
|
const requestHandlers = createRequestHandlers2();
|
|
304221
304259
|
const authorization = `Bearer ${token2}`;
|
|
304222
|
-
const wsUrl = new URL(`api/${
|
|
304260
|
+
const wsUrl = new URL(`api/${import_shared18.serverWsPath}`, superblocksBaseUrl);
|
|
304223
304261
|
if (wsUrl.protocol === "http:") {
|
|
304224
304262
|
wsUrl.protocol = "ws:";
|
|
304225
304263
|
} else if (wsUrl.protocol === "https:") {
|
|
@@ -304239,8 +304277,8 @@ async function connectToISocketRPCServer2({ superblocksBaseUrl, token: token2 })
|
|
|
304239
304277
|
}
|
|
304240
304278
|
async function connectISocket2(wsUrl, authorization, requestHandlers, globalMiddlewares, timeouts) {
|
|
304241
304279
|
const ws = await connectWebSocket2(wsUrl);
|
|
304242
|
-
const isocket = new
|
|
304243
|
-
return (0,
|
|
304280
|
+
const isocket = new import_shared18.ISocketWithClientAuth(ws, authorization, requestHandlers, globalMiddlewares, timeouts);
|
|
304281
|
+
return (0, import_shared18.createISocketClient)(isocket);
|
|
304244
304282
|
}
|
|
304245
304283
|
function connectWebSocket2(wsUrl) {
|
|
304246
304284
|
return new Promise((resolve8, reject) => {
|
|
@@ -304258,9 +304296,9 @@ async function unwrapResponseDto(request) {
|
|
|
304258
304296
|
if (!response.responseMeta.success || response.responseMeta.error || response.responseMeta.status !== 200) {
|
|
304259
304297
|
const errorMessage = response.responseMeta.error?.message ?? response.responseMeta.message ?? `Request failed with status ${response.responseMeta.status}`;
|
|
304260
304298
|
if (response.responseMeta.status === 409) {
|
|
304261
|
-
throw new
|
|
304299
|
+
throw new import_shared19.ConflictError(errorMessage);
|
|
304262
304300
|
} else if (response.responseMeta.status === 404) {
|
|
304263
|
-
throw new
|
|
304301
|
+
throw new import_shared18.NotFoundError(errorMessage);
|
|
304264
304302
|
}
|
|
304265
304303
|
throw new Error(errorMessage);
|
|
304266
304304
|
}
|
|
@@ -304321,7 +304359,7 @@ var LockService = class extends EventEmitter7 {
|
|
|
304321
304359
|
"shutdown",
|
|
304322
304360
|
"shutdownAndExit"
|
|
304323
304361
|
];
|
|
304324
|
-
(0,
|
|
304362
|
+
(0, import_shared20.addTracingToMethods)(this, methods, this._tracer);
|
|
304325
304363
|
}
|
|
304326
304364
|
setSyncCallback(callback) {
|
|
304327
304365
|
this.syncCallback = callback;
|
|
@@ -304366,7 +304404,7 @@ var LockService = class extends EventEmitter7 {
|
|
|
304366
304404
|
return;
|
|
304367
304405
|
}
|
|
304368
304406
|
} catch (error) {
|
|
304369
|
-
if (error instanceof
|
|
304407
|
+
if (error instanceof import_shared20.ConflictError) {
|
|
304370
304408
|
logger3.error(`[lock-service] ${error.message}`);
|
|
304371
304409
|
this.emit("statusChange", LockServiceStatus.FAILED_TO_ACQUIRE_LOCK);
|
|
304372
304410
|
this.status = LockServiceStatus.FAILED_TO_ACQUIRE_LOCK;
|
|
@@ -304422,7 +304460,7 @@ var LockService = class extends EventEmitter7 {
|
|
|
304422
304460
|
return true;
|
|
304423
304461
|
}
|
|
304424
304462
|
} catch (error) {
|
|
304425
|
-
if (error instanceof
|
|
304463
|
+
if (error instanceof import_shared20.NotFoundError) {
|
|
304426
304464
|
logger3.info(`[lock-service] Lock was removed, shutting down: ${error.message}`);
|
|
304427
304465
|
this.emit("statusChange", LockServiceStatus.LOCK_INVALID);
|
|
304428
304466
|
this.status = LockServiceStatus.LOCK_INVALID;
|
|
@@ -304630,7 +304668,7 @@ function generateRootSource(code, fileSyncManager) {
|
|
|
304630
304668
|
|
|
304631
304669
|
// ../../../vite-plugin-file-sync/dist/socket-manager.js
|
|
304632
304670
|
init_cjs_shims();
|
|
304633
|
-
var
|
|
304671
|
+
var import_shared21 = __toESM(require_dist3(), 1);
|
|
304634
304672
|
import EventEmitter8 from "node:events";
|
|
304635
304673
|
|
|
304636
304674
|
// ../../../vite-plugin-file-sync/dist/util/tracing.js
|
|
@@ -304724,7 +304762,7 @@ var SocketManager = class extends EventEmitter8 {
|
|
|
304724
304762
|
}
|
|
304725
304763
|
});
|
|
304726
304764
|
wss.on("connection", (ws, isEditor, peerId, userId) => {
|
|
304727
|
-
const socket = (0,
|
|
304765
|
+
const socket = (0, import_shared21.createISocketClient)(new import_shared21.ISocket(ws, withMethodTracing(tracer2, {
|
|
304728
304766
|
editor: {
|
|
304729
304767
|
// Update widgets
|
|
304730
304768
|
setProperties: [fileSyncManager.handleSetProperties],
|
|
@@ -304885,7 +304923,7 @@ var fileSyncVitePlugin = (pluginParams, options8) => {
|
|
|
304885
304923
|
const aiService = pluginParams.aiService;
|
|
304886
304924
|
const fsOperationQueue = pluginParams.fsOperationQueue;
|
|
304887
304925
|
const httpServer2 = pluginParams.httpServer;
|
|
304888
|
-
const fileSyncManager = new FileSyncManager(fsOperationQueue, generationNumberSequence);
|
|
304926
|
+
const fileSyncManager = new FileSyncManager(fsOperationQueue, generationNumberSequence, pluginParams.tracer);
|
|
304889
304927
|
if (syncService) {
|
|
304890
304928
|
syncService.generationNumberSequence = generationNumberSequence;
|
|
304891
304929
|
}
|
|
@@ -305495,7 +305533,7 @@ async function getAppScope(fileSyncManager) {
|
|
|
305495
305533
|
pageId: apiPb.trigger.application?.pageId,
|
|
305496
305534
|
organizationId: apiPb.metadata.organization,
|
|
305497
305535
|
updated: apiPb.metadata?.timestamps?.updated ? new Date(apiPb.metadata?.timestamps?.updated) : void 0,
|
|
305498
|
-
triggerType:
|
|
305536
|
+
triggerType: import_shared22.ApiTriggerType.UI,
|
|
305499
305537
|
apiPb
|
|
305500
305538
|
}));
|
|
305501
305539
|
const appScope = {
|
|
@@ -308628,7 +308666,7 @@ async function startVite({ app, httpServer: httpServer2, root: root2, mode, port
|
|
|
308628
308666
|
};
|
|
308629
308667
|
const isCustomBuildEnabled2 = await isCustomComponentsEnabled();
|
|
308630
308668
|
const customFolder = path21.join(root2, "custom");
|
|
308631
|
-
const cdnUrl = "https://assets-cdn.superblocks.com/library/2.0.0-next.
|
|
308669
|
+
const cdnUrl = "https://assets-cdn.superblocks.com/library/2.0.0-next.16";
|
|
308632
308670
|
const env3 = loadEnv(mode, root2, "");
|
|
308633
308671
|
const hmrPort = await getFreePort();
|
|
308634
308672
|
const hmrOptions = {
|
|
@@ -314782,6 +314820,9 @@ function createAnthropic(options8 = {}) {
|
|
|
314782
314820
|
}
|
|
314783
314821
|
var anthropic = createAnthropic();
|
|
314784
314822
|
|
|
314823
|
+
// ../../../vite-plugin-file-sync/dist/ai-service/index.js
|
|
314824
|
+
var import_shared33 = __toESM(require_dist3(), 1);
|
|
314825
|
+
|
|
314785
314826
|
// ../../../vite-plugin-file-sync/dist/ai-service/app-interface/shell.js
|
|
314786
314827
|
init_cjs_shims();
|
|
314787
314828
|
import { exec } from "node:child_process";
|
|
@@ -322675,6 +322716,7 @@ var AiService = class extends EventEmitter10 {
|
|
|
322675
322716
|
templateRenderer;
|
|
322676
322717
|
appShell;
|
|
322677
322718
|
clark;
|
|
322719
|
+
tracer;
|
|
322678
322720
|
constructor(config2) {
|
|
322679
322721
|
super();
|
|
322680
322722
|
this.config = config2;
|
|
@@ -322704,6 +322746,15 @@ var AiService = class extends EventEmitter10 {
|
|
|
322704
322746
|
transitionTo({ type: SERVICE_STARTED_WITH_DRAFT });
|
|
322705
322747
|
}
|
|
322706
322748
|
});
|
|
322749
|
+
this.tracer = config2.tracer;
|
|
322750
|
+
const methods = [
|
|
322751
|
+
"handleAiGenerate",
|
|
322752
|
+
"handleUserAcceptedDraft",
|
|
322753
|
+
"handleUserRejectedDraft",
|
|
322754
|
+
"handleUserCanceled",
|
|
322755
|
+
"handleBuildSystemError"
|
|
322756
|
+
];
|
|
322757
|
+
(0, import_shared33.addTracingToMethods)(this, methods, this.tracer);
|
|
322707
322758
|
}
|
|
322708
322759
|
createClarkTransitionHandler() {
|
|
322709
322760
|
const clarkStateHandlerFactories = {
|
|
@@ -322821,7 +322872,7 @@ var OperationQueue = class {
|
|
|
322821
322872
|
// ../../../vite-plugin-file-sync/dist/sync-service/index.js
|
|
322822
322873
|
init_cjs_shims();
|
|
322823
322874
|
import EventEmitter11 from "node:events";
|
|
322824
|
-
var
|
|
322875
|
+
var import_shared36 = __toESM(require_dist3(), 1);
|
|
322825
322876
|
|
|
322826
322877
|
// ../../../vite-plugin-file-sync/dist/util/with-resolvers.js
|
|
322827
322878
|
init_cjs_shims();
|
|
@@ -322841,7 +322892,7 @@ import * as fsp3 from "node:fs/promises";
|
|
|
322841
322892
|
|
|
322842
322893
|
// ../../../vite-plugin-file-sync/dist/sync-service/hash-dir-tree.js
|
|
322843
322894
|
init_cjs_shims();
|
|
322844
|
-
var
|
|
322895
|
+
var import_shared34 = __toESM(require_dist3(), 1);
|
|
322845
322896
|
var import_util32 = __toESM(require_dist4(), 1);
|
|
322846
322897
|
async function hashLocalDirectory2(localDirectoryPath) {
|
|
322847
322898
|
const directoryContents = [];
|
|
@@ -322850,7 +322901,7 @@ async function hashLocalDirectory2(localDirectoryPath) {
|
|
|
322850
322901
|
let entry;
|
|
322851
322902
|
switch (localDirEntry.type) {
|
|
322852
322903
|
case "-": {
|
|
322853
|
-
const hash3 = await (0,
|
|
322904
|
+
const hash3 = await (0, import_shared34.hashFileContents)(localDirEntry.contents);
|
|
322854
322905
|
entry = {
|
|
322855
322906
|
type: "-",
|
|
322856
322907
|
executable: localDirEntry.executable,
|
|
@@ -322882,7 +322933,7 @@ async function hashLocalDirectory2(localDirectoryPath) {
|
|
|
322882
322933
|
}
|
|
322883
322934
|
directoryContents.push(entry);
|
|
322884
322935
|
}
|
|
322885
|
-
const hash2 = await (0,
|
|
322936
|
+
const hash2 = await (0, import_shared34.hashDirectoryContents)(directoryContents);
|
|
322886
322937
|
return { contents: directoryContents, hash: hash2 };
|
|
322887
322938
|
}
|
|
322888
322939
|
|
|
@@ -323362,7 +323413,7 @@ var HashCache = class {
|
|
|
323362
323413
|
|
|
323363
323414
|
// ../../../vite-plugin-file-sync/dist/sync-service/snapshot/take-snapshot.js
|
|
323364
323415
|
init_cjs_shims();
|
|
323365
|
-
var
|
|
323416
|
+
var import_shared35 = __toESM(require_dist3(), 1);
|
|
323366
323417
|
var import_util33 = __toESM(require_dist4(), 1);
|
|
323367
323418
|
async function snapshotLocalDirectory(localDirectoryPath) {
|
|
323368
323419
|
const directoryContents = [];
|
|
@@ -323371,7 +323422,7 @@ async function snapshotLocalDirectory(localDirectoryPath) {
|
|
|
323371
323422
|
let entry;
|
|
323372
323423
|
switch (localDirEntry.type) {
|
|
323373
323424
|
case "-": {
|
|
323374
|
-
const hash2 = await (0,
|
|
323425
|
+
const hash2 = await (0, import_shared35.hashFileContents)(localDirEntry.contents);
|
|
323375
323426
|
entry = {
|
|
323376
323427
|
type: "-",
|
|
323377
323428
|
name: localDirEntry.name,
|
|
@@ -323404,7 +323455,7 @@ async function snapshotLocalDirectory(localDirectoryPath) {
|
|
|
323404
323455
|
}
|
|
323405
323456
|
directoryContents.push(entry);
|
|
323406
323457
|
}
|
|
323407
|
-
const directoryHash = await (0,
|
|
323458
|
+
const directoryHash = await (0, import_shared35.hashDirectoryContents)(directoryContents);
|
|
323408
323459
|
return {
|
|
323409
323460
|
hash: directoryHash,
|
|
323410
323461
|
contents: directoryContents
|
|
@@ -323535,7 +323586,7 @@ var SyncService = class extends EventEmitter11 {
|
|
|
323535
323586
|
"discardLocalDraftChanges",
|
|
323536
323587
|
"commitLocalDraftChanges"
|
|
323537
323588
|
];
|
|
323538
|
-
(0,
|
|
323589
|
+
(0, import_shared36.addTracingToMethods)(this, methods, this._tracer);
|
|
323539
323590
|
}
|
|
323540
323591
|
/** The current status of the sync service, which indicates what the service is currently doing */
|
|
323541
323592
|
get status() {
|
|
@@ -324720,7 +324771,8 @@ async function dev(options8) {
|
|
|
324720
324771
|
organizationId: currentUser.organizations[0].id,
|
|
324721
324772
|
anthropicApiKey: process.env.ANTHROPIC_API_KEY || "",
|
|
324722
324773
|
fsOperationQueue,
|
|
324723
|
-
draftInterface: syncService
|
|
324774
|
+
draftInterface: syncService,
|
|
324775
|
+
tracer: dev_tracer_default
|
|
324724
324776
|
});
|
|
324725
324777
|
const isSynced = localContents.hash === serverHash;
|
|
324726
324778
|
if (isSynced) {
|
|
@@ -324780,11 +324832,11 @@ async function dev(options8) {
|
|
|
324780
324832
|
|
|
324781
324833
|
// ../sdk/dist/cli-replacement/init.js
|
|
324782
324834
|
init_cjs_shims();
|
|
324783
|
-
var
|
|
324835
|
+
var import_shared37 = __toESM(require_dist3(), 1);
|
|
324784
324836
|
var import_util35 = __toESM(require_dist4(), 1);
|
|
324785
324837
|
async function fetchAndWriteApplication({ resourceId, viewMode, featureFlags, projectRootFolder, appRelativePath, sdk: sdk2, skipSigningVerification }) {
|
|
324786
324838
|
const headers = {
|
|
324787
|
-
[import_util35.COMPONENT_EVENT_HEADER]:
|
|
324839
|
+
[import_util35.COMPONENT_EVENT_HEADER]: import_shared37.ComponentEvent.INIT
|
|
324788
324840
|
};
|
|
324789
324841
|
const application = await sdk2.fetchApplicationWithComponents({
|
|
324790
324842
|
applicationId: resourceId,
|
|
@@ -324805,7 +324857,7 @@ async function fetchAndWriteApplication({ resourceId, viewMode, featureFlags, pr
|
|
|
324805
324857
|
}
|
|
324806
324858
|
|
|
324807
324859
|
// ../sdk/dist/index.js
|
|
324808
|
-
var
|
|
324860
|
+
var import_shared38 = __toESM(require_dist3(), 1);
|
|
324809
324861
|
|
|
324810
324862
|
// src/commands/commits.mts
|
|
324811
324863
|
var import_util38 = __toESM(require_dist4(), 1);
|
|
@@ -329888,7 +329940,7 @@ ${error.message}.`
|
|
|
329888
329940
|
task.title = `Pulling resources from branch ${ctx.localBranchName}...`;
|
|
329889
329941
|
let viewMode;
|
|
329890
329942
|
if (commitId) {
|
|
329891
|
-
viewMode =
|
|
329943
|
+
viewMode = import_shared38.ExportViewMode.EXPORT_COMMIT;
|
|
329892
329944
|
} else {
|
|
329893
329945
|
viewMode = await getMode(task, mode);
|
|
329894
329946
|
}
|
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.16",
|
|
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.16",
|
|
46
46
|
"@superblocksteam/shared": "0.9132.0",
|
|
47
|
-
"@superblocksteam/util": "2.0.0-next.
|
|
47
|
+
"@superblocksteam/util": "2.0.0-next.16",
|
|
48
48
|
"@types/babel__core": "^7.20.0",
|
|
49
49
|
"@types/chai": "^4",
|
|
50
50
|
"@types/fs-extra": "^11.0.1",
|